Alan Stern
6a0bdffa00
SCSI & usb-storage: add try_rc_10_first flag
...
Several bug reports have been received recently for USB mass-storage
devices that don't handle READ CAPACITY(16) commands properly. They
report bogus sizes, in some cases becoming unusable as a result.
The bugs were triggered by commit
09b6b51b0b6c1b9bb61815baf205e4d74c89ff04 (SCSI & usb-storage: add
flags for VPD pages and REPORT LUNS), which caused usb-storage to stop
overriding the SCSI level reported by devices. By default, the sd
driver will try READ CAPACITY(16) first for any device whose level is
above SCSI_SPC_2.
It seems likely that any device large enough to require the use of
READ CAPACITY(16) (i.e., 2 TB or more) would be able to handle READ
CAPACITY(10) commands properly. Indeed, I don't know of any devices
that don't handle READ CAPACITY(10) properly.
Therefore this patch (as1559) adds a new flag telling the sd driver
to try READ CAPACITY(10) before READ CAPACITY(16), and sets this flag
for every USB mass-storage device. If a device really is larger than
2 TB, sd will fall back to READ CAPACITY(16) just as it used to.
This fixes Bugzilla #43391 .
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Hans de Goede <hdegoede@redhat.com>
CC: "James E.J. Bottomley" <JBottomley@parallels.com>
CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-22 22:05:31 -07:00
..
2012-04-23 19:28:24 +01:00
2012-03-30 16:03:15 -07:00
2011-03-31 11:26:23 -03:00
2012-04-30 13:22:58 +02:00
2012-03-28 18:30:03 +01:00
2012-03-28 15:58:21 -07:00
2012-05-30 13:34:22 +04:00
2012-05-22 11:06:29 +01:00
2012-05-23 09:43:13 +01:00
2012-05-10 09:04:18 +01:00
2012-03-22 12:55:29 -07:00
2012-04-23 19:28:18 +01:00
2011-07-26 16:49:47 -07:00
2012-05-23 09:43:13 +01:00
2011-06-29 16:05:41 -05:00
2012-03-28 11:33:24 +11:00
2012-05-17 14:33:44 -07:00
2012-05-21 12:17:30 +01:00
2012-04-23 12:15:53 +01:00
2012-05-17 11:18:30 +01:00
2012-04-23 19:26:41 +01:00
2012-06-06 12:38:56 +09:00
2012-03-22 12:55:29 -07:00
2012-02-25 08:25:09 -06:00
2012-01-13 09:32:20 +10:30
2012-05-10 09:02:07 +01:00
2012-06-12 21:25:50 -07:00
2012-05-30 13:01:34 +04:00
2012-01-10 17:01:18 -06:00
2012-05-23 09:29:39 +01:00
2011-09-26 09:28:58 -05:00
2011-03-31 11:26:23 -03:00
2010-11-16 13:33:23 -08:00
2010-11-16 13:33:23 -08:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2012-03-28 18:30:03 +01:00
2011-03-31 11:26:23 -03:00
2010-12-22 18:57:02 +01:00
2011-10-31 19:31:24 -04:00
2010-05-26 19:51:07 +02:00
2011-10-31 19:31:24 -04:00
2010-05-26 19:51:07 +02:00
2010-05-26 19:51:09 +02:00
2012-03-28 18:30:03 +01:00
2012-03-28 18:30:03 +01:00
2012-05-17 19:03:54 -04:00
2010-11-16 13:33:23 -08:00
2012-03-28 18:30:03 +01:00
2011-03-31 11:26:23 -03:00
2011-06-29 15:11:21 -05:00
2012-04-22 20:16:49 +02:00
2012-04-22 20:16:49 +02:00
2012-03-31 13:31:23 -07:00
2012-03-28 18:30:03 +01:00
2010-11-16 13:33:23 -08:00
2010-10-22 10:52:56 -07:00
2011-05-23 09:12:26 -07:00
2012-01-13 09:32:20 +10:30
2011-03-31 11:26:23 -03:00
2011-05-01 10:22:40 -05:00
2010-11-16 13:33:23 -08:00
2012-03-28 18:30:03 +01:00
2010-11-16 13:33:23 -08:00
2011-05-01 10:22:40 -05:00
2011-05-01 10:22:40 -05:00
2012-04-05 17:09:40 -07:00
2012-03-28 18:30:03 +01:00
2011-03-31 11:26:23 -03:00
2012-03-28 18:30:03 +01:00
2010-11-16 13:33:23 -08:00
2010-12-31 09:50:09 -06:00
2012-03-28 18:30:03 +01:00
2011-12-06 09:53:40 +01:00
2011-10-31 19:31:24 -04:00
2010-05-26 19:51:08 +02:00
2012-05-10 08:24:13 +01:00
2012-05-10 09:19:39 +01:00
2012-05-10 09:19:39 +01:00
2012-05-10 09:19:39 +01:00
2010-11-16 13:33:23 -08:00
2011-03-31 11:26:23 -03:00
2012-03-28 18:30:03 +01:00
2010-11-16 13:33:23 -08:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2012-04-23 12:11:47 +01:00
2012-03-28 15:09:28 +01:00
2012-03-20 21:48:19 +08:00
2011-03-31 11:26:23 -03:00
2012-01-03 22:54:55 -05:00
2012-04-21 15:52:25 -04:00
2011-02-24 12:41:10 -05:00
2012-01-02 13:04:55 +01:00
2012-05-23 17:12:06 -07:00
2012-03-22 12:55:29 -07:00
2012-02-19 08:09:00 -06:00
2011-10-31 19:31:24 -04:00
2012-03-28 18:30:03 +01:00
2012-01-22 14:50:03 +01:00
2012-03-28 18:30:03 +01:00
2012-05-17 19:03:54 -04:00
2012-03-20 21:48:19 +08:00
2011-03-31 11:26:23 -03:00
2012-03-28 18:30:03 +01:00
2010-05-26 19:51:07 +02:00
2010-05-02 15:55:03 -04:00
2011-08-27 08:36:58 -06:00
2011-08-27 08:36:58 -06:00
2012-03-28 18:30:03 +01:00
2010-11-16 13:33:23 -08:00
2011-03-31 11:26:23 -03:00
2010-11-16 13:33:23 -08:00
2011-05-10 10:16:21 +02:00
2012-03-28 18:30:03 +01:00
2011-03-31 11:26:23 -03:00
2012-03-28 18:30:03 +01:00
2011-03-31 11:26:23 -03:00
2012-03-28 18:30:03 +01:00
2010-11-16 13:33:23 -08:00
2011-12-15 16:35:38 +01:00
2012-02-21 11:40:37 +01:00
2010-11-16 13:33:23 -08:00
2011-10-31 19:31:24 -04:00
2012-04-30 13:25:43 +02:00
2010-11-16 13:33:23 -08:00
2010-11-16 13:33:23 -08:00
2012-03-28 18:30:03 +01:00
2010-08-06 09:25:50 -06:00
2012-03-31 13:31:23 -07:00
2011-06-29 15:08:47 -05:00
2012-05-22 19:22:50 -07:00
2011-10-31 19:31:23 -04:00
2012-05-23 09:34:17 +01:00
2012-01-14 18:36:33 -08:00
2012-05-22 11:09:50 +01:00
2012-05-17 09:10:46 +01:00
2011-05-28 23:12:11 -07:00
2012-05-30 13:37:07 +04:00
2011-08-27 08:36:46 -06:00
2011-10-31 19:31:23 -04:00
2011-05-01 10:20:10 -05:00
2011-05-24 12:38:36 -04:00
2012-05-10 08:59:23 +01:00
2012-03-27 08:26:36 +01:00
2012-02-29 15:43:54 -06:00
2012-05-10 09:06:12 +01:00
2012-05-30 13:46:37 +04:00
2012-06-07 10:16:20 +09:00
2012-01-03 22:54:07 -05:00
2012-03-20 21:48:19 +08:00
2012-06-22 22:05:31 -07:00
2012-02-19 10:14:52 -06:00
2011-06-29 12:14:25 -05:00
2012-05-17 10:08:57 +01:00
2011-04-06 06:19:38 -07:00
2012-05-17 19:03:54 -04:00
2012-01-02 13:04:55 +01:00
2011-10-31 19:31:24 -04:00
2011-07-21 14:15:58 -07:00
2011-07-21 14:15:58 -07:00
2012-03-31 13:31:23 -07:00
2012-05-10 08:32:34 +01:00
2010-11-16 13:33:23 -08:00
2012-04-25 09:51:43 +01:00
2011-06-29 15:15:05 -05:00
2012-03-28 18:30:03 +01:00
2012-03-28 18:30:03 +01:00
2010-11-16 13:33:23 -08:00
2011-02-28 01:36:39 -07:00
2012-03-28 18:30:03 +01:00
2010-11-16 13:33:23 -08:00
2012-03-28 18:30:03 +01:00
2010-11-16 13:33:23 -08:00
2011-05-01 10:22:40 -05:00
2012-03-28 18:30:03 +01:00
2012-03-28 18:30:03 +01:00
2010-11-16 13:33:23 -08:00
2012-05-10 08:27:06 +01:00
2012-03-27 08:26:36 +01:00
2012-03-27 08:26:36 +01:00
2011-05-26 13:19:00 -07:00
2010-11-16 13:33:23 -08:00
2012-03-28 18:30:03 +01:00
2010-05-17 21:37:41 +02:00