Lines Matching refs:hba
80 PHBA hba = (PHBA)device_get_softc(dev); in hpt_attach() local
90 hba->ext_type = EXT_TYPE_HBA; in hpt_attach()
91 hba->ldm_adapter.him = him; in hpt_attach()
100 hba->ldm_adapter.him_handle = malloc(size, M_DEVBUF, M_WAITOK); in hpt_attach()
102 hba->pcidev = dev; in hpt_attach()
103 hba->pciaddr.tree = 0; in hpt_attach()
104 hba->pciaddr.bus = pci_get_bus(dev); in hpt_attach()
105 hba->pciaddr.device = pci_get_slot(dev); in hpt_attach()
106 hba->pciaddr.function = pci_get_function(dev); in hpt_attach()
108 if (!him->create_adapter(&pci_id, hba->pciaddr, hba->ldm_adapter.him_handle, hba)) { in hpt_attach()
109 free(hba->ldm_adapter.him_handle, M_DEVBUF); in hpt_attach()
114 hba->pciaddr.bus, hba->pciaddr.device, hba->pciaddr.function, pci_get_irq(dev)); in hpt_attach()
116 if (!ldm_register_adapter(&hba->ldm_adapter)) { in hpt_attach()
122 ldm_register_adapter(&hba->ldm_adapter); in hpt_attach()
126 if (hba->ldm_adapter.vbus==vbus) { in hpt_attach()
127 hba->vbus_ext = vbus_ext; in hpt_attach()
128 hba->next = vbus_ext->hba_list; in hpt_attach()
129 vbus_ext->hba_list = hba; in hpt_attach()
154 PHBA hba; in hpt_alloc_mem() local
159 for (hba = vbus_ext->hba_list; hba; hba = hba->next) in hpt_alloc_mem()
160 hba->ldm_adapter.him->get_meminfo(hba->ldm_adapter.him_handle); in hpt_alloc_mem()
260 PHBA hba; in hpt_init_vbus() local
262 for (hba = vbus_ext->hba_list; hba; hba = hba->next) in hpt_init_vbus()
263 if (!hba->ldm_adapter.him->initialize(hba->ldm_adapter.him_handle)) { in hpt_init_vbus()
264 KdPrint(("fail to initialize %p", hba)); in hpt_init_vbus()
343 PHBA hba; in hpt_shutdown_vbus() local
368 for (hba=vbus_ext->hba_list; hba; hba=hba->next) in hpt_shutdown_vbus()
369 bus_teardown_intr(hba->pcidev, hba->irq_res, hba->irq_handle); in hpt_shutdown_vbus()
373 while ((hba=vbus_ext->hba_list)) { in hpt_shutdown_vbus()
374 vbus_ext->hba_list = hba->next; in hpt_shutdown_vbus()
375 free(hba->ldm_adapter.him_handle, M_DEVBUF); in hpt_shutdown_vbus()
979 PHBA hba; in hpt_final_init() local
1091 for (hba = vbus_ext->hba_list; hba; hba = hba->next) { in hpt_final_init()
1093 if ((hba->irq_res = bus_alloc_resource_any(hba->pcidev, in hpt_final_init()
1100 if (bus_setup_intr(hba->pcidev, hba->irq_res, INTR_TYPE_CAM | INTR_MPSAFE, in hpt_final_init()
1101 NULL, hpt_pci_intr, vbus_ext, &hba->irq_handle)) in hpt_final_init()
1106 hba->ldm_adapter.him->intr_control(hba->ldm_adapter.him_handle, HPT_TRUE); in hpt_final_init()