aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/DAC960.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/DAC960.c')
-rw-r--r--drivers/block/DAC960.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c
index e086fbbbe853..8db9089127c5 100644
--- a/drivers/block/DAC960.c
+++ b/drivers/block/DAC960.c
@@ -1177,7 +1177,8 @@ static bool DAC960_V1_EnableMemoryMailboxInterface(DAC960_Controller_T
1177 int TimeoutCounter; 1177 int TimeoutCounter;
1178 int i; 1178 int i;
1179 1179
1180 1180 memset(&CommandMailbox, 0, sizeof(DAC960_V1_CommandMailbox_T));
1181
1181 if (pci_set_dma_mask(Controller->PCIDevice, DMA_BIT_MASK(32))) 1182 if (pci_set_dma_mask(Controller->PCIDevice, DMA_BIT_MASK(32)))
1182 return DAC960_Failure(Controller, "DMA mask out of range"); 1183 return DAC960_Failure(Controller, "DMA mask out of range");
1183 Controller->BounceBufferLimit = DMA_BIT_MASK(32); 1184 Controller->BounceBufferLimit = DMA_BIT_MASK(32);
@@ -4627,7 +4628,8 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
4627 DAC960_Controller_T *Controller = Command->Controller; 4628 DAC960_Controller_T *Controller = Command->Controller;
4628 DAC960_CommandType_T CommandType = Command->CommandType; 4629 DAC960_CommandType_T CommandType = Command->CommandType;
4629 DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox; 4630 DAC960_V2_CommandMailbox_T *CommandMailbox = &Command->V2.CommandMailbox;
4630 DAC960_V2_IOCTL_Opcode_T CommandOpcode = CommandMailbox->Common.IOCTL_Opcode; 4631 DAC960_V2_IOCTL_Opcode_T IOCTLOpcode = CommandMailbox->Common.IOCTL_Opcode;
4632 DAC960_V2_CommandOpcode_T CommandOpcode = CommandMailbox->SCSI_10.CommandOpcode;
4631 DAC960_V2_CommandStatus_T CommandStatus = Command->V2.CommandStatus; 4633 DAC960_V2_CommandStatus_T CommandStatus = Command->V2.CommandStatus;
4632 4634
4633 if (CommandType == DAC960_ReadCommand || 4635 if (CommandType == DAC960_ReadCommand ||
@@ -4699,7 +4701,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
4699 { 4701 {
4700 if (Controller->ShutdownMonitoringTimer) 4702 if (Controller->ShutdownMonitoringTimer)
4701 return; 4703 return;
4702 if (CommandOpcode == DAC960_V2_GetControllerInfo) 4704 if (IOCTLOpcode == DAC960_V2_GetControllerInfo)
4703 { 4705 {
4704 DAC960_V2_ControllerInfo_T *NewControllerInfo = 4706 DAC960_V2_ControllerInfo_T *NewControllerInfo =
4705 Controller->V2.NewControllerInformation; 4707 Controller->V2.NewControllerInformation;
@@ -4719,14 +4721,14 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
4719 memcpy(ControllerInfo, NewControllerInfo, 4721 memcpy(ControllerInfo, NewControllerInfo,
4720 sizeof(DAC960_V2_ControllerInfo_T)); 4722 sizeof(DAC960_V2_ControllerInfo_T));
4721 } 4723 }
4722 else if (CommandOpcode == DAC960_V2_GetEvent) 4724 else if (IOCTLOpcode == DAC960_V2_GetEvent)
4723 { 4725 {
4724 if (CommandStatus == DAC960_V2_NormalCompletion) { 4726 if (CommandStatus == DAC960_V2_NormalCompletion) {
4725 DAC960_V2_ReportEvent(Controller, Controller->V2.Event); 4727 DAC960_V2_ReportEvent(Controller, Controller->V2.Event);
4726 } 4728 }
4727 Controller->V2.NextEventSequenceNumber++; 4729 Controller->V2.NextEventSequenceNumber++;
4728 } 4730 }
4729 else if (CommandOpcode == DAC960_V2_GetPhysicalDeviceInfoValid && 4731 else if (IOCTLOpcode == DAC960_V2_GetPhysicalDeviceInfoValid &&
4730 CommandStatus == DAC960_V2_NormalCompletion) 4732 CommandStatus == DAC960_V2_NormalCompletion)
4731 { 4733 {
4732 DAC960_V2_PhysicalDeviceInfo_T *NewPhysicalDeviceInfo = 4734 DAC960_V2_PhysicalDeviceInfo_T *NewPhysicalDeviceInfo =
@@ -4915,7 +4917,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
4915 NewPhysicalDeviceInfo->LogicalUnit++; 4917 NewPhysicalDeviceInfo->LogicalUnit++;
4916 Controller->V2.PhysicalDeviceIndex++; 4918 Controller->V2.PhysicalDeviceIndex++;
4917 } 4919 }
4918 else if (CommandOpcode == DAC960_V2_GetPhysicalDeviceInfoValid) 4920 else if (IOCTLOpcode == DAC960_V2_GetPhysicalDeviceInfoValid)
4919 { 4921 {
4920 unsigned int DeviceIndex; 4922 unsigned int DeviceIndex;
4921 for (DeviceIndex = Controller->V2.PhysicalDeviceIndex; 4923 for (DeviceIndex = Controller->V2.PhysicalDeviceIndex;
@@ -4938,7 +4940,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
4938 } 4940 }
4939 Controller->V2.NeedPhysicalDeviceInformation = false; 4941 Controller->V2.NeedPhysicalDeviceInformation = false;
4940 } 4942 }
4941 else if (CommandOpcode == DAC960_V2_GetLogicalDeviceInfoValid && 4943 else if (IOCTLOpcode == DAC960_V2_GetLogicalDeviceInfoValid &&
4942 CommandStatus == DAC960_V2_NormalCompletion) 4944 CommandStatus == DAC960_V2_NormalCompletion)
4943 { 4945 {
4944 DAC960_V2_LogicalDeviceInfo_T *NewLogicalDeviceInfo = 4946 DAC960_V2_LogicalDeviceInfo_T *NewLogicalDeviceInfo =
@@ -5065,7 +5067,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
5065 [LogicalDeviceNumber] = true; 5067 [LogicalDeviceNumber] = true;
5066 NewLogicalDeviceInfo->LogicalDeviceNumber++; 5068 NewLogicalDeviceInfo->LogicalDeviceNumber++;
5067 } 5069 }
5068 else if (CommandOpcode == DAC960_V2_GetLogicalDeviceInfoValid) 5070 else if (IOCTLOpcode == DAC960_V2_GetLogicalDeviceInfoValid)
5069 { 5071 {
5070 int LogicalDriveNumber; 5072 int LogicalDriveNumber;
5071 for (LogicalDriveNumber = 0; 5073 for (LogicalDriveNumber = 0;