USB: android gadget: mass storage: Fix format issue for Vista Host
authorVelempati Chiranjeevi <c_cvelem@qualcomm.com>
Wed, 21 Oct 2009 04:23:10 +0000 (09:53 +0530)
committerColin Cross <ccross@android.com>
Thu, 30 Sep 2010 00:49:33 +0000 (17:49 -0700)
commitc600bd3a2469fc006036730c84b585c7d89e2a14
tree75f6145ff7be6172d0fe152f45e2b45c8dd5292b
parentfdcec72817775d290c381cc0d7da12c10fca3a11
USB: android gadget: mass storage: Fix format issue for Vista Host

As part of formating the mass storage device, Host sends the INQUIRY
scsi command. As per the standard, the command length for this
command should be 6 bytes, whereas the Vista host sends 12 bytes.

When the command length of the command is not equal to the standard
length, the device sends a phase error as part of the status phase.
When the host receives a phase error, it re-enumerates, hence the
error.

If the command is INQUIRY, and the command length is 12 bytes,
treating this as a good command and not sending the phase error
to the host fixes this issue.

Signed-off-by: Velempati Chiranjeevi <c_cvelem@qualcomm.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
drivers/usb/gadget/f_mass_storage_tmp.c