]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fix DAC960 oops
authorAndrew Morton <akpm@osdl.org>
Thu, 14 Aug 2003 17:24:21 +0000 (10:24 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Thu, 14 Aug 2003 17:24:21 +0000 (10:24 -0700)
From: Dave Olien <dmo@osdl.org>

The dynamic queue allocation appears to have exposed a long-standing bug.

drivers/block/DAC960.c

index 271d5e0a4f1edb35fbfff498ead09c86c120ec8f..ce648035dcbc6285598253e80c0dbc4214398b86 100644 (file)
@@ -2487,6 +2487,8 @@ static boolean DAC960_RegisterBlockDevice(DAC960_Controller_T *Controller)
 
   for (n = 0; n < DAC960_MaxLogicalDrives; n++) {
        struct gendisk *disk = Controller->disks[n];
+
+       disk->queue = RequestQueue;
        sprintf(disk->disk_name, "rd/c%dd%d", Controller->ControllerNumber, n);
        sprintf(disk->devfs_name, "rd/c%dd%d", Controller->ControllerNumber, n);
        disk->major = MajorNumber;
@@ -2717,7 +2719,6 @@ DAC960_DetectController(struct pci_dev *PCI_Device,
        if (!Controller->disks[i])
                goto Failure;
        Controller->disks[i]->private_data = (void *)i;
-       Controller->disks[i]->queue = Controller->RequestQueue;
   }
   init_waitqueue_head(&Controller->CommandWaitQueue);
   init_waitqueue_head(&Controller->HealthStatusWaitQueue);