]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc3: fix wrong bit mask in dwc3_event_type
authorHuang Rui <ray.huang@amd.com>
Wed, 26 Jun 2013 17:08:11 +0000 (01:08 +0800)
committerFelipe Balbi <balbi@ti.com>
Mon, 15 Jul 2013 09:59:56 +0000 (12:59 +0300)
commitd9109729eefe84fc0f5f2bb3033db389e35dd390
tree85ee4ba1629c3628d69df41d0eb67c3f74cad32f
parent8d7b0e55cce7750221268016bbb6be45b165b20d
usb: dwc3: fix wrong bit mask in dwc3_event_type

Per dwc3 2.50a spec, the is_devspec bit is used to distinguish the
Device Endpoint-Specific Event or Device-Specific Event (DEVT). If the
bit is 1, the event is represented Device-Specific Event, then use
[7:1] bits as Device Specific Event to marked the type. It has 7 bits,
and we can see the reserved8_31 variable name which means from 8 to 31
bits marked reserved, actually there are 24 bits not 25 bits between
that. And 1 + 7 + 24 = 32, the event size is 4 byes.

So in dwc3_event_type, the bit mask should be:
is_devspec [0] 1  bit
type [7:1] 7  bits
reserved8_31 [31:8] 24 bits

This patch should be backported to kernels as old as 3.2, that contain
the commit 1e90ce98e30bfb64ee6d5ddc932e46c400eb5ee0 "usb: Introduce
DesignWare USB3 DRD Driver".

Cc: <stable@vger.kernel.org>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/core.h