public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tormod Volden <lists.tormod@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] usb:composite:fix Provide function data when addressing device with only one interface
Date: Thu, 27 Jun 2013 21:36:09 +0000 (UTC)	[thread overview]
Message-ID: <loom.20130627T225900-392@post.gmane.org> (raw)
In-Reply-To: 1362148218-22392-1-git-send-email-l.majewski@samsung.com

Lukasz Majewski writes:
> 
> This commit fixes problems with some non-standard requests send with
> device address instead of interface address (bmRequestType.Receipent field).
> 
> This happens with dfu-util (debian version: 0.5), which address non standard
> requests (like w_value=0x21 and bRequest=GET_DESCRIPTOR) to device.


Dear u-boot developers,

The above comment seems to imply that dfu-util is sending non-standard
requests. For the record, that would be wrong. dfu-util is sending a
standard "get descriptor" request. These always go to the device, not to an
interface. The descriptor it is asking for is, although not mandatory per
the core USB standard, a class-specific descriptor which is part of the DFU
1.0 standard. So this is all standard.

While on this topic, I would recommend that you include this descriptor in
the configuration descriptor set, that is, in the complete configuration
descriptor that the host OS usually requests during enumeration. Also this
class-specific descriptor belongs here. In that case, the OS and libusb will
keep a copy of this descriptor, and dfu-util will not have to send an
explicit request (through libusb_get_descriptor()) to retrieve it.


> Without this fix, the above request is STALLED, and hence causes dfu-util
> to assume some standard configuration (packet size = 1024B instead of 4096B)

Note that this number is the "Maximum number of bytes that the device can
accept per control-write transaction."

The DFU transactions should work fine if a smaller packet size is used - as
long as it is larger or equal to the bMaxPacketSize0. Of course, smaller
packets will cause more overhead and be less efficient, but you must make
sure that your device can handle this. I am not sure from these comments
whether the smaller packet size caused errors in your implementation, or if
the problem was just reduced performance.

Best regards,
Tormod Volden

  parent reply	other threads:[~2013-06-27 21:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-01 14:30 [U-Boot] [PATCH] usb:composite:fix Provide function data when addressing device with only one interface Lukasz Majewski
2013-03-01 14:34 ` Marek Vasut
2013-03-01 15:34   ` Lukasz Majewski
2013-03-05 23:24     ` Marek Vasut
2013-03-05 23:44       ` Tom Rini
2013-03-05 23:54         ` Marek Vasut
2013-03-06  0:26           ` Tom Rini
2013-03-06  0:55             ` Marek Vasut
2013-03-06  1:38               ` Tom Rini
2013-03-06  7:42         ` Lukasz Majewski
2013-03-06  7:45           ` Pantelis Antoniou
2013-03-06 13:03             ` Tom Rini
2013-03-01 16:46 ` Tom Rini
2013-06-27 21:36 ` Tormod Volden [this message]
2013-07-01  6:28   ` Lukasz Majewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20130627T225900-392@post.gmane.org \
    --to=lists.tormod@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox