* [U-Boot] dfu: some wrong usb_qualifier_descriptor settings?
@ 2014-08-21 5:25 Heiko Schocher
2014-08-22 12:11 ` Lukasz Majewski
0 siblings, 1 reply; 3+ messages in thread
From: Heiko Schocher @ 2014-08-21 5:25 UTC (permalink / raw)
To: u-boot
Hello Lukasz,
In the dfu spez [1] chapter 4.2.1 the following fields are specified:
bDeviceClass = 00h (Description: ?see interface?), currently set in
U-Boot to 2.
bDeviceSubClass = 00h (Description: ?see interface?), currently set in
U-Boot to 2.
bcdUSB = xxxxh (Description: USB specification release number in binary coded decimal -> 0110h)
Currently set to 0x200
If I look in ./drivers/usb/gadget/f_dfu.c:
static const struct usb_qualifier_descriptor dev_qualifier = {
.bLength = sizeof dev_qualifier,
.bDescriptorType = USB_DT_DEVICE_QUALIFIER,
.bcdUSB = __constant_cpu_to_le16(0x0200),
.bDeviceClass = USB_CLASS_VENDOR_SPEC,
.bNumConfigurations = 1,
};
bDeviceClass = USB_CLASS_VENDOR_SPEC = 0xff ?
Hmm... why states the doc this should be set to 0 = USB_CLASS_PER_INTERFACE?
2 is USB_CLASS_COMM ... which seems more appropriate ...
bDeviceSubClass is not defined ...
bcdUSB = 0x0200 which should be 0x0110 ... oh, as [1] is the dfu 1.1
specification it should be 0x0110 but the spec [1] says 0100 ... is the
spec here buggy? is there a dfu 2.0 specification availiable?
Has this differences to the spec some reason? Or can we change them
to the values specified in the spec?
Thanks!
bye,
Heiko
[1]: http://www.usb.org/developers/devclass_docs/DFU_1.1.pdf
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] dfu: some wrong usb_qualifier_descriptor settings?
2014-08-21 5:25 [U-Boot] dfu: some wrong usb_qualifier_descriptor settings? Heiko Schocher
@ 2014-08-22 12:11 ` Lukasz Majewski
2014-08-25 5:49 ` Heiko Schocher
0 siblings, 1 reply; 3+ messages in thread
From: Lukasz Majewski @ 2014-08-22 12:11 UTC (permalink / raw)
To: u-boot
Hi Heiko,
> Hello Lukasz,
>
> In the dfu spez [1] chapter 4.2.1 the following fields are specified:
>
> bDeviceClass = 00h (Description: ?see interface?), currently set in
> U-Boot to 2.
>
> bDeviceSubClass = 00h (Description: ?see interface?), currently set in
> U-Boot to 2.
>
> bcdUSB = xxxxh (Description: USB specification release number in
> binary coded decimal -> 0110h) Currently set to 0x200
>
> If I look in ./drivers/usb/gadget/f_dfu.c:
>
> static const struct usb_qualifier_descriptor dev_qualifier = {
> .bLength = sizeof dev_qualifier,
> .bDescriptorType = USB_DT_DEVICE_QUALIFIER,
> .bcdUSB = __constant_cpu_to_le16(0x0200),
> .bDeviceClass = USB_CLASS_VENDOR_SPEC,
> .bNumConfigurations = 1,
> };
>
> bDeviceClass = USB_CLASS_VENDOR_SPEC = 0xff ?
>
> Hmm... why states the doc this should be set to 0 =
> USB_CLASS_PER_INTERFACE? 2 is USB_CLASS_COMM ... which seems more
> appropriate ...
The bDeviceClass seems to be set to wrong value. I think that it should
have values as they are specified by the standard.
>
> bDeviceSubClass is not defined ...
> bcdUSB = 0x0200 which should be 0x0110 ... oh, as [1] is the dfu 1.1
> specification it should be 0x0110 but the spec [1] says 0100 ... is
> the spec here buggy? is there a dfu 2.0 specification availiable?
The 2.0 value is a reminiscent of the original DFU code (once prepared
for Linux) and was wrongly set to indicate USB 2.0.
I think that we should have 0x0110, which indicates supported DFU
version 1.1.
>
> Has this differences to the spec some reason? Or can we change them
> to the values specified in the spec?
I think that values which you have pointed out are wrong and should be
changed to the one from spec.
>
> Thanks!
>
> bye,
> Heiko
>
> [1]: http://www.usb.org/developers/devclass_docs/DFU_1.1.pdf
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] dfu: some wrong usb_qualifier_descriptor settings?
2014-08-22 12:11 ` Lukasz Majewski
@ 2014-08-25 5:49 ` Heiko Schocher
0 siblings, 0 replies; 3+ messages in thread
From: Heiko Schocher @ 2014-08-25 5:49 UTC (permalink / raw)
To: u-boot
Hello Lukasz,
Am 22.08.2014 14:11, schrieb Lukasz Majewski:
> Hi Heiko,
>
>> Hello Lukasz,
>>
>> In the dfu spez [1] chapter 4.2.1 the following fields are specified:
>>
>> bDeviceClass = 00h (Description: ?see interface?), currently set in
>> U-Boot to 2.
>>
>> bDeviceSubClass = 00h (Description: ?see interface?), currently set in
>> U-Boot to 2.
>>
>> bcdUSB = xxxxh (Description: USB specification release number in
>> binary coded decimal -> 0110h) Currently set to 0x200
>>
>> If I look in ./drivers/usb/gadget/f_dfu.c:
>>
>> static const struct usb_qualifier_descriptor dev_qualifier = {
>> .bLength = sizeof dev_qualifier,
>> .bDescriptorType = USB_DT_DEVICE_QUALIFIER,
>> .bcdUSB = __constant_cpu_to_le16(0x0200),
>> .bDeviceClass = USB_CLASS_VENDOR_SPEC,
>> .bNumConfigurations = 1,
>> };
>>
>> bDeviceClass = USB_CLASS_VENDOR_SPEC = 0xff ?
>>
>> Hmm... why states the doc this should be set to 0 =
>> USB_CLASS_PER_INTERFACE? 2 is USB_CLASS_COMM ... which seems more
>> appropriate ...
>
> The bDeviceClass seems to be set to wrong value. I think that it should
> have values as they are specified by the standard.
>
>>
>> bDeviceSubClass is not defined ...
>> bcdUSB = 0x0200 which should be 0x0110 ... oh, as [1] is the dfu 1.1
>> specification it should be 0x0110 but the spec [1] says 0100 ... is
>> the spec here buggy? is there a dfu 2.0 specification availiable?
>
> The 2.0 value is a reminiscent of the original DFU code (once prepared
> for Linux) and was wrongly set to indicate USB 2.0.
>
> I think that we should have 0x0110, which indicates supported DFU
> version 1.1.
>
>>
>> Has this differences to the spec some reason? Or can we change them
>> to the values specified in the spec?
>
> I think that values which you have pointed out are wrong and should be
> changed to the one from spec.
Thanks! Changed. I send a patch soon.
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-25 5:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-21 5:25 [U-Boot] dfu: some wrong usb_qualifier_descriptor settings? Heiko Schocher
2014-08-22 12:11 ` Lukasz Majewski
2014-08-25 5:49 ` Heiko Schocher
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.