Re: [PATCH v2] usb: dwc3: fix wrong bit mask in dwc3_event_devt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, Jan 07, 2014 at 05:45:50PM +0800, Huang Rui wrote:
> Per dwc3 2.70a 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 should be backported to kernels as old as 3.2, that contain
> the commit 72246da40f3719af3bfd104a2365b32537c27d83 "usb: Introduce
> DesignWare USB3 DRD Driver".

This paragraph shouldn't be in the commit log (I'll fix it, don't
worry), also this doesn't really need to be backported all the way back
since this was changed between 2.00a and 2.30a version of the core,
which didn't even exist back then.

> Cc: <stable@xxxxxxxxxxxxxxx>
> Signed-off-by: Huang Rui <ray.huang@xxxxxxx>
> ---
> 
> Changes from v1 -> v2:
> - Add CC stable mail list.
> 
>  drivers/usb/dwc3/core.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
> index f8af8d4..69c4583 100644
> --- a/drivers/usb/dwc3/core.h
> +++ b/drivers/usb/dwc3/core.h
> @@ -815,15 +815,15 @@ struct dwc3_event_depevt {
>   *	12	- VndrDevTstRcved
>   * @reserved15_12: Reserved, not used
>   * @event_info: Information about this event
> - * @reserved31_24: Reserved, not used
> + * @reserved31_25: Reserved, not used
>   */
>  struct dwc3_event_devt {
>  	u32	one_bit:1;
>  	u32	device_event:7;
>  	u32	type:4;
>  	u32	reserved15_12:4;
> -	u32	event_info:8;
> -	u32	reserved31_24:8;
> +	u32	event_info:9;
> +	u32	reserved31_25:7;
>  } __packed;
>  
>  /**
> -- 
> 1.8.1.2
> 
> 

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]