Skip to contentSkip to conversation

DAC960 Oopses

PATCH Dave Olien 1 participant 1 message Mar 8, 2004 1 message not in the archive Block layer

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Dave Olien

author
#1 lore raw

Andrew,

Yup, this patch fixes one legitimate bug with the device unregistering, and the change for alpha is OK. Please apply Markus's patch. I've attached markus's the patch to this mail message.

Dave

Quoted 59 lines · Andrew Morton

Begin forwarded message:

Date: Sun, 7 Mar 2004 15:38:43 +0100
From: [email protected]
To: [email protected]
Subject: [PATCH] DAC960 Oopses

Hi,

The first part fixes a Kernel paging request failure on alpha with some older DAC960P cards (i tried D040340-0-DEC/Firmware 2.70). The Problem was, that ioremap_nocache(NULL) is not NULL (only on alpha). This card is still unsupported, due to lacking PCI resources.

The second part fixes a kernel Oops, if the initialization of the Controller fails (like too old firmware).
In that case, DAC960_UnregisterBlockDevice fails, because DAC960_RegisterBlockDevice was never called. This is a side effect of the multi-queue patch by Dave Olien.

Please CC to me directly.

drivers/block/DAC960.c +15 -2
@@ -2723,6 +2723,20 @@
 	  break;
   }
 
+  /*
+    Controller with Mylex P/N D040340-0-DEC has no PCI resource[1]!!
+    Checking the MemoryMappedAddress == NULL will fail on 
+    virtual Alpha addresses. 
+  */	  
+  if (!Controller->PCI_Address)
+  {
+	  DAC960_Error("Unable to get PCI Address. "
+		       "This Controller is currently not supported.\n",
+                       Controller);
+	  Controller->IO_Address = 0;
+	  goto Failure;
+  }
+
   pci_set_drvdata(PCI_Device, (void *)((long)Controller->ControllerNumber));
   for (i = 0; i < DAC960_MaxLogicalDrives; i++) {
 	Controller->disks[i] = alloc_disk(1<<DAC960_MaxPartitionsBits);
@@ -3061,8 +3075,8 @@
 				    DAC960_V2_RAID_Controller);
 	  DAC960_Notice("done\n", Controller);
 	}
+    DAC960_UnregisterBlockDevice(Controller);
     }
-  DAC960_UnregisterBlockDevice(Controller);
   DAC960_DestroyAuxiliaryStructures(Controller);
   DAC960_DestroyProcEntries(Controller);
   DAC960_DetectCleanup(Controller);
-
Quoted 4 lines

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

drivers/block/DAC960.c +15 -1
@@ -2723,6 +2723,20 @@
 	  break;
   }
 
+  /*
+    Controller with Mylex P/N D040340-0-DEC has no PCI resource[1]!!
+    Checking the MemoryMappedAddress == NULL will fail on 
+    virtual Alpha addresses. 
+  */	  
+  if (!Controller->PCI_Address)
+  {
+	  DAC960_Error("Unable to get PCI Address. "
+		       "This Controller is currently not supported.\n",
+                       Controller);
+	  Controller->IO_Address = 0;
+	  goto Failure;
+  }
+
   pci_set_drvdata(PCI_Device, (void *)((long)Controller->ControllerNumber));
   for (i = 0; i < DAC960_MaxLogicalDrives; i++) {
 	Controller->disks[i] = alloc_disk(1<<DAC960_MaxPartitionsBits);
@@ -3061,8 +3075,8 @@
 				    DAC960_V2_RAID_Controller);
 	  DAC960_Notice("done\n", Controller);
 	}
+    DAC960_UnregisterBlockDevice(Controller);
     }
-  DAC960_UnregisterBlockDevice(Controller);
   DAC960_DestroyAuxiliaryStructures(Controller);
   DAC960_DestroyProcEntries(Controller);
   DAC960_DetectCleanup(Controller);