]> git.hungrycats.org Git - linux/commitdiff
[PATCH] imm.c oops fix
authorAlexander Viro <viro@parcelfarce.linux.theplanet.co.uk>
Thu, 5 Aug 2004 10:56:22 +0000 (03:56 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 5 Aug 2004 10:56:22 +0000 (03:56 -0700)
Fix bug #3125:

This should fix the problem; however, we will need to repeat that for all
PIO SCSI drivers (another immediate victim is ppa.c).

We should start looking for sane solution; I _really_ don't like the kludge
with using ->slave_alloc() for fixups after scsi_alloc_queue().

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/scsi/imm.c

index 1bf42180f2d48d272850889450bb1b7d9cd573c9..915d593fbf21b2760981fb04b67ed1689a74e880 100644 (file)
@@ -1118,6 +1118,12 @@ static int device_check(imm_struct *dev)
        return -ENODEV;
 }
 
+static int imm_adjust_queue(struct scsi_device *device)
+{
+       blk_queue_bounce_limit(device->request_queue, BLK_BOUNCE_HIGH);
+       return 0;
+}
+
 static struct scsi_host_template imm_template = {
        .module                 = THIS_MODULE,
        .proc_name              = "imm",
@@ -1133,6 +1139,7 @@ static struct scsi_host_template imm_template = {
        .cmd_per_lun            = 1,
        .use_clustering         = ENABLE_CLUSTERING,
        .can_queue              = 1,
+       .slave_alloc            = imm_adjust_queue,
 };
 
 /***************************************************************************