Lines Matching refs:pCmd

65 static void HPTLIBAPI thread_io_done(_VBUS_ARG PCommand pCmd);
66 static int HPTLIBAPI R1ControlSgl(_VBUS_ARG PCommand pCmd,
619 R1ControlSgl(_VBUS_ARG PCommand pCmd, FPSCAT_GATH pSgTable, int logical) in R1ControlSgl() argument
621 ULONG bufferSize = SECTOR_TO_BYTE(pCmd->uCmd.R1Control.nSectors); in R1ControlSgl()
622 if (pCmd->uCmd.R1Control.Command==CTRL_CMD_VERIFY) in R1ControlSgl()
625 pSgTable->dSgAddress = (ULONG_PTR)pCmd->uCmd.R1Control.Buffer; in R1ControlSgl()
635 v = pCmd->uCmd.R1Control.Buffer; in R1ControlSgl()
683 thread_io_done(_VBUS_ARG PCommand pCmd) in thread_io_done() argument
686 wakeup((caddr_t)pCmd); in thread_io_done()
693 PCommand pCmd; in hpt_rebuild_data_block() local
738 pCmd = AllocateCommand(_VBUS_P0); in hpt_rebuild_data_block()
739 HPT_ASSERT(pCmd); in hpt_rebuild_data_block()
740 pCmd->cf_control = 1; in hpt_rebuild_data_block()
750 FreeCommand(_VBUS_P pCmd); in hpt_rebuild_data_block()
757 pCmd->uCmd.R1Control.Command = CTRL_CMD_REBUILD; in hpt_rebuild_data_block()
758 pCmd->uCmd.R1Control.nSectors = MAX_REBUILD_SECTORS; in hpt_rebuild_data_block()
762 pCmd->uCmd.R1Control.Command = CTRL_CMD_VERIFY; in hpt_rebuild_data_block()
763 pCmd->uCmd.R1Control.nSectors = MAX_REBUILD_SECTORS/2; in hpt_rebuild_data_block()
767 pCmd->uCmd.R1Control.Command = CTRL_CMD_REBUILD; in hpt_rebuild_data_block()
768 pCmd->uCmd.R1Control.nSectors = MAX_REBUILD_SECTORS; in hpt_rebuild_data_block()
772 pCmd->uCmd.R1Control.Lba = pArray->u.array.RebuildSectors; in hpt_rebuild_data_block()
774 if (capacity - pArray->u.array.RebuildSectors < pCmd->uCmd.R1Control.nSectors) in hpt_rebuild_data_block()
775 pCmd->uCmd.R1Control.nSectors = capacity - pArray->u.array.RebuildSectors; in hpt_rebuild_data_block()
777 pCmd->uCmd.R1Control.Buffer = buffer; in hpt_rebuild_data_block()
778 pCmd->pfnBuildSgl = R1ControlSgl; in hpt_rebuild_data_block()
786 pCmd->uCmd.R5Control.Command = CTRL_CMD_REBUILD; break; in hpt_rebuild_data_block()
788 pCmd->uCmd.R5Control.Command = CTRL_CMD_VERIFY; break; in hpt_rebuild_data_block()
790 pCmd->uCmd.R5Control.Command = CTRL_CMD_INIT; break; in hpt_rebuild_data_block()
792 pCmd->uCmd.R5Control.StripeLine=pArray->u.array.RebuildSectors>>pArray->u.array.bArBlockSizeShift; in hpt_rebuild_data_block()
797 pCmd->pVDevice = pArray; in hpt_rebuild_data_block()
798 pCmd->pfnCompletion = thread_io_done; in hpt_rebuild_data_block()
799 pArray->pfnSendCommand(_VBUS_P pCmd); in hpt_rebuild_data_block()
803 mtx_sleep(pCmd, &pAdapter->lock, 0, "hptrbld", hz * 60); in hpt_rebuild_data_block()
810 result = pCmd->Result; in hpt_rebuild_data_block()
811 FreeCommand(_VBUS_P pCmd); in hpt_rebuild_data_block()