diff options
Diffstat (limited to 'drivers/usb/storage/usb.c')
-rw-r--r-- | drivers/usb/storage/usb.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 5ee7ac42e08f..0ca095820f3e 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c | |||
@@ -440,7 +440,8 @@ static void adjust_quirks(struct us_data *us) | |||
440 | US_FL_NOT_LOCKABLE | US_FL_MAX_SECTORS_64 | | 440 | US_FL_NOT_LOCKABLE | US_FL_MAX_SECTORS_64 | |
441 | US_FL_CAPACITY_OK | US_FL_IGNORE_RESIDUE | | 441 | US_FL_CAPACITY_OK | US_FL_IGNORE_RESIDUE | |
442 | US_FL_SINGLE_LUN | US_FL_NO_WP_DETECT | | 442 | US_FL_SINGLE_LUN | US_FL_NO_WP_DETECT | |
443 | US_FL_NO_READ_DISC_INFO | US_FL_NO_READ_CAPACITY_16); | 443 | US_FL_NO_READ_DISC_INFO | US_FL_NO_READ_CAPACITY_16 | |
444 | US_FL_INITIAL_READ10); | ||
444 | 445 | ||
445 | p = quirks; | 446 | p = quirks; |
446 | while (*p) { | 447 | while (*p) { |
@@ -490,6 +491,9 @@ static void adjust_quirks(struct us_data *us) | |||
490 | case 'm': | 491 | case 'm': |
491 | f |= US_FL_MAX_SECTORS_64; | 492 | f |= US_FL_MAX_SECTORS_64; |
492 | break; | 493 | break; |
494 | case 'n': | ||
495 | f |= US_FL_INITIAL_READ10; | ||
496 | break; | ||
493 | case 'o': | 497 | case 'o': |
494 | f |= US_FL_CAPACITY_OK; | 498 | f |= US_FL_CAPACITY_OK; |
495 | break; | 499 | break; |
@@ -953,6 +957,13 @@ int usb_stor_probe2(struct us_data *us) | |||
953 | if (result) | 957 | if (result) |
954 | goto BadDevice; | 958 | goto BadDevice; |
955 | 959 | ||
960 | /* | ||
961 | * If the device returns invalid data for the first READ(10) | ||
962 | * command, indicate the command should be retried. | ||
963 | */ | ||
964 | if (us->fflags & US_FL_INITIAL_READ10) | ||
965 | set_bit(US_FLIDX_REDO_READ10, &us->dflags); | ||
966 | |||
956 | /* Acquire all the other resources and add the host */ | 967 | /* Acquire all the other resources and add the host */ |
957 | result = usb_stor_acquire_resources(us); | 968 | result = usb_stor_acquire_resources(us); |
958 | if (result) | 969 | if (result) |