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