usb: gadget: dfu: Fix DFU mode interface descriptor
The gadget driver set the bInterfaceProtocol value to 1 in the DFU
interface descriptor. However this value is used to indicate that the
gadget is in run-time mode and not ready for DFU. When ready for DFU
operation the bInterfaceProtocol value must be set to 2 (DFU mode).

From the DFU 1.1 specification, the value of bInterfaceProtocol select:
 - 1: Runtime protocol  (see Table 4.1)
 - 2: DFU mode protocol (see Table 4.4)

This patch change the bInterfaceProtocol value from 1 to 2. As this
DFU gadget driver is always ready for DFU operation (DFU mode) and
doesn't require a USB reset.

Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 368b2c6 commit 2d466d2f7380ee036e3e49a1a0229b6097ca620c
@Jules Maselbas Jules Maselbas authored on 26 Mar 2020
Sascha Hauer committed on 31 Mar 2020
Showing 1 changed file
View
drivers/usb/gadget/dfu.c