]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc2: Add safety check in setting of descriptor chain pointers
authorMinas Harutyunyan <hminas@synopsys.com>
Tue, 16 Jan 2018 12:03:32 +0000 (16:03 +0400)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 12 Feb 2018 08:59:07 +0000 (10:59 +0200)
commit005f836272a798f62dcc0553fc552baed5856faa
treefcb8938a51e2c3934f312989e9ead72c0d5638a6
parent9892e877ed83ef78de8a373762f10eb004d05d54
usb: dwc2: Add safety check in setting of descriptor chain pointers

In some cases device sending ZLP IN on non EP0 which
reassigning EP0 OUT descriptor pointer to that EP.
Dedicated for EP0 OUT descriptor multiple time re-used by
other EP while that descriptor already in use by EP0 OUT
for SETUP transaction. As result when SETUP packet received
BNA interrupt asserting.

In dwc2_hsotg_program_zlp() function dwc2_gadget_set_ep0_desc_chain()
must be called only for EP0.

Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Minas Harutyunyan <hminas@synopsys.com>
Signed-off-by: Grigor Tovmasyan <tovmasya@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/gadget.c