Lines Matching refs:Command

317       DAC960_Command_T *Command;  in DAC960_CreateAuxiliaryStructures()  local
331 Command = (DAC960_Command_T *) AllocationPointer; in DAC960_CreateAuxiliaryStructures()
333 Command->CommandIdentifier = CommandIdentifier; in DAC960_CreateAuxiliaryStructures()
334 Command->Controller = Controller; in DAC960_CreateAuxiliaryStructures()
335 Command->Next = Controller->FreeCommands; in DAC960_CreateAuxiliaryStructures()
336 Controller->FreeCommands = Command; in DAC960_CreateAuxiliaryStructures()
337 Controller->Commands[CommandIdentifier-1] = Command; in DAC960_CreateAuxiliaryStructures()
354 Command->cmd_sglist = Command->V1.ScatterList; in DAC960_CreateAuxiliaryStructures()
355 Command->V1.ScatterGatherList = in DAC960_CreateAuxiliaryStructures()
357 Command->V1.ScatterGatherListDMA = ScatterGatherDMA; in DAC960_CreateAuxiliaryStructures()
358 sg_init_table(Command->cmd_sglist, DAC960_V1_ScatterGatherLimit); in DAC960_CreateAuxiliaryStructures()
360 Command->cmd_sglist = Command->V2.ScatterList; in DAC960_CreateAuxiliaryStructures()
361 Command->V2.ScatterGatherList = in DAC960_CreateAuxiliaryStructures()
363 Command->V2.ScatterGatherListDMA = ScatterGatherDMA; in DAC960_CreateAuxiliaryStructures()
364 Command->V2.RequestSense = in DAC960_CreateAuxiliaryStructures()
366 Command->V2.RequestSenseDMA = RequestSenseDMA; in DAC960_CreateAuxiliaryStructures()
367 sg_init_table(Command->cmd_sglist, DAC960_V2_ScatterGatherLimit); in DAC960_CreateAuxiliaryStructures()
397 DAC960_Command_T *Command = Controller->Commands[i]; in DAC960_DestroyAuxiliaryStructures() local
399 if (Command == NULL) in DAC960_DestroyAuxiliaryStructures()
403 ScatterGatherCPU = (void *)Command->V1.ScatterGatherList; in DAC960_DestroyAuxiliaryStructures()
404 ScatterGatherDMA = Command->V1.ScatterGatherListDMA; in DAC960_DestroyAuxiliaryStructures()
408 ScatterGatherCPU = (void *)Command->V2.ScatterGatherList; in DAC960_DestroyAuxiliaryStructures()
409 ScatterGatherDMA = Command->V2.ScatterGatherListDMA; in DAC960_DestroyAuxiliaryStructures()
410 RequestSenseCPU = (void *)Command->V2.RequestSense; in DAC960_DestroyAuxiliaryStructures()
411 RequestSenseDMA = Command->V2.RequestSenseDMA; in DAC960_DestroyAuxiliaryStructures()
418 if ((Command->CommandIdentifier in DAC960_DestroyAuxiliaryStructures()
427 CommandGroup = Command; in DAC960_DestroyAuxiliaryStructures()
468 static inline void DAC960_V1_ClearCommand(DAC960_Command_T *Command) in DAC960_V1_ClearCommand() argument
470 DAC960_V1_CommandMailbox_T *CommandMailbox = &Command->V1.CommandMailbox; in DAC960_V1_ClearCommand()
472 Command->V1.CommandStatus = 0; in DAC960_V1_ClearCommand()
481 static inline void DAC960_V2_ClearCommand(DAC960_Command_T *Command) in DAC960_V2_ClearCommand() argument
483 DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox; in DAC960_V2_ClearCommand()
485 Command->V2.CommandStatus = 0; in DAC960_V2_ClearCommand()
499 DAC960_Command_T *Command = Controller->FreeCommands; in DAC960_AllocateCommand() local
500 if (Command == NULL) return NULL; in DAC960_AllocateCommand()
501 Controller->FreeCommands = Command->Next; in DAC960_AllocateCommand()
502 Command->Next = NULL; in DAC960_AllocateCommand()
503 return Command; in DAC960_AllocateCommand()
512 static inline void DAC960_DeallocateCommand(DAC960_Command_T *Command) in DAC960_DeallocateCommand() argument
514 DAC960_Controller_T *Controller = Command->Controller; in DAC960_DeallocateCommand()
516 Command->Request = NULL; in DAC960_DeallocateCommand()
517 Command->Next = Controller->FreeCommands; in DAC960_DeallocateCommand()
518 Controller->FreeCommands = Command; in DAC960_DeallocateCommand()
537 static void DAC960_GEM_QueueCommand(DAC960_Command_T *Command) in DAC960_GEM_QueueCommand() argument
539 DAC960_Controller_T *Controller = Command->Controller; in DAC960_GEM_QueueCommand()
541 DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox; in DAC960_GEM_QueueCommand()
545 CommandMailbox->Common.CommandIdentifier = Command->CommandIdentifier; in DAC960_GEM_QueueCommand()
566 static void DAC960_BA_QueueCommand(DAC960_Command_T *Command) in DAC960_BA_QueueCommand() argument
568 DAC960_Controller_T *Controller = Command->Controller; in DAC960_BA_QueueCommand()
570 DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox; in DAC960_BA_QueueCommand()
573 CommandMailbox->Common.CommandIdentifier = Command->CommandIdentifier; in DAC960_BA_QueueCommand()
591 static void DAC960_LP_QueueCommand(DAC960_Command_T *Command) in DAC960_LP_QueueCommand() argument
593 DAC960_Controller_T *Controller = Command->Controller; in DAC960_LP_QueueCommand()
595 DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox; in DAC960_LP_QueueCommand()
598 CommandMailbox->Common.CommandIdentifier = Command->CommandIdentifier; in DAC960_LP_QueueCommand()
617 static void DAC960_LA_QueueCommandDualMode(DAC960_Command_T *Command) in DAC960_LA_QueueCommandDualMode() argument
619 DAC960_Controller_T *Controller = Command->Controller; in DAC960_LA_QueueCommandDualMode()
621 DAC960_V1_CommandMailbox_T *CommandMailbox = &Command->V1.CommandMailbox; in DAC960_LA_QueueCommandDualMode()
624 CommandMailbox->Common.CommandIdentifier = Command->CommandIdentifier; in DAC960_LA_QueueCommandDualMode()
643 static void DAC960_LA_QueueCommandSingleMode(DAC960_Command_T *Command) in DAC960_LA_QueueCommandSingleMode() argument
645 DAC960_Controller_T *Controller = Command->Controller; in DAC960_LA_QueueCommandSingleMode()
647 DAC960_V1_CommandMailbox_T *CommandMailbox = &Command->V1.CommandMailbox; in DAC960_LA_QueueCommandSingleMode()
650 CommandMailbox->Common.CommandIdentifier = Command->CommandIdentifier; in DAC960_LA_QueueCommandSingleMode()
669 static void DAC960_PG_QueueCommandDualMode(DAC960_Command_T *Command) in DAC960_PG_QueueCommandDualMode() argument
671 DAC960_Controller_T *Controller = Command->Controller; in DAC960_PG_QueueCommandDualMode()
673 DAC960_V1_CommandMailbox_T *CommandMailbox = &Command->V1.CommandMailbox; in DAC960_PG_QueueCommandDualMode()
676 CommandMailbox->Common.CommandIdentifier = Command->CommandIdentifier; in DAC960_PG_QueueCommandDualMode()
695 static void DAC960_PG_QueueCommandSingleMode(DAC960_Command_T *Command) in DAC960_PG_QueueCommandSingleMode() argument
697 DAC960_Controller_T *Controller = Command->Controller; in DAC960_PG_QueueCommandSingleMode()
699 DAC960_V1_CommandMailbox_T *CommandMailbox = &Command->V1.CommandMailbox; in DAC960_PG_QueueCommandSingleMode()
702 CommandMailbox->Common.CommandIdentifier = Command->CommandIdentifier; in DAC960_PG_QueueCommandSingleMode()
720 static void DAC960_PD_QueueCommand(DAC960_Command_T *Command) in DAC960_PD_QueueCommand() argument
722 DAC960_Controller_T *Controller = Command->Controller; in DAC960_PD_QueueCommand()
724 DAC960_V1_CommandMailbox_T *CommandMailbox = &Command->V1.CommandMailbox; in DAC960_PD_QueueCommand()
725 CommandMailbox->Common.CommandIdentifier = Command->CommandIdentifier; in DAC960_PD_QueueCommand()
737 static void DAC960_P_QueueCommand(DAC960_Command_T *Command) in DAC960_P_QueueCommand() argument
739 DAC960_Controller_T *Controller = Command->Controller; in DAC960_P_QueueCommand()
741 DAC960_V1_CommandMailbox_T *CommandMailbox = &Command->V1.CommandMailbox; in DAC960_P_QueueCommand()
742 CommandMailbox->Common.CommandIdentifier = Command->CommandIdentifier; in DAC960_P_QueueCommand()
783 static void DAC960_ExecuteCommand(DAC960_Command_T *Command) in DAC960_ExecuteCommand() argument
785 DAC960_Controller_T *Controller = Command->Controller; in DAC960_ExecuteCommand()
788 Command->Completion = &Completion; in DAC960_ExecuteCommand()
791 DAC960_QueueCommand(Command); in DAC960_ExecuteCommand()
810 DAC960_Command_T *Command = DAC960_AllocateCommand(Controller); in DAC960_V1_ExecuteType3() local
811 DAC960_V1_CommandMailbox_T *CommandMailbox = &Command->V1.CommandMailbox; in DAC960_V1_ExecuteType3()
813 DAC960_V1_ClearCommand(Command); in DAC960_V1_ExecuteType3()
814 Command->CommandType = DAC960_ImmediateCommand; in DAC960_V1_ExecuteType3()
817 DAC960_ExecuteCommand(Command); in DAC960_V1_ExecuteType3()
818 CommandStatus = Command->V1.CommandStatus; in DAC960_V1_ExecuteType3()
819 DAC960_DeallocateCommand(Command); in DAC960_V1_ExecuteType3()
835 DAC960_Command_T *Command = DAC960_AllocateCommand(Controller); in DAC960_V1_ExecuteType3B() local
836 DAC960_V1_CommandMailbox_T *CommandMailbox = &Command->V1.CommandMailbox; in DAC960_V1_ExecuteType3B()
838 DAC960_V1_ClearCommand(Command); in DAC960_V1_ExecuteType3B()
839 Command->CommandType = DAC960_ImmediateCommand; in DAC960_V1_ExecuteType3B()
843 DAC960_ExecuteCommand(Command); in DAC960_V1_ExecuteType3B()
844 CommandStatus = Command->V1.CommandStatus; in DAC960_V1_ExecuteType3B()
845 DAC960_DeallocateCommand(Command); in DAC960_V1_ExecuteType3B()
862 DAC960_Command_T *Command = DAC960_AllocateCommand(Controller); in DAC960_V1_ExecuteType3D() local
863 DAC960_V1_CommandMailbox_T *CommandMailbox = &Command->V1.CommandMailbox; in DAC960_V1_ExecuteType3D()
865 DAC960_V1_ClearCommand(Command); in DAC960_V1_ExecuteType3D()
866 Command->CommandType = DAC960_ImmediateCommand; in DAC960_V1_ExecuteType3D()
871 DAC960_ExecuteCommand(Command); in DAC960_V1_ExecuteType3D()
872 CommandStatus = Command->V1.CommandStatus; in DAC960_V1_ExecuteType3D()
873 DAC960_DeallocateCommand(Command); in DAC960_V1_ExecuteType3D()
888 DAC960_Command_T *Command = DAC960_AllocateCommand(Controller); in DAC960_V2_GeneralInfo() local
889 DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox; in DAC960_V2_GeneralInfo()
891 DAC960_V2_ClearCommand(Command); in DAC960_V2_GeneralInfo()
892 Command->CommandType = DAC960_ImmediateCommand; in DAC960_V2_GeneralInfo()
908 DAC960_ExecuteCommand(Command); in DAC960_V2_GeneralInfo()
909 CommandStatus = Command->V2.CommandStatus; in DAC960_V2_GeneralInfo()
910 DAC960_DeallocateCommand(Command); in DAC960_V2_GeneralInfo()
926 DAC960_Command_T *Command = DAC960_AllocateCommand(Controller); in DAC960_V2_NewControllerInfo() local
927 DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox; in DAC960_V2_NewControllerInfo()
929 DAC960_V2_ClearCommand(Command); in DAC960_V2_NewControllerInfo()
930 Command->CommandType = DAC960_ImmediateCommand; in DAC960_V2_NewControllerInfo()
947 DAC960_ExecuteCommand(Command); in DAC960_V2_NewControllerInfo()
948 CommandStatus = Command->V2.CommandStatus; in DAC960_V2_NewControllerInfo()
949 DAC960_DeallocateCommand(Command); in DAC960_V2_NewControllerInfo()
965 DAC960_Command_T *Command = DAC960_AllocateCommand(Controller); in DAC960_V2_NewLogicalDeviceInfo() local
966 DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox; in DAC960_V2_NewLogicalDeviceInfo()
969 DAC960_V2_ClearCommand(Command); in DAC960_V2_NewLogicalDeviceInfo()
970 Command->CommandType = DAC960_ImmediateCommand; in DAC960_V2_NewLogicalDeviceInfo()
990 DAC960_ExecuteCommand(Command); in DAC960_V2_NewLogicalDeviceInfo()
991 CommandStatus = Command->V2.CommandStatus; in DAC960_V2_NewLogicalDeviceInfo()
992 DAC960_DeallocateCommand(Command); in DAC960_V2_NewLogicalDeviceInfo()
1018 DAC960_Command_T *Command = DAC960_AllocateCommand(Controller); in DAC960_V2_NewPhysicalDeviceInfo() local
1019 DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox; in DAC960_V2_NewPhysicalDeviceInfo()
1022 DAC960_V2_ClearCommand(Command); in DAC960_V2_NewPhysicalDeviceInfo()
1023 Command->CommandType = DAC960_ImmediateCommand; in DAC960_V2_NewPhysicalDeviceInfo()
1044 DAC960_ExecuteCommand(Command); in DAC960_V2_NewPhysicalDeviceInfo()
1045 CommandStatus = Command->V2.CommandStatus; in DAC960_V2_NewPhysicalDeviceInfo()
1046 DAC960_DeallocateCommand(Command); in DAC960_V2_NewPhysicalDeviceInfo()
1101 DAC960_Command_T *Command; in DAC960_V2_NewInquiryUnitSerialNumber() local
1105 Command = DAC960_AllocateCommand(Controller); in DAC960_V2_NewInquiryUnitSerialNumber()
1106 CommandMailbox = &Command->V2.CommandMailbox; in DAC960_V2_NewInquiryUnitSerialNumber()
1107 DAC960_V2_ClearCommand(Command); in DAC960_V2_NewInquiryUnitSerialNumber()
1108 Command->CommandType = DAC960_ImmediateCommand; in DAC960_V2_NewInquiryUnitSerialNumber()
1113 DAC960_ExecuteCommand(Command); in DAC960_V2_NewInquiryUnitSerialNumber()
1114 CommandStatus = Command->V2.CommandStatus; in DAC960_V2_NewInquiryUnitSerialNumber()
1115 DAC960_DeallocateCommand(Command); in DAC960_V2_NewInquiryUnitSerialNumber()
1131 DAC960_Command_T *Command = DAC960_AllocateCommand(Controller); in DAC960_V2_DeviceOperation() local
1132 DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox; in DAC960_V2_DeviceOperation()
1134 DAC960_V2_ClearCommand(Command); in DAC960_V2_DeviceOperation()
1135 Command->CommandType = DAC960_ImmediateCommand; in DAC960_V2_DeviceOperation()
1143 DAC960_ExecuteCommand(Command); in DAC960_V2_DeviceOperation()
1144 CommandStatus = Command->V2.CommandStatus; in DAC960_V2_DeviceOperation()
1145 DAC960_DeallocateCommand(Command); in DAC960_V2_DeviceOperation()
2015 DAC960_Command_T *Command = Controller->Commands[Channel]; in DAC960_V1_ReadDeviceConfiguration() local
2019 DAC960_V1_ClearCommand(Command); in DAC960_V1_ReadDeviceConfiguration()
2020 Command->CommandType = DAC960_ImmediateCommand; in DAC960_V1_ReadDeviceConfiguration()
2021 Command->Completion = Completion; in DAC960_V1_ReadDeviceConfiguration()
2022 Command->V1.CommandMailbox.Type3.CommandOpcode = DAC960_V1_DCDB; in DAC960_V1_ReadDeviceConfiguration()
2023 Command->V1.CommandMailbox.Type3.BusAddress = DCDB_dma; in DAC960_V1_ReadDeviceConfiguration()
2044 DAC960_QueueCommand(Command); in DAC960_V1_ReadDeviceConfiguration()
2063 DAC960_Command_T *Command = Controller->Commands[Channel]; in DAC960_V1_ReadDeviceConfiguration() local
2069 if (Command->V1.CommandStatus != DAC960_V1_NormalCompletion) { in DAC960_V1_ReadDeviceConfiguration()
2077 Command->Completion = Completion; in DAC960_V1_ReadDeviceConfiguration()
2089 DAC960_QueueCommand(Command); in DAC960_V1_ReadDeviceConfiguration()
2093 if (Command->V1.CommandStatus != DAC960_V1_NormalCompletion) { in DAC960_V1_ReadDeviceConfiguration()
3203 static void DAC960_V1_QueueReadWriteCommand(DAC960_Command_T *Command) in DAC960_V1_QueueReadWriteCommand() argument
3205 DAC960_Controller_T *Controller = Command->Controller; in DAC960_V1_QueueReadWriteCommand()
3206 DAC960_V1_CommandMailbox_T *CommandMailbox = &Command->V1.CommandMailbox; in DAC960_V1_QueueReadWriteCommand()
3208 Command->V1.ScatterGatherList; in DAC960_V1_QueueReadWriteCommand()
3209 struct scatterlist *ScatterList = Command->V1.ScatterList; in DAC960_V1_QueueReadWriteCommand()
3211 DAC960_V1_ClearCommand(Command); in DAC960_V1_QueueReadWriteCommand()
3213 if (Command->SegmentCount == 1) in DAC960_V1_QueueReadWriteCommand()
3215 if (Command->DmaDirection == PCI_DMA_FROMDEVICE) in DAC960_V1_QueueReadWriteCommand()
3220 CommandMailbox->Type5.LD.TransferLength = Command->BlockCount; in DAC960_V1_QueueReadWriteCommand()
3221 CommandMailbox->Type5.LD.LogicalDriveNumber = Command->LogicalDriveNumber; in DAC960_V1_QueueReadWriteCommand()
3222 CommandMailbox->Type5.LogicalBlockAddress = Command->BlockNumber; in DAC960_V1_QueueReadWriteCommand()
3230 if (Command->DmaDirection == PCI_DMA_FROMDEVICE) in DAC960_V1_QueueReadWriteCommand()
3235 CommandMailbox->Type5.LD.TransferLength = Command->BlockCount; in DAC960_V1_QueueReadWriteCommand()
3236 CommandMailbox->Type5.LD.LogicalDriveNumber = Command->LogicalDriveNumber; in DAC960_V1_QueueReadWriteCommand()
3237 CommandMailbox->Type5.LogicalBlockAddress = Command->BlockNumber; in DAC960_V1_QueueReadWriteCommand()
3238 CommandMailbox->Type5.BusAddress = Command->V1.ScatterGatherListDMA; in DAC960_V1_QueueReadWriteCommand()
3240 CommandMailbox->Type5.ScatterGatherCount = Command->SegmentCount; in DAC960_V1_QueueReadWriteCommand()
3242 for (i = 0; i < Command->SegmentCount; i++, ScatterList++, ScatterGatherList++) { in DAC960_V1_QueueReadWriteCommand()
3249 DAC960_QueueCommand(Command); in DAC960_V1_QueueReadWriteCommand()
3258 static void DAC960_V2_QueueReadWriteCommand(DAC960_Command_T *Command) in DAC960_V2_QueueReadWriteCommand() argument
3260 DAC960_Controller_T *Controller = Command->Controller; in DAC960_V2_QueueReadWriteCommand()
3261 DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox; in DAC960_V2_QueueReadWriteCommand()
3262 struct scatterlist *ScatterList = Command->V2.ScatterList; in DAC960_V2_QueueReadWriteCommand()
3264 DAC960_V2_ClearCommand(Command); in DAC960_V2_QueueReadWriteCommand()
3268 (Command->DmaDirection == PCI_DMA_FROMDEVICE); in DAC960_V2_QueueReadWriteCommand()
3270 Command->BlockCount << DAC960_BlockSizeBits; in DAC960_V2_QueueReadWriteCommand()
3271 CommandMailbox->SCSI_10.RequestSenseBusAddress = Command->V2.RequestSenseDMA; in DAC960_V2_QueueReadWriteCommand()
3273 Controller->V2.LogicalDriveToVirtualDevice[Command->LogicalDriveNumber]; in DAC960_V2_QueueReadWriteCommand()
3277 (Command->DmaDirection == PCI_DMA_FROMDEVICE ? 0x28 : 0x2A); in DAC960_V2_QueueReadWriteCommand()
3278 CommandMailbox->SCSI_10.SCSI_CDB[2] = Command->BlockNumber >> 24; in DAC960_V2_QueueReadWriteCommand()
3279 CommandMailbox->SCSI_10.SCSI_CDB[3] = Command->BlockNumber >> 16; in DAC960_V2_QueueReadWriteCommand()
3280 CommandMailbox->SCSI_10.SCSI_CDB[4] = Command->BlockNumber >> 8; in DAC960_V2_QueueReadWriteCommand()
3281 CommandMailbox->SCSI_10.SCSI_CDB[5] = Command->BlockNumber; in DAC960_V2_QueueReadWriteCommand()
3282 CommandMailbox->SCSI_10.SCSI_CDB[7] = Command->BlockCount >> 8; in DAC960_V2_QueueReadWriteCommand()
3283 CommandMailbox->SCSI_10.SCSI_CDB[8] = Command->BlockCount; in DAC960_V2_QueueReadWriteCommand()
3285 if (Command->SegmentCount == 1) in DAC960_V2_QueueReadWriteCommand()
3301 if (Command->SegmentCount > 2) in DAC960_V2_QueueReadWriteCommand()
3303 ScatterGatherList = Command->V2.ScatterGatherList; in DAC960_V2_QueueReadWriteCommand()
3307 .ExtendedScatterGather.ScatterGatherList0Length = Command->SegmentCount; in DAC960_V2_QueueReadWriteCommand()
3310 Command->V2.ScatterGatherListDMA; in DAC960_V2_QueueReadWriteCommand()
3316 for (i = 0; i < Command->SegmentCount; i++, ScatterList++, ScatterGatherList++) { in DAC960_V2_QueueReadWriteCommand()
3323 DAC960_QueueCommand(Command); in DAC960_V2_QueueReadWriteCommand()
3330 DAC960_Command_T *Command; in DAC960_process_queue() local
3337 Command = DAC960_AllocateCommand(Controller); in DAC960_process_queue()
3338 if (Command == NULL) in DAC960_process_queue()
3342 Command->DmaDirection = PCI_DMA_FROMDEVICE; in DAC960_process_queue()
3343 Command->CommandType = DAC960_ReadCommand; in DAC960_process_queue()
3345 Command->DmaDirection = PCI_DMA_TODEVICE; in DAC960_process_queue()
3346 Command->CommandType = DAC960_WriteCommand; in DAC960_process_queue()
3348 Command->Completion = Request->end_io_data; in DAC960_process_queue()
3349 Command->LogicalDriveNumber = (long)Request->rq_disk->private_data; in DAC960_process_queue()
3350 Command->BlockNumber = blk_rq_pos(Request); in DAC960_process_queue()
3351 Command->BlockCount = blk_rq_sectors(Request); in DAC960_process_queue()
3352 Command->Request = Request; in DAC960_process_queue()
3354 Command->SegmentCount = blk_rq_map_sg(req_q, in DAC960_process_queue()
3355 Command->Request, Command->cmd_sglist); in DAC960_process_queue()
3357 Command->SegmentCount = pci_map_sg(Controller->PCIDevice, Command->cmd_sglist, in DAC960_process_queue()
3358 Command->SegmentCount, Command->DmaDirection); in DAC960_process_queue()
3360 DAC960_QueueReadWriteCommand(Command); in DAC960_process_queue()
3416 static void DAC960_queue_partial_rw(DAC960_Command_T *Command) in DAC960_queue_partial_rw() argument
3418 DAC960_Controller_T *Controller = Command->Controller; in DAC960_queue_partial_rw()
3419 struct request *Request = Command->Request; in DAC960_queue_partial_rw()
3420 struct request_queue *req_q = Controller->RequestQueue[Command->LogicalDriveNumber]; in DAC960_queue_partial_rw()
3422 if (Command->DmaDirection == PCI_DMA_FROMDEVICE) in DAC960_queue_partial_rw()
3423 Command->CommandType = DAC960_ReadRetryCommand; in DAC960_queue_partial_rw()
3425 Command->CommandType = DAC960_WriteRetryCommand; in DAC960_queue_partial_rw()
3433 (void)blk_rq_map_sg(req_q, Command->Request, Command->cmd_sglist); in DAC960_queue_partial_rw()
3435 (void)pci_map_sg(Controller->PCIDevice, Command->cmd_sglist, 1, Command->DmaDirection); in DAC960_queue_partial_rw()
3442 Command->SegmentCount = 1; in DAC960_queue_partial_rw()
3443 Command->BlockNumber = blk_rq_pos(Request); in DAC960_queue_partial_rw()
3444 Command->BlockCount = 1; in DAC960_queue_partial_rw()
3445 DAC960_QueueReadWriteCommand(Command); in DAC960_queue_partial_rw()
3463 static inline bool DAC960_ProcessCompletedRequest(DAC960_Command_T *Command, in DAC960_ProcessCompletedRequest() argument
3466 struct request *Request = Command->Request; in DAC960_ProcessCompletedRequest()
3469 pci_unmap_sg(Command->Controller->PCIDevice, Command->cmd_sglist, in DAC960_ProcessCompletedRequest()
3470 Command->SegmentCount, Command->DmaDirection); in DAC960_ProcessCompletedRequest()
3472 if (!__blk_end_request(Request, Error, Command->BlockCount << 9)) { in DAC960_ProcessCompletedRequest()
3473 if (Command->Completion) { in DAC960_ProcessCompletedRequest()
3474 complete(Command->Completion); in DAC960_ProcessCompletedRequest()
3475 Command->Completion = NULL; in DAC960_ProcessCompletedRequest()
3487 static void DAC960_V1_ReadWriteError(DAC960_Command_T *Command) in DAC960_V1_ReadWriteError() argument
3489 DAC960_Controller_T *Controller = Command->Controller; in DAC960_V1_ReadWriteError()
3491 switch (Command->CommandType) in DAC960_V1_ReadWriteError()
3506 switch (Command->V1.CommandStatus) in DAC960_V1_ReadWriteError()
3525 Controller, Command->V1.CommandStatus, CommandName); in DAC960_V1_ReadWriteError()
3530 Command->LogicalDriveNumber, Command->BlockNumber, in DAC960_V1_ReadWriteError()
3531 Command->BlockNumber + Command->BlockCount - 1); in DAC960_V1_ReadWriteError()
3540 static void DAC960_V1_ProcessCompletedCommand(DAC960_Command_T *Command) in DAC960_V1_ProcessCompletedCommand() argument
3542 DAC960_Controller_T *Controller = Command->Controller; in DAC960_V1_ProcessCompletedCommand()
3543 DAC960_CommandType_T CommandType = Command->CommandType; in DAC960_V1_ProcessCompletedCommand()
3545 Command->V1.CommandMailbox.Common.CommandOpcode; in DAC960_V1_ProcessCompletedCommand()
3546 DAC960_V1_CommandStatus_T CommandStatus = Command->V1.CommandStatus; in DAC960_V1_ProcessCompletedCommand()
3558 if (!DAC960_ProcessCompletedRequest(Command, true)) in DAC960_V1_ProcessCompletedCommand()
3568 DAC960_queue_partial_rw(Command); in DAC960_V1_ProcessCompletedCommand()
3574 DAC960_V1_ReadWriteError(Command); in DAC960_V1_ProcessCompletedCommand()
3576 if (!DAC960_ProcessCompletedRequest(Command, false)) in DAC960_V1_ProcessCompletedCommand()
3595 DAC960_V1_ReadWriteError(Command); in DAC960_V1_ProcessCompletedCommand()
3602 DAC960_V1_ReadWriteError(Command); in DAC960_V1_ProcessCompletedCommand()
3606 if (!DAC960_ProcessCompletedRequest(Command, normal_completion)) { in DAC960_V1_ProcessCompletedCommand()
3607 DAC960_queue_partial_rw(Command); in DAC960_V1_ProcessCompletedCommand()
3964 Command->V1.CommandStatus = Controller->V1.PendingRebuildStatus; in DAC960_V1_ProcessCompletedCommand()
4126 Command->V1.CommandMailbox.Type3E.CommandOpcode = in DAC960_V1_ProcessCompletedCommand()
4128 Command->V1.CommandMailbox.Type3E.OperationType = in DAC960_V1_ProcessCompletedCommand()
4130 Command->V1.CommandMailbox.Type3E.OperationQualifier = 1; in DAC960_V1_ProcessCompletedCommand()
4131 Command->V1.CommandMailbox.Type3E.SequenceNumber = in DAC960_V1_ProcessCompletedCommand()
4133 Command->V1.CommandMailbox.Type3E.BusAddress = in DAC960_V1_ProcessCompletedCommand()
4135 DAC960_QueueCommand(Command); in DAC960_V1_ProcessCompletedCommand()
4141 Command->V1.CommandMailbox.Type3.CommandOpcode = in DAC960_V1_ProcessCompletedCommand()
4143 Command->V1.CommandMailbox.Type3.BusAddress = in DAC960_V1_ProcessCompletedCommand()
4145 DAC960_QueueCommand(Command); in DAC960_V1_ProcessCompletedCommand()
4152 Command->V1.CommandMailbox.Type3.CommandOpcode = in DAC960_V1_ProcessCompletedCommand()
4154 Command->V1.CommandMailbox.Type3.BusAddress = in DAC960_V1_ProcessCompletedCommand()
4156 DAC960_QueueCommand(Command); in DAC960_V1_ProcessCompletedCommand()
4169 Command->V1.CommandMailbox.Type3.CommandOpcode = DAC960_V1_DCDB; in DAC960_V1_ProcessCompletedCommand()
4170 Command->V1.CommandMailbox.Type3.BusAddress = DCDB_DMA; in DAC960_V1_ProcessCompletedCommand()
4189 DAC960_QueueCommand(Command); in DAC960_V1_ProcessCompletedCommand()
4199 Command->V1.CommandMailbox.Type3.CommandOpcode = DAC960_V1_DCDB; in DAC960_V1_ProcessCompletedCommand()
4200 Command->V1.CommandMailbox.Type3.BusAddress = DCDB_DMA; in DAC960_V1_ProcessCompletedCommand()
4220 DAC960_QueueCommand(Command); in DAC960_V1_ProcessCompletedCommand()
4238 Command->V1.CommandMailbox.Type3D.CommandOpcode = in DAC960_V1_ProcessCompletedCommand()
4240 Command->V1.CommandMailbox.Type3D.Channel = in DAC960_V1_ProcessCompletedCommand()
4242 Command->V1.CommandMailbox.Type3D.TargetID = in DAC960_V1_ProcessCompletedCommand()
4244 Command->V1.CommandMailbox.Type3D.BusAddress = in DAC960_V1_ProcessCompletedCommand()
4246 DAC960_QueueCommand(Command); in DAC960_V1_ProcessCompletedCommand()
4254 Command->V1.CommandMailbox.Type3.CommandOpcode = in DAC960_V1_ProcessCompletedCommand()
4256 Command->V1.CommandMailbox.Type3.BusAddress = in DAC960_V1_ProcessCompletedCommand()
4258 DAC960_QueueCommand(Command); in DAC960_V1_ProcessCompletedCommand()
4264 Command->V1.CommandMailbox.Type3.CommandOpcode = in DAC960_V1_ProcessCompletedCommand()
4266 Command->V1.CommandMailbox.Type3.BusAddress = in DAC960_V1_ProcessCompletedCommand()
4268 DAC960_QueueCommand(Command); in DAC960_V1_ProcessCompletedCommand()
4274 Command->V1.CommandMailbox.Type3.CommandOpcode = in DAC960_V1_ProcessCompletedCommand()
4276 Command->V1.CommandMailbox.Type3.BusAddress = in DAC960_V1_ProcessCompletedCommand()
4278 DAC960_QueueCommand(Command); in DAC960_V1_ProcessCompletedCommand()
4284 Command->V1.CommandMailbox.Type3B.CommandOpcode = in DAC960_V1_ProcessCompletedCommand()
4286 Command->V1.CommandMailbox.Type3B.CommandOpcode2 = 0x20; in DAC960_V1_ProcessCompletedCommand()
4287 Command->V1.CommandMailbox.Type3B.BusAddress = in DAC960_V1_ProcessCompletedCommand()
4289 DAC960_QueueCommand(Command); in DAC960_V1_ProcessCompletedCommand()
4299 complete(Command->Completion); in DAC960_V1_ProcessCompletedCommand()
4300 Command->Completion = NULL; in DAC960_V1_ProcessCompletedCommand()
4305 DAC960_V1_KernelCommand_T *KernelCommand = Command->V1.KernelCommand; in DAC960_V1_ProcessCompletedCommand()
4306 KernelCommand->CommandStatus = Command->V1.CommandStatus; in DAC960_V1_ProcessCompletedCommand()
4307 Command->V1.KernelCommand = NULL; in DAC960_V1_ProcessCompletedCommand()
4312 DAC960_DeallocateCommand(Command); in DAC960_V1_ProcessCompletedCommand()
4324 DAC960_V1_QueueMonitoringCommand(Command); in DAC960_V1_ProcessCompletedCommand()
4330 DAC960_DeallocateCommand(Command); in DAC960_V1_ProcessCompletedCommand()
4343 static void DAC960_V2_ReadWriteError(DAC960_Command_T *Command) in DAC960_V2_ReadWriteError() argument
4345 DAC960_Controller_T *Controller = Command->Controller; in DAC960_V2_ReadWriteError()
4355 switch (Command->CommandType) in DAC960_V2_ReadWriteError()
4371 SenseErrors[Command->V2.RequestSense->SenseKey], CommandName); in DAC960_V2_ReadWriteError()
4374 Command->LogicalDriveNumber, Command->BlockNumber, in DAC960_V2_ReadWriteError()
4375 Command->BlockNumber + Command->BlockCount - 1); in DAC960_V2_ReadWriteError()
4626 static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command) in DAC960_V2_ProcessCompletedCommand() argument
4628 DAC960_Controller_T *Controller = Command->Controller; in DAC960_V2_ProcessCompletedCommand()
4629 DAC960_CommandType_T CommandType = Command->CommandType; in DAC960_V2_ProcessCompletedCommand()
4630 DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox; in DAC960_V2_ProcessCompletedCommand()
4633 DAC960_V2_CommandStatus_T CommandStatus = Command->V2.CommandStatus; in DAC960_V2_ProcessCompletedCommand()
4642 Command->V2.RequestSense->SenseKey = DAC960_SenseKey_MediumError; in DAC960_V2_ProcessCompletedCommand()
4646 if (!DAC960_ProcessCompletedRequest(Command, true)) in DAC960_V2_ProcessCompletedCommand()
4649 } else if (Command->V2.RequestSense->SenseKey == DAC960_SenseKey_MediumError) in DAC960_V2_ProcessCompletedCommand()
4655 DAC960_queue_partial_rw(Command); in DAC960_V2_ProcessCompletedCommand()
4660 if (Command->V2.RequestSense->SenseKey != DAC960_SenseKey_NotReady) in DAC960_V2_ProcessCompletedCommand()
4661 DAC960_V2_ReadWriteError(Command); in DAC960_V2_ProcessCompletedCommand()
4665 (void)DAC960_ProcessCompletedRequest(Command, false); in DAC960_V2_ProcessCompletedCommand()
4683 if (Command->V2.RequestSense->SenseKey != DAC960_SenseKey_NotReady) in DAC960_V2_ProcessCompletedCommand()
4684 DAC960_V2_ReadWriteError(Command); in DAC960_V2_ProcessCompletedCommand()
4691 DAC960_V2_ReadWriteError(Command); in DAC960_V2_ProcessCompletedCommand()
4695 if (!DAC960_ProcessCompletedRequest(Command, normal_completion)) { in DAC960_V2_ProcessCompletedCommand()
4696 DAC960_queue_partial_rw(Command); in DAC960_V2_ProcessCompletedCommand()
5134 DAC960_QueueCommand(Command); in DAC960_V2_ProcessCompletedCommand()
5151 DAC960_QueueCommand(Command); in DAC960_V2_ProcessCompletedCommand()
5181 DAC960_QueueCommand(Command); in DAC960_V2_ProcessCompletedCommand()
5212 DAC960_QueueCommand(Command); in DAC960_V2_ProcessCompletedCommand()
5222 complete(Command->Completion); in DAC960_V2_ProcessCompletedCommand()
5223 Command->Completion = NULL; in DAC960_V2_ProcessCompletedCommand()
5228 DAC960_V2_KernelCommand_T *KernelCommand = Command->V2.KernelCommand; in DAC960_V2_ProcessCompletedCommand()
5230 KernelCommand->RequestSenseLength = Command->V2.RequestSenseLength; in DAC960_V2_ProcessCompletedCommand()
5231 KernelCommand->DataTransferLength = Command->V2.DataTransferResidue; in DAC960_V2_ProcessCompletedCommand()
5232 Command->V2.KernelCommand = NULL; in DAC960_V2_ProcessCompletedCommand()
5233 DAC960_DeallocateCommand(Command); in DAC960_V2_ProcessCompletedCommand()
5245 DAC960_V2_QueueMonitoringCommand(Command); in DAC960_V2_ProcessCompletedCommand()
5251 DAC960_DeallocateCommand(Command); in DAC960_V2_ProcessCompletedCommand()
5278 DAC960_Command_T *Command = Controller->Commands[CommandIdentifier-1]; in DAC960_GEM_InterruptHandler() local
5279 Command->V2.CommandStatus = NextStatusMailbox->Fields.CommandStatus; in DAC960_GEM_InterruptHandler()
5280 Command->V2.RequestSenseLength = in DAC960_GEM_InterruptHandler()
5282 Command->V2.DataTransferResidue = in DAC960_GEM_InterruptHandler()
5287 DAC960_V2_ProcessCompletedCommand(Command); in DAC960_GEM_InterruptHandler()
5319 DAC960_Command_T *Command = Controller->Commands[CommandIdentifier-1]; in DAC960_BA_InterruptHandler() local
5320 Command->V2.CommandStatus = NextStatusMailbox->Fields.CommandStatus; in DAC960_BA_InterruptHandler()
5321 Command->V2.RequestSenseLength = in DAC960_BA_InterruptHandler()
5323 Command->V2.DataTransferResidue = in DAC960_BA_InterruptHandler()
5328 DAC960_V2_ProcessCompletedCommand(Command); in DAC960_BA_InterruptHandler()
5361 DAC960_Command_T *Command = Controller->Commands[CommandIdentifier-1]; in DAC960_LP_InterruptHandler() local
5362 Command->V2.CommandStatus = NextStatusMailbox->Fields.CommandStatus; in DAC960_LP_InterruptHandler()
5363 Command->V2.RequestSenseLength = in DAC960_LP_InterruptHandler()
5365 Command->V2.DataTransferResidue = in DAC960_LP_InterruptHandler()
5370 DAC960_V2_ProcessCompletedCommand(Command); in DAC960_LP_InterruptHandler()
5403 DAC960_Command_T *Command = Controller->Commands[CommandIdentifier-1]; in DAC960_LA_InterruptHandler() local
5404 Command->V1.CommandStatus = NextStatusMailbox->Fields.CommandStatus; in DAC960_LA_InterruptHandler()
5408 DAC960_V1_ProcessCompletedCommand(Command); in DAC960_LA_InterruptHandler()
5441 DAC960_Command_T *Command = Controller->Commands[CommandIdentifier-1]; in DAC960_PG_InterruptHandler() local
5442 Command->V1.CommandStatus = NextStatusMailbox->Fields.CommandStatus; in DAC960_PG_InterruptHandler()
5446 DAC960_V1_ProcessCompletedCommand(Command); in DAC960_PG_InterruptHandler()
5476 DAC960_Command_T *Command = Controller->Commands[CommandIdentifier-1]; in DAC960_PD_InterruptHandler() local
5477 Command->V1.CommandStatus = in DAC960_PD_InterruptHandler()
5481 DAC960_V1_ProcessCompletedCommand(Command); in DAC960_PD_InterruptHandler()
5514 DAC960_Command_T *Command = Controller->Commands[CommandIdentifier-1]; in DAC960_P_InterruptHandler() local
5515 DAC960_V1_CommandMailbox_T *CommandMailbox = &Command->V1.CommandMailbox; in DAC960_P_InterruptHandler()
5518 Command->V1.CommandStatus = in DAC960_P_InterruptHandler()
5525 Command->V1.CommandMailbox.Common.CommandOpcode = DAC960_V1_Enquiry; in DAC960_P_InterruptHandler()
5529 Command->V1.CommandMailbox.Common.CommandOpcode = in DAC960_P_InterruptHandler()
5534 Command->V1.CommandMailbox.Common.CommandOpcode = DAC960_V1_Read; in DAC960_P_InterruptHandler()
5538 Command->V1.CommandMailbox.Common.CommandOpcode = DAC960_V1_Write; in DAC960_P_InterruptHandler()
5542 Command->V1.CommandMailbox.Common.CommandOpcode = in DAC960_P_InterruptHandler()
5547 Command->V1.CommandMailbox.Common.CommandOpcode = in DAC960_P_InterruptHandler()
5554 DAC960_V1_ProcessCompletedCommand(Command); in DAC960_P_InterruptHandler()
5571 static void DAC960_V1_QueueMonitoringCommand(DAC960_Command_T *Command) in DAC960_V1_QueueMonitoringCommand() argument
5573 DAC960_Controller_T *Controller = Command->Controller; in DAC960_V1_QueueMonitoringCommand()
5574 DAC960_V1_CommandMailbox_T *CommandMailbox = &Command->V1.CommandMailbox; in DAC960_V1_QueueMonitoringCommand()
5575 DAC960_V1_ClearCommand(Command); in DAC960_V1_QueueMonitoringCommand()
5576 Command->CommandType = DAC960_MonitoringCommand; in DAC960_V1_QueueMonitoringCommand()
5579 DAC960_QueueCommand(Command); in DAC960_V1_QueueMonitoringCommand()
5588 static void DAC960_V2_QueueMonitoringCommand(DAC960_Command_T *Command) in DAC960_V2_QueueMonitoringCommand() argument
5590 DAC960_Controller_T *Controller = Command->Controller; in DAC960_V2_QueueMonitoringCommand()
5591 DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox; in DAC960_V2_QueueMonitoringCommand()
5592 DAC960_V2_ClearCommand(Command); in DAC960_V2_QueueMonitoringCommand()
5593 Command->CommandType = DAC960_MonitoringCommand; in DAC960_V2_QueueMonitoringCommand()
5611 DAC960_QueueCommand(Command); in DAC960_V2_QueueMonitoringCommand()
5623 DAC960_Command_T *Command; in DAC960_MonitoringTimerFunction() local
5632 Command = DAC960_AllocateCommand(Controller); in DAC960_MonitoringTimerFunction()
5633 if (Command != NULL) in DAC960_MonitoringTimerFunction()
5634 DAC960_V1_QueueMonitoringCommand(Command); in DAC960_MonitoringTimerFunction()
5690 Command = DAC960_AllocateCommand(Controller); in DAC960_MonitoringTimerFunction()
5691 if (Command != NULL) in DAC960_MonitoringTimerFunction()
5692 DAC960_V2_QueueMonitoringCommand(Command); in DAC960_MonitoringTimerFunction()
5908 DAC960_Command_T *Command, in DAC960_V1_SetDeviceState() argument
5915 DAC960_V1_CommandMailbox_T *CommandMailbox = &Command->V1.CommandMailbox; in DAC960_V1_SetDeviceState()
5921 DAC960_ExecuteCommand(Command); in DAC960_V1_SetDeviceState()
5922 switch (Command->V1.CommandStatus) in DAC960_V1_SetDeviceState()
5952 Command->V1.CommandStatus); in DAC960_V1_SetDeviceState()
5966 DAC960_Command_T *Command; in DAC960_V1_ExecuteUserCommand() local
5972 while ((Command = DAC960_AllocateCommand(Controller)) == NULL) in DAC960_V1_ExecuteUserCommand()
5976 DAC960_V1_ClearCommand(Command); in DAC960_V1_ExecuteUserCommand()
5977 Command->CommandType = DAC960_ImmediateCommand; in DAC960_V1_ExecuteUserCommand()
5978 CommandMailbox = &Command->V1.CommandMailbox; in DAC960_V1_ExecuteUserCommand()
5982 DAC960_ExecuteCommand(Command); in DAC960_V1_ExecuteUserCommand()
5994 DAC960_V1_SetDeviceState(Controller, Command, Channel, TargetID, in DAC960_V1_ExecuteUserCommand()
6008 DAC960_V1_SetDeviceState(Controller, Command, Channel, TargetID, in DAC960_V1_ExecuteUserCommand()
6023 DAC960_V1_SetDeviceState(Controller, Command, Channel, TargetID, in DAC960_V1_ExecuteUserCommand()
6036 DAC960_ExecuteCommand(Command); in DAC960_V1_ExecuteUserCommand()
6037 switch (Command->V1.CommandStatus) in DAC960_V1_ExecuteUserCommand()
6067 Channel, TargetID, Command->V1.CommandStatus); in DAC960_V1_ExecuteUserCommand()
6078 DAC960_ExecuteCommand(Command); in DAC960_V1_ExecuteUserCommand()
6079 switch (Command->V1.CommandStatus) in DAC960_V1_ExecuteUserCommand()
6118 LogicalDriveNumber, Command->V1.CommandStatus); in DAC960_V1_ExecuteUserCommand()
6144 DAC960_ExecuteCommand(Command); in DAC960_V1_ExecuteUserCommand()
6145 switch (Command->V1.CommandStatus) in DAC960_V1_ExecuteUserCommand()
6155 Controller, Command->V1.CommandStatus); in DAC960_V1_ExecuteUserCommand()
6166 DAC960_DeallocateCommand(Command); in DAC960_V1_ExecuteUserCommand()
6178 static bool DAC960_V2_TranslatePhysicalDevice(DAC960_Command_T *Command, in DAC960_V2_TranslatePhysicalDevice() argument
6185 DAC960_Controller_T *Controller = Command->Controller; in DAC960_V2_TranslatePhysicalDevice()
6187 CommandMailbox = &Command->V2.CommandMailbox; in DAC960_V2_TranslatePhysicalDevice()
6211 DAC960_ExecuteCommand(Command); in DAC960_V2_TranslatePhysicalDevice()
6216 return (Command->V2.CommandStatus == DAC960_V2_NormalCompletion); in DAC960_V2_TranslatePhysicalDevice()
6228 DAC960_Command_T *Command; in DAC960_V2_ExecuteUserCommand() local
6235 while ((Command = DAC960_AllocateCommand(Controller)) == NULL) in DAC960_V2_ExecuteUserCommand()
6239 DAC960_V2_ClearCommand(Command); in DAC960_V2_ExecuteUserCommand()
6240 Command->CommandType = DAC960_ImmediateCommand; in DAC960_V2_ExecuteUserCommand()
6241 CommandMailbox = &Command->V2.CommandMailbox; in DAC960_V2_ExecuteUserCommand()
6250 DAC960_ExecuteCommand(Command); in DAC960_V2_ExecuteUserCommand()
6256 DAC960_V2_TranslatePhysicalDevice(Command, Channel, TargetID, in DAC960_V2_ExecuteUserCommand()
6265 DAC960_ExecuteCommand(Command); in DAC960_V2_ExecuteUserCommand()
6268 (Command->V2.CommandStatus in DAC960_V2_ExecuteUserCommand()
6275 DAC960_V2_TranslatePhysicalDevice(Command, Channel, TargetID, in DAC960_V2_ExecuteUserCommand()
6284 DAC960_ExecuteCommand(Command); in DAC960_V2_ExecuteUserCommand()
6287 (Command->V2.CommandStatus in DAC960_V2_ExecuteUserCommand()
6294 DAC960_V2_TranslatePhysicalDevice(Command, Channel, TargetID, in DAC960_V2_ExecuteUserCommand()
6303 DAC960_ExecuteCommand(Command); in DAC960_V2_ExecuteUserCommand()
6306 (Command->V2.CommandStatus in DAC960_V2_ExecuteUserCommand()
6313 DAC960_V2_TranslatePhysicalDevice(Command, Channel, TargetID, in DAC960_V2_ExecuteUserCommand()
6320 DAC960_ExecuteCommand(Command); in DAC960_V2_ExecuteUserCommand()
6323 (Command->V2.CommandStatus in DAC960_V2_ExecuteUserCommand()
6330 DAC960_V2_TranslatePhysicalDevice(Command, Channel, TargetID, in DAC960_V2_ExecuteUserCommand()
6337 DAC960_ExecuteCommand(Command); in DAC960_V2_ExecuteUserCommand()
6340 (Command->V2.CommandStatus in DAC960_V2_ExecuteUserCommand()
6354 DAC960_ExecuteCommand(Command); in DAC960_V2_ExecuteUserCommand()
6360 (Command->V2.CommandStatus in DAC960_V2_ExecuteUserCommand()
6372 DAC960_ExecuteCommand(Command); in DAC960_V2_ExecuteUserCommand()
6378 (Command->V2.CommandStatus in DAC960_V2_ExecuteUserCommand()
6385 DAC960_ExecuteCommand(Command); in DAC960_V2_ExecuteUserCommand()
6387 (Command->V2.CommandStatus in DAC960_V2_ExecuteUserCommand()
6390 if (Command->V2.CommandStatus == DAC960_V2_NormalCompletion) in DAC960_V2_ExecuteUserCommand()
6415 DAC960_ExecuteCommand(Command); in DAC960_V2_ExecuteUserCommand()
6429 DAC960_DeallocateCommand(Command); in DAC960_V2_ExecuteUserCommand()
6678 DAC960_Command_T *Command = NULL; in DAC960_gam_ioctl() local
6766 while ((Command = DAC960_AllocateCommand(Controller)) == NULL) in DAC960_gam_ioctl()
6780 DAC960_V1_ClearCommand(Command); in DAC960_gam_ioctl()
6781 Command->CommandType = DAC960_ImmediateCommand; in DAC960_gam_ioctl()
6782 memcpy(&Command->V1.CommandMailbox, &UserCommand.CommandMailbox, in DAC960_gam_ioctl()
6784 Command->V1.CommandMailbox.Type3.BusAddress = DCDB_IOBUFDMA; in DAC960_gam_ioctl()
6791 while ((Command = DAC960_AllocateCommand(Controller)) == NULL) in DAC960_gam_ioctl()
6794 DAC960_V1_ClearCommand(Command); in DAC960_gam_ioctl()
6795 Command->CommandType = DAC960_ImmediateCommand; in DAC960_gam_ioctl()
6796 memcpy(&Command->V1.CommandMailbox, &UserCommand.CommandMailbox, in DAC960_gam_ioctl()
6799 Command->V1.CommandMailbox.Type3.BusAddress = in DAC960_gam_ioctl()
6802 DAC960_ExecuteCommand(Command); in DAC960_gam_ioctl()
6803 CommandStatus = Command->V1.CommandStatus; in DAC960_gam_ioctl()
6805 DAC960_DeallocateCommand(Command); in DAC960_gam_ioctl()
6845 DAC960_Command_T *Command = NULL; in DAC960_gam_ioctl() local
6912 while ((Command = DAC960_AllocateCommand(Controller)) == NULL) in DAC960_gam_ioctl()
6915 DAC960_V2_ClearCommand(Command); in DAC960_gam_ioctl()
6916 Command->CommandType = DAC960_ImmediateCommand; in DAC960_gam_ioctl()
6917 CommandMailbox = &Command->V2.CommandMailbox; in DAC960_gam_ioctl()
6958 DAC960_ExecuteCommand(Command); in DAC960_gam_ioctl()
6959 CommandStatus = Command->V2.CommandStatus; in DAC960_gam_ioctl()
6960 RequestSenseLength = Command->V2.RequestSenseLength; in DAC960_gam_ioctl()
6961 DataTransferResidue = Command->V2.DataTransferResidue; in DAC960_gam_ioctl()
6963 DAC960_DeallocateCommand(Command); in DAC960_gam_ioctl()