]> git.hungrycats.org Git - linux/commitdiff
Limit USB storage transfers to 240 sectors.
authorLinus Torvalds <torvalds@home.osdl.org>
Fri, 21 Nov 2003 07:34:19 +0000 (23:34 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Fri, 21 Nov 2003 07:34:19 +0000 (23:34 -0800)
drivers/usb/storage/scsiglue.c

index 2cf3f3049a682c8d1162446a5f7d5321e359333f..5035f8b77d3c7894c631d30831c16db53fcec39d 100644 (file)
@@ -312,6 +312,9 @@ struct scsi_host_template usb_stor_host_template = {
        /* lots of sg segments can be handled */
        .sg_tablesize =                 SG_ALL,
 
+       /* limit the total size of a transfer to 120 KB */
+       .max_sectors =                  240,
+
        /* merge commands... this seems to help performance, but
         * periodically someone should test to see which setting is more
         * optimal.