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 4219c197cb08..07d6d739c1ee 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c @@ -439,7 +439,8 @@ static void adjust_quirks(struct us_data *us) US_FL_CAPACITY_HEURISTICS | US_FL_IGNORE_DEVICE | US_FL_NOT_LOCKABLE | US_FL_MAX_SECTORS_64 | US_FL_CAPACITY_OK | US_FL_IGNORE_RESIDUE | - US_FL_SINGLE_LUN | US_FL_NO_WP_DETECT); + US_FL_SINGLE_LUN | US_FL_NO_WP_DETECT | + US_FL_INITIAL_READ10); p = quirks; while (*p) { @@ -483,6 +484,9 @@ static void adjust_quirks(struct us_data *us) case 'm': f |= US_FL_MAX_SECTORS_64; break; + case 'n': + f |= US_FL_INITIAL_READ10; + break; case 'o': f |= US_FL_CAPACITY_OK; break; @@ -946,6 +950,13 @@ int usb_stor_probe2(struct us_data *us) if (result) goto BadDevice; + /* + * If the device returns invalid data for the first READ(10) + * command, indicate the command should be retried. + */ + if (us->fflags & US_FL_INITIAL_READ10) + set_bit(US_FLIDX_REDO_READ10, &us->dflags); + /* Acquire all the other resources and add the host */ result = usb_stor_acquire_resources(us); if (result) |