Lines Matching refs:pCmd
63 static void HPTLIBAPI thread_io_done(_VBUS_ARG PCommand pCmd);
64 static int HPTLIBAPI R1ControlSgl(_VBUS_ARG PCommand pCmd,
617 R1ControlSgl(_VBUS_ARG PCommand pCmd, FPSCAT_GATH pSgTable, int logical) in R1ControlSgl() argument
619 ULONG bufferSize = SECTOR_TO_BYTE(pCmd->uCmd.R1Control.nSectors); in R1ControlSgl()
620 if (pCmd->uCmd.R1Control.Command==CTRL_CMD_VERIFY) in R1ControlSgl()
623 pSgTable->dSgAddress = (ULONG_PTR)pCmd->uCmd.R1Control.Buffer; in R1ControlSgl()
633 v = pCmd->uCmd.R1Control.Buffer; in R1ControlSgl()
681 thread_io_done(_VBUS_ARG PCommand pCmd) in thread_io_done() argument
684 wakeup((caddr_t)pCmd); in thread_io_done()
691 PCommand pCmd; in hpt_rebuild_data_block() local
736 pCmd = AllocateCommand(_VBUS_P0); in hpt_rebuild_data_block()
737 HPT_ASSERT(pCmd); in hpt_rebuild_data_block()
738 pCmd->cf_control = 1; in hpt_rebuild_data_block()
748 FreeCommand(_VBUS_P pCmd); in hpt_rebuild_data_block()
755 pCmd->uCmd.R1Control.Command = CTRL_CMD_REBUILD; in hpt_rebuild_data_block()
756 pCmd->uCmd.R1Control.nSectors = MAX_REBUILD_SECTORS; in hpt_rebuild_data_block()
760 pCmd->uCmd.R1Control.Command = CTRL_CMD_VERIFY; in hpt_rebuild_data_block()
761 pCmd->uCmd.R1Control.nSectors = MAX_REBUILD_SECTORS/2; in hpt_rebuild_data_block()
765 pCmd->uCmd.R1Control.Command = CTRL_CMD_REBUILD; in hpt_rebuild_data_block()
766 pCmd->uCmd.R1Control.nSectors = MAX_REBUILD_SECTORS; in hpt_rebuild_data_block()
770 pCmd->uCmd.R1Control.Lba = pArray->u.array.RebuildSectors; in hpt_rebuild_data_block()
772 if (capacity - pArray->u.array.RebuildSectors < pCmd->uCmd.R1Control.nSectors) in hpt_rebuild_data_block()
773 pCmd->uCmd.R1Control.nSectors = capacity - pArray->u.array.RebuildSectors; in hpt_rebuild_data_block()
775 pCmd->uCmd.R1Control.Buffer = buffer; in hpt_rebuild_data_block()
776 pCmd->pfnBuildSgl = R1ControlSgl; in hpt_rebuild_data_block()
784 pCmd->uCmd.R5Control.Command = CTRL_CMD_REBUILD; break; in hpt_rebuild_data_block()
786 pCmd->uCmd.R5Control.Command = CTRL_CMD_VERIFY; break; in hpt_rebuild_data_block()
788 pCmd->uCmd.R5Control.Command = CTRL_CMD_INIT; break; in hpt_rebuild_data_block()
790 pCmd->uCmd.R5Control.StripeLine=pArray->u.array.RebuildSectors>>pArray->u.array.bArBlockSizeShift; in hpt_rebuild_data_block()
795 pCmd->pVDevice = pArray; in hpt_rebuild_data_block()
796 pCmd->pfnCompletion = thread_io_done; in hpt_rebuild_data_block()
797 pArray->pfnSendCommand(_VBUS_P pCmd); in hpt_rebuild_data_block()
801 mtx_sleep(pCmd, &pAdapter->lock, 0, "hptrbld", hz * 60); in hpt_rebuild_data_block()
808 result = pCmd->Result; in hpt_rebuild_data_block()
809 FreeCommand(_VBUS_P pCmd); in hpt_rebuild_data_block()