Lines Matching refs:hal
75 s1394_hal_t *hal; in t1394_attach() local
97 hal = s1394_dip_to_hal(ddi_get_parent(dip)); in t1394_attach()
98 if (hal == NULL) { in t1394_attach()
106 ASSERT(MUTEX_NOT_HELD(&hal->topology_tree_mutex)); in t1394_attach()
114 mutex_enter(&hal->topology_tree_mutex); in t1394_attach()
120 target->on_hal = hal; in t1394_attach()
135 mutex_exit(&hal->topology_tree_mutex); in t1394_attach()
191 mutex_exit(&hal->topology_tree_mutex); in t1394_attach()
294 s1394_hal_t *hal; in t1394_alloc_cmd() local
306 hal = target->on_hal; in t1394_alloc_cmd()
308 rw_enter(&hal->target_list_rwlock, RW_WRITER); in t1394_alloc_cmd()
314 rw_exit(&hal->target_list_rwlock); in t1394_alloc_cmd()
321 hal->hal_kstats->cmd_alloc_fail++; in t1394_alloc_cmd()
328 if (s1394_alloc_cmd(hal, flags, cmdp) != DDI_SUCCESS) { in t1394_alloc_cmd()
330 rw_exit(&hal->target_list_rwlock); in t1394_alloc_cmd()
336 hal->hal_kstats->cmd_alloc_fail++; in t1394_alloc_cmd()
340 rw_exit(&hal->target_list_rwlock); in t1394_alloc_cmd()
347 hal->halinfo.hw_interrupt); in t1394_alloc_cmd()
375 s1394_hal_t *hal; in t1394_free_cmd() local
387 hal = target->on_hal; in t1394_free_cmd()
389 rw_enter(&hal->target_list_rwlock, RW_WRITER); in t1394_free_cmd()
395 rw_exit(&hal->target_list_rwlock); in t1394_free_cmd()
410 rw_exit(&hal->target_list_rwlock); in t1394_free_cmd()
422 rw_exit(&hal->target_list_rwlock); in t1394_free_cmd()
430 kmem_cache_free(hal->hal_kmem_cachep, *cmdp); in t1394_free_cmd()
436 hal->hal_kstats->cmd_free++; in t1394_free_cmd()
964 s1394_hal_t *hal; in t1394_alloc_addr() local
979 hal = target->on_hal; in t1394_alloc_addr()
990 (addr_lo < hal->physical_addr_lo) || in t1394_alloc_addr()
991 (addr_hi > hal->physical_addr_hi)) { in t1394_alloc_addr()
1007 hal->hal_kstats->addr_alloc_fail++; in t1394_alloc_addr()
1018 (addr_lo < hal->physical_addr_lo) || in t1394_alloc_addr()
1019 (addr_hi > hal->physical_addr_hi)) { in t1394_alloc_addr()
1035 hal->hal_kstats->addr_alloc_fail++; in t1394_alloc_addr()
1046 (addr_lo < hal->physical_addr_lo) || in t1394_alloc_addr()
1047 (addr_hi > hal->physical_addr_hi)) { in t1394_alloc_addr()
1063 hal->hal_kstats->addr_alloc_fail++; in t1394_alloc_addr()
1077 hal->hal_kstats->addr_alloc_fail++; in t1394_alloc_addr()
1090 hal->hal_kstats->addr_alloc_fail++; in t1394_alloc_addr()
1094 if ((addr_lo >= hal->physical_addr_lo) && in t1394_alloc_addr()
1095 (addr_hi <= hal->physical_addr_hi)) { in t1394_alloc_addr()
1096 rw_enter(&hal->target_list_rwlock, RW_WRITER); in t1394_alloc_addr()
1098 rw_exit(&hal->target_list_rwlock); in t1394_alloc_addr()
1129 s1394_hal_t *hal; in t1394_free_addr() local
1140 hal = target->on_hal; in t1394_free_addr()
1144 if (s1394_free_addr_blk(hal, curr_blk) != DDI_SUCCESS) { in t1394_free_addr()
1159 hal->hal_kstats->addr_space_free++; in t1394_free_addr()
1191 s1394_hal_t *hal; in t1394_recv_request_done() local
1210 hal = ((s1394_target_t *)t1394_hdl)->on_hal; in t1394_recv_request_done()
1220 s1394_fa_convert_cmd(hal, resp); in t1394_recv_request_done()
1239 hal->hal_kstats->arreq_posted_write_error++; in t1394_recv_request_done()
1243 HAL_CALL(hal).response_complete(hal->halinfo.hal_private, resp, in t1394_recv_request_done()
1272 HAL_CALL(hal).response_complete( in t1394_recv_request_done()
1273 hal->halinfo.hal_private, resp, h_priv); in t1394_recv_request_done()
1299 HAL_CALL(hal).response_complete( in t1394_recv_request_done()
1300 hal->halinfo.hal_private, resp, h_priv); in t1394_recv_request_done()
1310 ret = s1394_send_response(hal, resp); in t1394_recv_request_done()
1606 s1394_hal_t *hal; in t1394_alloc_isoch_single() local
1619 hal = ((s1394_target_t *)t1394_hdl)->on_hal; in t1394_alloc_isoch_single()
1664 hal->halinfo.hw_interrupt); in t1394_alloc_isoch_single()
1666 hal->halinfo.hw_interrupt); in t1394_alloc_isoch_single()
1681 mutex_enter(&hal->isoch_cec_list_mutex); in t1394_alloc_isoch_single()
1684 s1394_isoch_cec_list_insert(hal, cec_new); in t1394_alloc_isoch_single()
1686 mutex_exit(&hal->isoch_cec_list_mutex); in t1394_alloc_isoch_single()
1884 s1394_hal_t *hal; in t1394_alloc_isoch_cec() local
1895 hal = ((s1394_target_t *)t1394_hdl)->on_hal; in t1394_alloc_isoch_cec()
1950 hal->halinfo.hw_interrupt); in t1394_alloc_isoch_cec()
1952 hal->halinfo.hw_interrupt); in t1394_alloc_isoch_cec()
1968 mutex_enter(&hal->isoch_cec_list_mutex); in t1394_alloc_isoch_cec()
1971 s1394_isoch_cec_list_insert(hal, cec_new); in t1394_alloc_isoch_cec()
1973 mutex_exit(&hal->isoch_cec_list_mutex); in t1394_alloc_isoch_cec()
2003 s1394_hal_t *hal; in t1394_free_isoch_cec() local
2012 hal = ((s1394_target_t *)t1394_hdl)->on_hal; in t1394_free_isoch_cec()
2045 mutex_enter(&hal->isoch_cec_list_mutex); in t1394_free_isoch_cec()
2048 s1394_isoch_cec_list_remove(hal, cec_curr); in t1394_free_isoch_cec()
2050 mutex_exit(&hal->isoch_cec_list_mutex); in t1394_free_isoch_cec()
2095 s1394_hal_t *hal; in t1394_join_isoch_cec() local
2107 hal = ((s1394_target_t *)t1394_hdl)->on_hal; in t1394_join_isoch_cec()
2209 s1394_isoch_cec_member_list_insert(hal, cec_curr, member_new); in t1394_join_isoch_cec()
2259 s1394_hal_t *hal; in t1394_leave_isoch_cec() local
2273 hal = ((s1394_target_t *)t1394_hdl)->on_hal; in t1394_leave_isoch_cec()
2336 s1394_isoch_cec_member_list_remove(hal, cec_curr, member_temp); in t1394_leave_isoch_cec()
2390 s1394_hal_t *hal; in t1394_setup_isoch_cec() local
2412 hal = ((s1394_target_t *)t1394_hdl)->on_hal; in t1394_setup_isoch_cec()
2455 generation = hal->generation_count; in t1394_setup_isoch_cec()
2458 bw_alloc_units = s1394_compute_bw_alloc_units(hal, in t1394_setup_isoch_cec()
2463 if (generation != hal->generation_count) in t1394_setup_isoch_cec()
2470 ret = s1394_bandwidth_alloc(hal, bw_alloc_units, generation, in t1394_setup_isoch_cec()
2495 if (generation != hal->generation_count) in t1394_setup_isoch_cec()
2521 ret = s1394_channel_alloc(hal, in t1394_setup_isoch_cec()
2526 ret = s1394_channel_alloc(hal, in t1394_setup_isoch_cec()
2553 if (generation != hal->generation_count) in t1394_setup_isoch_cec()
2560 ret = s1394_bandwidth_free(hal, bw_alloc_units, in t1394_setup_isoch_cec()
2933 s1394_hal_t *hal; in t1394_teardown_isoch_cec() local
2950 hal = ((s1394_target_t *)t1394_hdl)->on_hal; in t1394_teardown_isoch_cec()
2999 generation = hal->generation_count; in t1394_teardown_isoch_cec()
3002 bw_alloc_units = s1394_compute_bw_alloc_units(hal, in t1394_teardown_isoch_cec()
3007 if (generation != hal->generation_count) in t1394_teardown_isoch_cec()
3014 ret = s1394_bandwidth_free(hal, bw_alloc_units, generation, &err); in t1394_teardown_isoch_cec()
3035 ret = s1394_channel_free(hal, chnl_mask, generation, in t1394_teardown_isoch_cec()
3038 ret = s1394_channel_free(hal, chnl_mask, generation, in t1394_teardown_isoch_cec()
3134 s1394_hal_t *hal; in t1394_alloc_isoch_dma() local
3145 hal = ((s1394_target_t *)t1394_hdl)->on_hal; in t1394_alloc_isoch_dma()
3174 ret = HAL_CALL(hal).alloc_isoch_dma(hal->halinfo.hal_private, idi, in t1394_alloc_isoch_dma()
3209 s1394_hal_t *hal; in t1394_free_isoch_dma() local
3218 hal = ((s1394_target_t *)t1394_hdl)->on_hal; in t1394_free_isoch_dma()
3221 HAL_CALL(hal).free_isoch_dma(hal->halinfo.hal_private, *t1394_idma_hdl); in t1394_free_isoch_dma()
3254 s1394_hal_t *hal; in t1394_start_isoch_dma() local
3265 hal = ((s1394_target_t *)t1394_hdl)->on_hal; in t1394_start_isoch_dma()
3267 ret = HAL_CALL(hal).start_isoch_dma(hal->halinfo.hal_private, in t1394_start_isoch_dma()
3293 s1394_hal_t *hal; in t1394_stop_isoch_dma() local
3303 hal = ((s1394_target_t *)t1394_hdl)->on_hal; in t1394_stop_isoch_dma()
3305 HAL_CALL(hal).stop_isoch_dma(hal->halinfo.hal_private, in t1394_stop_isoch_dma()
3337 s1394_hal_t *hal; in t1394_update_isoch_dma() local
3348 hal = ((s1394_target_t *)t1394_hdl)->on_hal; in t1394_update_isoch_dma()
3350 ret = HAL_CALL(hal).update_isoch_dma(hal->halinfo.hal_private, in t1394_update_isoch_dma()
3374 s1394_hal_t *hal; in t1394_initiate_bus_reset() local
3383 hal = ((s1394_target_t *)t1394_hdl)->on_hal; in t1394_initiate_bus_reset()
3386 if (hal->halinfo.phy == H1394_PHY_1394A) { in t1394_initiate_bus_reset()
3387 ret = HAL_CALL(hal).short_bus_reset(hal->halinfo.hal_private); in t1394_initiate_bus_reset()
3394 ret = HAL_CALL(hal).bus_reset(hal->halinfo.hal_private); in t1394_initiate_bus_reset()
3428 s1394_hal_t *hal; in t1394_get_topology_map() local
3438 hal = ((s1394_target_t *)t1394_hdl)->on_hal; in t1394_get_topology_map()
3441 mutex_enter(&hal->topology_tree_mutex); in t1394_get_topology_map()
3444 if (bus_generation != hal->generation_count) { in t1394_get_topology_map()
3446 mutex_exit(&hal->topology_tree_mutex); in t1394_get_topology_map()
3455 tm_ptr = (uint32_t *)hal->CSR_topology_map; in t1394_get_topology_map()
3463 mutex_exit(&hal->topology_tree_mutex); in t1394_get_topology_map()
3476 mutex_exit(&hal->topology_tree_mutex); in t1394_get_topology_map()
3535 s1394_hal_t *hal; in t1394_add_cfgrom_entry() local
3576 hal = target->on_hal; in t1394_add_cfgrom_entry()
3587 mutex_enter(&hal->local_config_rom_mutex); in t1394_add_cfgrom_entry()
3589 ret = s1394_add_config_rom_entry(hal, key, buffer, size, in t1394_add_cfgrom_entry()
3594 mutex_exit(&hal->local_config_rom_mutex); in t1394_add_cfgrom_entry()
3605 if (hal->config_rom_timer_set == B_FALSE) { in t1394_add_cfgrom_entry()
3606 hal->config_rom_timer_set = B_TRUE; in t1394_add_cfgrom_entry()
3607 mutex_exit(&hal->local_config_rom_mutex); in t1394_add_cfgrom_entry()
3608 hal->config_rom_timer = in t1394_add_cfgrom_entry()
3609 timeout(s1394_update_config_rom_callback, hal, in t1394_add_cfgrom_entry()
3612 mutex_exit(&hal->local_config_rom_mutex); in t1394_add_cfgrom_entry()
3639 s1394_hal_t *hal; in t1394_rem_cfgrom_entry() local
3651 hal = target->on_hal; in t1394_rem_cfgrom_entry()
3662 mutex_enter(&hal->local_config_rom_mutex); in t1394_rem_cfgrom_entry()
3664 ret = s1394_remove_config_rom_entry(hal, (void **)t1394_cfgrom_hdl, in t1394_rem_cfgrom_entry()
3667 mutex_exit(&hal->local_config_rom_mutex); in t1394_rem_cfgrom_entry()
3677 if (hal->config_rom_timer_set == B_FALSE) { in t1394_rem_cfgrom_entry()
3678 hal->config_rom_timer_set = B_TRUE; in t1394_rem_cfgrom_entry()
3679 mutex_exit(&hal->local_config_rom_mutex); in t1394_rem_cfgrom_entry()
3680 hal->config_rom_timer = in t1394_rem_cfgrom_entry()
3681 timeout(s1394_update_config_rom_callback, hal, in t1394_rem_cfgrom_entry()
3684 mutex_exit(&hal->local_config_rom_mutex); in t1394_rem_cfgrom_entry()
3711 s1394_hal_t *hal; in t1394_get_targetinfo() local
3723 hal = ((s1394_target_t *)t1394_hdl)->on_hal; in t1394_get_targetinfo()
3728 mutex_enter(&hal->topology_tree_mutex); in t1394_get_targetinfo()
3731 if (bus_generation != hal->generation_count) { in t1394_get_targetinfo()
3733 mutex_exit(&hal->topology_tree_mutex); in t1394_get_targetinfo()
3737 tnf_uint, current_gen, hal->generation_count); in t1394_get_targetinfo()
3741 rw_enter(&hal->target_list_rwlock, RW_READER); in t1394_get_targetinfo()
3761 hal, from_node, to_node); in t1394_get_targetinfo()
3774 rw_exit(&hal->target_list_rwlock); in t1394_get_targetinfo()
3776 mutex_exit(&hal->topology_tree_mutex); in t1394_get_targetinfo()