Patchwork [U-Boot,v2,3/5] usb: Update device class in usb device's descriptor

login
register
mail settings
Submitter Vivek Gautam
Date April 8, 2013, 10:35 a.m.
Message ID <1365417358-31921-4-git-send-email-gautam.vivek@samsung.com>
Download mbox | patch
Permalink /patch/234730/
State Superseded
Delegated to: Marek Vasut
Headers show

Comments

Vivek Gautam - April 8, 2013, 10:35 a.m.
Fetch the device class into usb device's dwcriptors,
so that the host controller's driver can use this info
to differentiate between HUB and DEVICE.

Signed-off-by: Amar <amarendra.xt@samsung.com>
---
 common/usb.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

Patch

diff --git a/common/usb.c b/common/usb.c
index 872d62f..fd1cad1 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -890,6 +890,11 @@  int usb_new_device(struct usb_device *dev)
 	}
 
 	dev->descriptor.bMaxPacketSize0 = desc->bMaxPacketSize0;
+	/*
+	 * Fetch the device class, driver can use this info
+	 * to differentiate between HUB and DEVICE.
+	 */
+	dev->descriptor.bDeviceClass = desc->bDeviceClass;
 
 	/* find the port number we're at */
 	if (parent) {