diff mbox

[3/7] usb: Update device class in usb device's descriptor

Message ID 1364376543-7526-4-git-send-email-gautam.vivek@samsung.com
State New
Headers show

Commit Message

Vivek Gautam March 27, 2013, 9:28 a.m. UTC
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(-)

Comments

Marek Vasut March 28, 2013, 2:28 p.m. UTC | #1
Dear Vivek Gautam,

> 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>

Is this a full name? Otherwise this patch is OK.

> ---
>  common/usb.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/common/usb.c b/common/usb.c
> index 40c1547..39fcedd 100644
> --- a/common/usb.c
> +++ b/common/usb.c
> @@ -888,6 +888,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) {
>  		int j;

Best regards,
Marek Vasut
Vivek Gautam April 2, 2013, 9:32 a.m. UTC | #2
CC: Amarendra


On Thu, Mar 28, 2013 at 7:58 PM, Marek Vasut <marex@denx.de> wrote:
> Dear Vivek Gautam,
>
>> 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>
>
> Is this a full name? Otherwise this patch is OK.
>
>> ---
>>  common/usb.c |    5 +++++
>>  1 files changed, 5 insertions(+), 0 deletions(-)
>>
>> diff --git a/common/usb.c b/common/usb.c
>> index 40c1547..39fcedd 100644
>> --- a/common/usb.c
>> +++ b/common/usb.c
>> @@ -888,6 +888,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) {
>>               int j;
>
> Best regards,
> Marek Vasut
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
Marek Vasut April 2, 2013, 10:09 a.m. UTC | #3
Dear Vivek Gautam,

> CC: Amarendra
> 
> On Thu, Mar 28, 2013 at 7:58 PM, Marek Vasut <marex@denx.de> wrote:
> > Dear Vivek Gautam,
> > 
> >> 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>
> > 
> > Is this a full name? Otherwise this patch is OK.
> > 
> >> ---
> >> 
> >>  common/usb.c |    5 +++++
> >>  1 files changed, 5 insertions(+), 0 deletions(-)
> >> 
> >> diff --git a/common/usb.c b/common/usb.c
> >> index 40c1547..39fcedd 100644
> >> --- a/common/usb.c
> >> +++ b/common/usb.c
> >> @@ -888,6 +888,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;
> >> +

btw this really needs fixing, both the comment and the dangling newline.

> >>       /* find the port number we're at */
> >>       if (parent) {
> >>       
> >>               int j;
> > 
> > Best regards,
> > Marek Vasut

Best regards,
Marek Vasut
Vivek Gautam April 2, 2013, 10:30 a.m. UTC | #4
Hi,


On Tue, Apr 2, 2013 at 3:39 PM, Marek Vasut <marex@denx.de> wrote:
> Dear Vivek Gautam,
>
>> CC: Amarendra
>>
>> On Thu, Mar 28, 2013 at 7:58 PM, Marek Vasut <marex@denx.de> wrote:
>> > Dear Vivek Gautam,
>> >
>> >> 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>
>> >
>> > Is this a full name? Otherwise this patch is OK.
>> >
>> >> ---
>> >>
>> >>  common/usb.c |    5 +++++
>> >>  1 files changed, 5 insertions(+), 0 deletions(-)
>> >>
>> >> diff --git a/common/usb.c b/common/usb.c
>> >> index 40c1547..39fcedd 100644
>> >> --- a/common/usb.c
>> >> +++ b/common/usb.c
>> >> @@ -888,6 +888,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;
>> >> +
>
> btw this really needs fixing, both the comment and the dangling newline.

Sure, will fix this.

>
>> >>       /* find the port number we're at */
>> >>       if (parent) {
>> >>
>> >>               int j;
>> >
diff mbox

Patch

diff --git a/common/usb.c b/common/usb.c
index 40c1547..39fcedd 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -888,6 +888,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) {
 		int j;