firewire: fw-sbp2: implement max sectors limit for some old bridges
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Sun, 17 Jun 2007 21:52:08 +0000 (23:52 +0200)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Mon, 9 Jul 2007 22:07:44 +0000 (00:07 +0200)
This currently only affects one bridge in the hardwired blacklist.
I don't own one of those, hence haven't tested it.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/fw-sbp2.c

index 851c2da060d24175a7e059160029ce61a5dae56f..49f7fd52ae8745b213e40d20cbf329973d83e1bd 100644 (file)
@@ -34,6 +34,7 @@
 #include <linux/device.h>
 #include <linux/scatterlist.h>
 #include <linux/dma-mapping.h>
+#include <linux/blkdev.h>
 #include <linux/timer.h>
 
 #include <scsi/scsi.h>
@@ -1080,7 +1081,8 @@ static int sbp2_scsi_slave_configure(struct scsi_device *sdev)
                fw_notify("setting fix_capacity for %s\n", unit->device.bus_id);
                sdev->fix_capacity = 1;
        }
-
+       if (sd->workarounds & SBP2_WORKAROUND_128K_MAX_TRANS)
+               blk_queue_max_sectors(sdev->request_queue, 128 * 1024 / 512);
        return 0;
 }