aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikunj A Dadhania <nikunj@linux.vnet.ibm.com>2014-03-26 10:10:48 +0530
committerNikunj A Dadhania <nikunj@linux.vnet.ibm.com>2014-03-26 10:10:48 +0530
commita6c2d4cfd20dc43e8dd2ccf8443c34e10f18c685 (patch)
treec552b2139a086c63370b5983023d81ade5dabfca
parente59d25edd04bc60008f72d991d4441d93c8e0c06 (diff)
downloadSLOF-a6c2d4cfd20dc43e8dd2ccf8443c34e10f18c685.zip
SLOF-a6c2d4cfd20dc43e8dd2ccf8443c34e10f18c685.tar.gz
SLOF-a6c2d4cfd20dc43e8dd2ccf8443c34e10f18c685.tar.bz2
usb-core: adjust port numbers in set_address
There is a mismatch between the port number between qemu and slof. Was unearthed while using bootindex. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
-rw-r--r--lib/libusb/usb-core.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/libusb/usb-core.c b/lib/libusb/usb-core.c
index aa41b97..6719c57 100644
--- a/lib/libusb/usb-core.c
+++ b/lib/libusb/usb-core.c
@@ -512,7 +512,14 @@ int setup_new_device(struct usb_dev *dev, unsigned int port)
* devices
*/
if (dev->speed != USB_SUPER_SPEED) {
- if(!usb_set_address(dev, port))
+ /*
+ * Qemu starts the port number from 1 which was
+ * revealed in bootindex and resulted in mismatch for
+ * storage devices names. Adjusting this here for
+ * compatibility.
+ */
+ dev->port = port + 1;
+ if(!usb_set_address(dev, dev->port))
goto fail;
}
mb();