Lines Matching +full:true +full:- +full:ide
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
51 for (him = him_list; him; him = him->next) { in hpt_match()
52 for (i=0; him->get_supported_device_id(i, &pci_id); i++) { in hpt_match()
71 device_set_desc(dev, him->name); in hpt_probe()
90 hba->ext_type = EXT_TYPE_HBA; in hpt_attach()
91 hba->ldm_adapter.him = him; in hpt_attach()
99 size = him->get_adapter_size(&pci_id); 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()
120 vbus_ext->ext_type = EXT_TYPE_VBUS; in hpt_attach()
121 ldm_create_vbus((PVBUS)vbus_ext->vbus, vbus_ext); 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()
142 /* don't use low memory - other devices may get starved */ in __get_free_pages()
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()
162 ldm_get_mem_info((PVBUS)vbus_ext->vbus, 0); in hpt_alloc_mem()
164 for (f=vbus_ext->freelist_head; f; f=f->next) { in hpt_alloc_mem()
166 f->tag, f->count, f->size, f->count*f->size)); in hpt_alloc_mem()
167 for (i=0; i<f->count; i++) { in hpt_alloc_mem()
168 p = (void **)malloc(f->size, M_DEVBUF, M_WAITOK); in hpt_alloc_mem()
170 *p = f->head; in hpt_alloc_mem()
171 f->head = p; in hpt_alloc_mem()
175 for (f=vbus_ext->freelist_dma_head; f; f=f->next) { in hpt_alloc_mem()
178 HPT_ASSERT((f->size & (f->alignment-1))==0); in hpt_alloc_mem()
180 for (order=0, size=PAGE_SIZE; size<f->size; order++, size<<=1) in hpt_alloc_mem()
184 f->tag, f->count, f->size, f->count*f->size, order)); in hpt_alloc_mem()
185 HPT_ASSERT(f->alignment<=PAGE_SIZE); in hpt_alloc_mem()
187 for (i=0; i<f->count;) { in hpt_alloc_mem()
189 if (!p) return -1; in hpt_alloc_mem()
190 for (j = size/f->size; j && i<f->count; i++,j--) { in hpt_alloc_mem()
191 *p = f->head; in hpt_alloc_mem()
193 f->head = p; in hpt_alloc_mem()
194 p = (void **)((unsigned long)p + f->size); in hpt_alloc_mem()
203 if (!p) return -1; in hpt_alloc_mem()
204 HPT_ASSERT(((HPT_UPTR)p & (DMAPOOL_PAGE_SIZE-1))==0); in hpt_alloc_mem()
205 dmapool_put_page((PVBUS)vbus_ext->vbus, p, (BUS_ADDRESS)vtophys(p)); in hpt_alloc_mem()
218 for (f=vbus_ext->freelist_head; f; f=f->next) { in hpt_free_mem()
220 if (f->count!=f->reserved_count) { in hpt_free_mem()
221 KdPrint(("memory leak for freelist %s (%d/%d)", f->tag, f->count, f->reserved_count)); in hpt_free_mem()
229 p = dmapool_get_page((PVBUS)vbus_ext->vbus, &bus); in hpt_free_mem()
234 for (f=vbus_ext->freelist_dma_head; f; f=f->next) { in hpt_free_mem()
237 if (f->count!=f->reserved_count) { in hpt_free_mem()
238 KdPrint(("memory leak for dma freelist %s (%d/%d)", f->tag, f->count, f->reserved_count)); in hpt_free_mem()
241 for (order=0, size=PAGE_SIZE; size<f->size; order++, size<<=1) ; in hpt_free_mem()
248 if (((HPT_UPTR)p & (PAGE_SIZE-1))==0) in hpt_free_mem()
249 dmapool_put_page((PVBUS)vbus_ext->vbus, p, bus); in hpt_free_mem()
254 while ((p = dmapool_get_page((PVBUS)vbus_ext->vbus, &bus))) in hpt_free_mem()
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()
265 return -1; in hpt_init_vbus()
268 ldm_initialize_vbus((PVBUS)vbus_ext->vbus, &vbus_ext->hba_list->ldm_adapter); in hpt_init_vbus()
274 PVDEV vd = pCmd->target; in hpt_flush_done()
276 if (mIsArray(vd->type) && vd->u.array.transform && vd!=vd->u.array.transform->target) { in hpt_flush_done()
277 vd = vd->u.array.transform->target; in hpt_flush_done()
279 pCmd->target = vd; in hpt_flush_done()
280 pCmd->Result = RETURN_PENDING; in hpt_flush_done()
285 *(int *)pCmd->priv = 1; in hpt_flush_done()
302 if (mIsArray(vd->type) && vd->u.array.transform) in hpt_flush_vdev()
303 count = max(vd->u.array.transform->source->cmds_per_request, in hpt_flush_vdev()
304 vd->u.array.transform->target->cmds_per_request); in hpt_flush_vdev()
306 count = vd->cmds_per_request; in hpt_flush_vdev()
308 pCmd = ldm_alloc_cmds(vd->vbus, count); in hpt_flush_vdev()
311 return -1; in hpt_flush_vdev()
314 pCmd->type = CMD_TYPE_FLUSH; in hpt_flush_vdev()
315 pCmd->flags.hard_flush = 1; in hpt_flush_vdev()
316 pCmd->target = vd; in hpt_flush_vdev()
317 pCmd->done = hpt_flush_done; in hpt_flush_vdev()
319 pCmd->priv = &done; in hpt_flush_vdev()
325 ldm_reset_vbus(vd->vbus); in hpt_flush_vdev()
329 KdPrint(("flush result %d", pCmd->Result)); in hpt_flush_vdev()
331 if (pCmd->Result!=RETURN_SUCCESS) in hpt_flush_vdev()
332 result = -1; in hpt_flush_vdev()
342 PVBUS vbus = (PVBUS)vbus_ext->vbus; in hpt_shutdown_vbus()
351 vbus_ext->worker.ta_context = 0; in hpt_shutdown_vbus()
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()
378 callout_drain(&vbus_ext->timer); in hpt_shutdown_vbus()
379 mtx_destroy(&vbus_ext->lock); in hpt_shutdown_vbus()
388 tasks = vbus_ext->tasks; in __hpt_do_tasks()
389 vbus_ext->tasks = 0; in __hpt_do_tasks()
393 tasks = t->next; in __hpt_do_tasks()
394 t->next = 0; in __hpt_do_tasks()
395 t->func(vbus_ext->vbus, t->data); in __hpt_do_tasks()
415 POS_CMDEXT p = vbus_ext->cmdext_list; in cmdext_get()
417 vbus_ext->cmdext_list = p->next; in cmdext_get()
423 p->next = p->vbus_ext->cmdext_list; in cmdext_put()
424 p->vbus_ext->cmdext_list = p; in cmdext_put()
430 POS_CMDEXT ext = (POS_CMDEXT)pCmd->priv; in hpt_timeout()
434 ldm_reset_vbus((PVBUS)ext->vbus_ext->vbus); in hpt_timeout()
439 POS_CMDEXT ext = (POS_CMDEXT)pCmd->priv; in os_cmddone()
440 union ccb *ccb = ext->ccb; in os_cmddone()
442 KdPrint(("os_cmddone(%p, %d)", pCmd, pCmd->Result)); in os_cmddone()
444 callout_stop(&ext->timeout); in os_cmddone()
446 switch(pCmd->Result) { in os_cmddone()
448 ccb->ccb_h.status = CAM_REQ_CMP; in os_cmddone()
451 ccb->ccb_h.status = CAM_DEV_NOT_THERE; in os_cmddone()
454 ccb->ccb_h.status = CAM_BUSY; in os_cmddone()
457 ccb->ccb_h.status = CAM_REQ_INVALID; in os_cmddone()
460 ccb->ccb_h.status = CAM_SEL_TIMEOUT; in os_cmddone()
463 ccb->ccb_h.status = CAM_BUSY; in os_cmddone()
466 ccb->ccb_h.status = CAM_AUTOSENSE_FAIL; in os_cmddone()
470 if (pCmd->flags.data_in) { in os_cmddone()
471 bus_dmamap_sync(ext->vbus_ext->io_dmat, ext->dma_map, BUS_DMASYNC_POSTREAD); in os_cmddone()
473 else if (pCmd->flags.data_out) { in os_cmddone()
474 bus_dmamap_sync(ext->vbus_ext->io_dmat, ext->dma_map, BUS_DMASYNC_POSTWRITE); in os_cmddone()
477 bus_dmamap_unload(ext->vbus_ext->io_dmat, ext->dma_map); in os_cmddone()
486 POS_CMDEXT ext = (POS_CMDEXT)pCmd->priv; in os_buildsgl()
487 union ccb *ccb = ext->ccb; in os_buildsgl()
490 os_set_sgptr(pSg, (HPT_U8 *)ccb->csio.data_ptr); in os_buildsgl()
491 pSg->size = ccb->csio.dxfer_len; in os_buildsgl()
492 pSg->eot = 1; in os_buildsgl()
493 return TRUE; in os_buildsgl()
504 POS_CMDEXT ext = (POS_CMDEXT)pCmd->priv; in hpt_io_dmamap_callback()
505 PSG psg = pCmd->psg; in hpt_io_dmamap_callback()
508 HPT_ASSERT(pCmd->flags.physical_sg); in hpt_io_dmamap_callback()
517 psg->addr.bus = segs[idx].ds_addr; in hpt_io_dmamap_callback()
518 psg->size = segs[idx].ds_len; in hpt_io_dmamap_callback()
519 psg->eot = 0; in hpt_io_dmamap_callback()
521 psg[-1].eot = 1; in hpt_io_dmamap_callback()
523 if (pCmd->flags.data_in) { in hpt_io_dmamap_callback()
524 bus_dmamap_sync(ext->vbus_ext->io_dmat, ext->dma_map, in hpt_io_dmamap_callback()
527 else if (pCmd->flags.data_out) { in hpt_io_dmamap_callback()
528 bus_dmamap_sync(ext->vbus_ext->io_dmat, ext->dma_map, in hpt_io_dmamap_callback()
532 callout_reset(&ext->timeout, HPT_OSM_TIMEOUT, hpt_timeout, pCmd); in hpt_io_dmamap_callback()
538 PVBUS vbus = (PVBUS)vbus_ext->vbus; in hpt_scsi_io()
544 if (ccb->ccb_h.flags & CAM_CDB_POINTER) in hpt_scsi_io()
545 cdb = ccb->csio.cdb_io.cdb_ptr; in hpt_scsi_io()
547 cdb = ccb->csio.cdb_io.cdb_bytes; in hpt_scsi_io()
549 KdPrint(("hpt_scsi_io: ccb %x id %d lun %d cdb %x-%x-%x", in hpt_scsi_io()
551 ccb->ccb_h.target_id, ccb->ccb_h.target_lun, in hpt_scsi_io()
555 /* ccb->ccb_h.path_id is not our bus id - don't check it */ in hpt_scsi_io()
556 if (ccb->ccb_h.target_lun != 0 || in hpt_scsi_io()
557 ccb->ccb_h.target_id >= osm_max_targets || in hpt_scsi_io()
558 (ccb->ccb_h.flags & CAM_CDB_PHYS)) in hpt_scsi_io()
560 ccb->ccb_h.status = CAM_SEL_TIMEOUT; in hpt_scsi_io()
565 vd = ldm_find_target(vbus, ccb->ccb_h.target_id); in hpt_scsi_io()
568 ccb->ccb_h.status = CAM_SEL_TIMEOUT; in hpt_scsi_io()
577 ccb->ccb_h.status = CAM_REQ_CMP; in hpt_scsi_io()
583 memset(ccb->csio.data_ptr, 0, ccb->csio.dxfer_len); in hpt_scsi_io()
584 inquiryData = (PINQUIRYDATA)ccb->csio.data_ptr; in hpt_scsi_io()
586 inquiryData->AdditionalLength = 31; in hpt_scsi_io()
587 inquiryData->CommandQueue = 1; in hpt_scsi_io()
588 memcpy(&inquiryData->VendorId, "HPT ", 8); in hpt_scsi_io()
589 memcpy(&inquiryData->ProductId, "DISK 0_0 ", 16); in hpt_scsi_io()
591 if (vd->target_id / 10) { in hpt_scsi_io()
592 inquiryData->ProductId[7] = (vd->target_id % 100) / 10 + '0'; in hpt_scsi_io()
593 inquiryData->ProductId[8] = (vd->target_id % 100) % 10 + '0'; in hpt_scsi_io()
596 inquiryData->ProductId[7] = (vd->target_id % 100) % 10 + '0'; in hpt_scsi_io()
598 memcpy(&inquiryData->ProductRevisionLevel, "4.00", 4); in hpt_scsi_io()
600 ccb->ccb_h.status = CAM_REQ_CMP; in hpt_scsi_io()
606 HPT_U8 *rbuf = ccb->csio.data_ptr; in hpt_scsi_io()
609 if (vd->capacity>0xfffffffful) in hpt_scsi_io()
612 cap = vd->capacity - 1; in hpt_scsi_io()
623 ccb->ccb_h.status = CAM_REQ_CMP; in hpt_scsi_io()
629 HPT_U8 *rbuf = ccb->csio.data_ptr; in hpt_scsi_io()
630 HPT_U64 cap = vd->capacity - 1; in hpt_scsi_io()
645 ccb->ccb_h.status = CAM_REQ_CMP; in hpt_scsi_io()
660 pCmd = ldm_alloc_cmds(vbus, vd->cmds_per_request); in hpt_scsi_io()
663 ccb->ccb_h.status = CAM_BUSY; in hpt_scsi_io()
671 pCmd->uCmd.Ide.Lba = ((HPT_U32)cdb[1] << 16) | ((HPT_U32)cdb[2] << 8) | (HPT_U32)cdb[3]; in hpt_scsi_io()
672 pCmd->uCmd.Ide.nSectors = (HPT_U16) cdb[4]; in hpt_scsi_io()
686 pCmd->uCmd.Ide.Lba = block; in hpt_scsi_io()
687 pCmd->uCmd.Ide.nSectors = (HPT_U16)cdb[13] | ((HPT_U16)cdb[12]<<8); in hpt_scsi_io()
692 …pCmd->uCmd.Ide.Lba = (HPT_U32)cdb[5] | ((HPT_U32)cdb[4] << 8) | ((HPT_U32)cdb[3] << 16) | ((HPT_U3… in hpt_scsi_io()
693 pCmd->uCmd.Ide.nSectors = (HPT_U16) cdb[8] | ((HPT_U16)cdb[7]<<8); in hpt_scsi_io()
701 pCmd->flags.data_in = 1; in hpt_scsi_io()
706 pCmd->flags.data_out = 1; in hpt_scsi_io()
709 pCmd->priv = ext = cmdext_get(vbus_ext); in hpt_scsi_io()
711 ext->ccb = ccb; in hpt_scsi_io()
712 pCmd->target = vd; in hpt_scsi_io()
713 pCmd->done = os_cmddone; in hpt_scsi_io()
714 pCmd->buildsgl = os_buildsgl; in hpt_scsi_io()
715 pCmd->psg = ext->psg; in hpt_scsi_io()
716 pCmd->flags.physical_sg = 1; in hpt_scsi_io()
717 error = bus_dmamap_load_ccb(vbus_ext->io_dmat, in hpt_scsi_io()
718 ext->dma_map, in hpt_scsi_io()
728 ccb->ccb_h.status = CAM_REQ_CMP_ERR; in hpt_scsi_io()
735 ccb->ccb_h.status = CAM_REQ_INVALID; in hpt_scsi_io()
747 KdPrint(("hpt_action(fn=%d, id=%d)", ccb->ccb_h.func_code, ccb->ccb_h.target_id)); in hpt_action()
750 switch (ccb->ccb_h.func_code) { in hpt_action()
757 ldm_reset_vbus((PVBUS)vbus_ext->vbus); in hpt_action()
762 ccb->ccb_h.status = CAM_FUNC_NOTAVAIL; in hpt_action()
766 cam_calc_geometry(&ccb->ccg, 1); in hpt_action()
771 struct ccb_pathinq *cpi = &ccb->cpi; in hpt_action()
773 cpi->version_num = 1; in hpt_action()
774 cpi->hba_inquiry = PI_SDTR_ABLE; in hpt_action()
775 cpi->target_sprt = 0; in hpt_action()
776 cpi->hba_misc = PIM_NOBUSRESET; in hpt_action()
777 cpi->hba_eng_cnt = 0; in hpt_action()
778 cpi->max_target = osm_max_targets; in hpt_action()
779 cpi->max_lun = 0; in hpt_action()
780 cpi->unit_number = cam_sim_unit(sim); in hpt_action()
781 cpi->bus_id = cam_sim_bus(sim); in hpt_action()
782 cpi->initiator_id = osm_max_targets; in hpt_action()
783 cpi->base_transfer_speed = 3300; in hpt_action()
785 strlcpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN); in hpt_action()
786 strlcpy(cpi->hba_vid, "HPT ", HBA_IDLEN); in hpt_action()
787 strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); in hpt_action()
788 cpi->transport = XPORT_SPI; in hpt_action()
789 cpi->transport_version = 2; in hpt_action()
790 cpi->protocol = PROTO_SCSI; in hpt_action()
791 cpi->protocol_version = SCSI_REV_2; in hpt_action()
792 cpi->ccb_h.status = CAM_REQ_CMP; in hpt_action()
797 ccb->ccb_h.status = CAM_REQ_INVALID; in hpt_action()
809 ldm_intr((PVBUS)vbus_ext->vbus); in hpt_pci_intr()
817 ldm_intr((PVBUS)vbus_ext->vbus); in hpt_poll()
839 arg->ioctl_cmnd = 0; in hpt_ioctl_done()
845 ioctl_args->result = -1; in __hpt_do_ioctl()
846 ioctl_args->done = hpt_ioctl_done; in __hpt_do_ioctl()
847 ioctl_args->ioctl_cmnd = (void *)1; in __hpt_do_ioctl()
850 ldm_ioctl((PVBUS)vbus_ext->vbus, ioctl_args); in __hpt_do_ioctl()
852 while (ioctl_args->ioctl_cmnd) { in __hpt_do_ioctl()
855 ldm_reset_vbus((PVBUS)vbus_ext->vbus); in __hpt_do_ioctl()
859 /* KdPrint(("ioctl %x result %d", ioctl_args->dwIoControlCode, ioctl_args->result)); */ in __hpt_do_ioctl()
871 if (ioctl_args->result!=HPT_IOCTL_RESULT_WRONG_VBUS) in hpt_do_ioctl()
893 HPT_U32 count = nMaxCount-1; in hpt_get_logical_devices()
897 return -1; in hpt_get_logical_devices()
918 return -1; in __hpt_stop_tasks()
921 return -1; in __hpt_stop_tasks()
932 return -1; in __hpt_stop_tasks()
1003 mtx_init(&vbus_ext->lock, "hptsleeplock", NULL, MTX_DEF); in hpt_final_init()
1004 callout_init_mtx(&vbus_ext->timer, &vbus_ext->lock, 0); in hpt_final_init()
1022 PAGE_SIZE * (os_max_sg_descriptors-1), /* maxsize */ in hpt_final_init()
1027 &vbus_ext->lock, /* lockfuncarg */ in hpt_final_init()
1028 &vbus_ext->io_dmat /* tag */)) in hpt_final_init()
1035 ext->vbus_ext = vbus_ext; in hpt_final_init()
1036 ext->next = vbus_ext->cmdext_list; in hpt_final_init()
1037 vbus_ext->cmdext_list = ext; in hpt_final_init()
1039 if (bus_dmamap_create(vbus_ext->io_dmat, 0, &ext->dma_map)) { in hpt_final_init()
1043 callout_init_mtx(&ext->timeout, &vbus_ext->lock, 0); in hpt_final_init()
1051 vbus_ext->sim = cam_sim_alloc(hpt_action, hpt_poll, driver_name, in hpt_final_init()
1052 vbus_ext, 0, &vbus_ext->lock, os_max_queue_comm, in hpt_final_init()
1055 if (!vbus_ext->sim) { in hpt_final_init()
1062 if (xpt_bus_register(vbus_ext->sim, NULL, 0) != CAM_SUCCESS) { in hpt_final_init()
1064 cam_sim_free(vbus_ext->sim, /*free devq*/ TRUE); in hpt_final_init()
1066 vbus_ext->sim = NULL; in hpt_final_init()
1070 if (xpt_create_path(&vbus_ext->path, /*periph */ NULL, in hpt_final_init()
1071 cam_sim_path(vbus_ext->sim), CAM_TARGET_WILDCARD, in hpt_final_init()
1075 xpt_bus_deregister(cam_sim_path(vbus_ext->sim)); in hpt_final_init()
1076 cam_sim_free(vbus_ext->sim, /*free_devq*/TRUE); in hpt_final_init()
1078 vbus_ext->sim = NULL; in hpt_final_init()
1084 xpt_setup_ccb(&ccb.ccb_h, vbus_ext->path, /*priority*/5); in hpt_final_init()
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()
1109 vbus_ext->shutdown_eh = EVENTHANDLER_REGISTER(shutdown_final, in hpt_final_init()
1111 if (!vbus_ext->shutdown_eh) in hpt_final_init()
1116 TASK_INIT(&vbus_ext->worker, 0, (task_fn_t *)hpt_do_tasks, vbus_ext); in hpt_final_init()
1117 if (vbus_ext->tasks) in hpt_final_init()
1118 TASK_ENQUEUE(&vbus_ext->worker); in hpt_final_init()
1151 dlfirst = TAILQ_FIRST(&dc->drivers); in override_kernel_driver()
1153 if(strcmp(dl->driver->name, driver_name) == 0) { in override_kernel_driver()
1154 tmpdriver=dl->driver; in override_kernel_driver()
1155 dl->driver=dlfirst->driver; in override_kernel_driver()
1156 dlfirst->driver=tmpdriver; in override_kernel_driver()
1234 if (piop->Magic == HPT_IOCTL_MAGIC || piop->Magic == HPT_IOCTL_MAGIC32) { in hpt_ioctl()
1236 piop->dwIoControlCode, in hpt_ioctl()
1237 piop->lpInBuffer, in hpt_ioctl()
1238 piop->nInBufferSize, in hpt_ioctl()
1239 piop->lpOutBuffer, in hpt_ioctl()
1240 piop->nOutBufferSize)); in hpt_ioctl()
1244 ioctl_args.dwIoControlCode = piop->dwIoControlCode; in hpt_ioctl()
1245 ioctl_args.nInBufferSize = piop->nInBufferSize; in hpt_ioctl()
1246 ioctl_args.nOutBufferSize = piop->nOutBufferSize; in hpt_ioctl()
1251 if (copyin((void*)piop->lpInBuffer, in hpt_ioctl()
1252 ioctl_args.lpInBuffer, piop->nInBufferSize)) in hpt_ioctl()
1262 if (piop->nOutBufferSize) { in hpt_ioctl()
1264 (void*)piop->lpOutBuffer, piop->nOutBufferSize)) in hpt_ioctl()
1267 if (piop->lpBytesReturned) { in hpt_ioctl()
1269 (void*)piop->lpBytesReturned, sizeof(HPT_U32))) in hpt_ioctl()
1304 if (xpt_create_path(&ccb->ccb_h.path, NULL, in hpt_rescan_bus()
1305 cam_sim_path(vbus_ext->sim), in hpt_rescan_bus()