summaryrefslogtreecommitdiff
path: root/firmware/usbstack
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/usbstack')
-rw-r--r--firmware/usbstack/usb_storage.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/firmware/usbstack/usb_storage.c b/firmware/usbstack/usb_storage.c
index c32c9df..a1faf3d 100644
--- a/firmware/usbstack/usb_storage.c
+++ b/firmware/usbstack/usb_storage.c
@@ -486,15 +486,11 @@ static void identify2inquiry(int lun)
inquiry->DeviceTypeModifier = DEVICE_REMOVABLE;
/* ATA only has a 'model' field, so we copy the
- first 8 bytes to 'vendor' and the rest to 'product' */
+ first 8 bytes to 'vendor' and the rest to 'product' (they are
+ consecutive in the inquiry struct) */
src = (unsigned short*)&identify[27];
dest = (unsigned short*)&inquiry->VendorId;
- for (i=0;i<4;i++)
- dest[i] = htobe16(src[i]);
-
- src = (unsigned short*)&identify[27+8];
- dest = (unsigned short*)&inquiry->ProductId;
- for (i=0;i<8;i++)
+ for (i=0;i<12;i++)
dest[i] = htobe16(src[i]);
src = (unsigned short*)&identify[23];