diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2017-02-22 09:22:38 (GMT) |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2017-02-26 12:24:30 (GMT) |
commit | 9bf9e813584c23b677e92d8dca742ae9ef27fc94 (patch) | |
tree | b9099cb4d270d5f9cbbe88b5169760d51db53459 /drivers/usb/gadget | |
parent | 949bf79e73a12961cf1310baf411647083f34b34 (diff) | |
download | u-boot-fsl-qoriq-9bf9e813584c23b677e92d8dca742ae9ef27fc94.tar.xz |
usb: gadget: f_dfu: set serial number if serial# is valid
With this patch, USB Command Verifier is happy with our DFU
implementation on Chapter 9 tests.
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/f_dfu.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/gadget/f_dfu.c b/drivers/usb/gadget/f_dfu.c index 81929d3..dfa4359 100644 --- a/drivers/usb/gadget/f_dfu.c +++ b/drivers/usb/gadget/f_dfu.c @@ -691,6 +691,7 @@ static int dfu_bind(struct usb_configuration *c, struct usb_function *f) { struct usb_composite_dev *cdev = c->cdev; struct f_dfu *f_dfu = func_to_dfu(f); + const char *s; int alt_num = dfu_get_alt_number(); int rv, id, i; @@ -724,6 +725,10 @@ static int dfu_bind(struct usb_configuration *c, struct usb_function *f) cdev->req->context = f_dfu; + s = getenv("serial#"); + if (s) + g_dnl_set_serialnumber((char *)s); + error: return rv; } |