From: Stefan Richter Date: Sun, 17 Jun 2007 21:52:08 +0000 (+0200) Subject: firewire: fw-sbp2: implement max sectors limit for some old bridges X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cf47c7a26ca13b944900dce208890c5b6d5f3a14;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git firewire: fw-sbp2: implement max sectors limit for some old bridges 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 --- diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c index 851c2da060d2..49f7fd52ae87 100644 --- a/drivers/firewire/fw-sbp2.c +++ b/drivers/firewire/fw-sbp2.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -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; }