projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
949bf79
)
usb: gadget: f_dfu: set serial number if serial# is valid
author
Felipe Balbi
<felipe.balbi@linux.intel.com>
Wed, 22 Feb 2017 09:22:38 +0000
(11:22 +0200)
committer
Marek Vasut
<marex@denx.de>
Sun, 26 Feb 2017 12:24:30 +0000
(13:24 +0100)
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>
drivers/usb/gadget/f_dfu.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/f_dfu.c
b/drivers/usb/gadget/f_dfu.c
index 81929d3e0daf564f45d912c94e827befe1d60fdc..dfa435957793db6ec2783ad3776e69c5f94bbdbd 100644
(file)
--- 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;
}