aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHuang Rui <ray.huang@amd.com>2014-01-07 04:45:50 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-06 10:55:31 -0400
commitaede1b94f8ec9bb95d2963ef7881195041c9bf12 (patch)
tree16ccec1a4ec4ff4b06eb8f08f78e4d7835746019
parent2fdb8dd78feec765217e544972e17e1ce3fe9867 (diff)
usb: dwc3: fix wrong bit mask in dwc3_event_devt
commit 06f9b6e59661cee510b04513b13ea7927727d758 upstream. Around DWC USB3 2.30a release another bit has been added to the Device-Specific Event (DEVT) Event Information (EvtInfo) bitfield. Because of that, what used to be 8 bits long, has become 9 bits long. Per dwc3 2.30a+ spec in the Device-Specific Event (DEVT), the field of Event Information Bits(EvtInfo) uses [24:16] bits, and it has 9 bits not 8 bits. And the following reserved field uses [31:25] bits not [31:24] bits, and it has 7 bits. So in dwc3_event_devt, the bit mask should be: event_info [24:16] 9 bits reserved31_25 [31:25] 7 bits This patch makes sure that newer core releases will work fine with Linux and that we will decode the event information properly on new core releases. [ balbi@ti.com : improve commit log a bit ] Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/dwc3/core.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index 27dad993b007..7ab3c9985253 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -836,15 +836,15 @@ struct dwc3_event_depevt {
836 * 12 - VndrDevTstRcved 836 * 12 - VndrDevTstRcved
837 * @reserved15_12: Reserved, not used 837 * @reserved15_12: Reserved, not used
838 * @event_info: Information about this event 838 * @event_info: Information about this event
839 * @reserved31_24: Reserved, not used 839 * @reserved31_25: Reserved, not used
840 */ 840 */
841struct dwc3_event_devt { 841struct dwc3_event_devt {
842 u32 one_bit:1; 842 u32 one_bit:1;
843 u32 device_event:7; 843 u32 device_event:7;
844 u32 type:4; 844 u32 type:4;
845 u32 reserved15_12:4; 845 u32 reserved15_12:4;
846 u32 event_info:8; 846 u32 event_info:9;
847 u32 reserved31_24:8; 847 u32 reserved31_25:7;
848} __packed; 848} __packed;
849 849
850/** 850/**