diff options
Diffstat (limited to 'drivers/usb')
| -rw-r--r-- | drivers/usb/gadget/f_mass_storage_tmp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/gadget/f_mass_storage_tmp.c b/drivers/usb/gadget/f_mass_storage_tmp.c index 9444d08916b..14fd333ff90 100644 --- a/drivers/usb/gadget/f_mass_storage_tmp.c +++ b/drivers/usb/gadget/f_mass_storage_tmp.c @@ -1740,9 +1740,10 @@ static int check_command(struct fsg_dev *fsg, int cmnd_size, /* Verify the length of the command itself */ if (cmnd_size != fsg->cmnd_size) { - /* Special case workaround: MS-Windows issues REQUEST SENSE - * with cbw->Length == 12 (it should be 6). */ - if (fsg->cmnd[0] == SC_REQUEST_SENSE && fsg->cmnd_size == 12) + /* Special case workaround: MS-Windows issues REQUEST_SENSE + * and INQUIRY commands with cbw->Length == 12 (it should be 6). */ + if ((fsg->cmnd[0] == SC_REQUEST_SENSE && fsg->cmnd_size == 12) + || (fsg->cmnd[0] == SC_INQUIRY && fsg->cmnd_size == 12)) cmnd_size = fsg->cmnd_size; else { fsg->phase_error = 1; |
