UPSTREAM: usb: dwc2: gadget: Repair DSTS register decoding
authorMarek Vasut <marex@denx.de>
Fri, 18 Dec 2015 02:26:17 +0000 (03:26 +0100)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 3 Jan 2017 10:47:57 +0000 (18:47 +0800)
commit5ff9508d7e10964a30cc9efff73a3793ab9fef31
tree77bbb8f06d95bdf49338636bf93b068c42a1ff1a
parent04f8bb8950d16ea2c0395677d63f7b925125b485
UPSTREAM: usb: dwc2: gadget: Repair DSTS register decoding

The "enumspd" field is located in register DSTS[2:1], but the code
which checks the bitfield does not shift the value accordingly. This
in turn causes incorrect detection of gadget link partner speed in
dwc2_hsotg_irq_enumdone() .

Shift the value accordingly to fix the problem with speed detection.

Change-Id: Ia84392906159ec512c71173ee842ea5c24b0eb0d
Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from commit 6d76c92c2fcbee4fd1f6d7b375d71057c7a615b1)
drivers/usb/dwc2/gadget.c