lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87shxzfuhq.fsf@intel.com>
Date:	Tue, 03 May 2016 10:53:05 +0300
From:	Felipe Balbi <balbi@...nel.org>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: Re: [patch] usb: dwc3: gadget: fix mask and shift order in DWC3_DCFG_NUMP()


Hi,

Dan Carpenter <dan.carpenter@...cle.com> writes:
> In the original DWC3_DCFG_NUMP() was always zero.  It looks like the
> intent was to shift first and then do the mask.
>
> Fixes: 2a58f9c12bb3 ('usb: dwc3: gadget: disable automatic calculation of ACK TP NUMP')
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>

Thanks for this fix, I completely missed it :-) Greg, if you want to
take this as a patch, that's fine by me. Otherwise I can queue it for
-rc1. In any case, S-o-B below:

Signed-off-by: Felipe Balbi <balbi@...nel.org>

> diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
> index 186a886..7ddf944 100644
> --- a/drivers/usb/dwc3/core.h
> +++ b/drivers/usb/dwc3/core.h
> @@ -277,7 +277,7 @@
>  #define DWC3_DCFG_FULLSPEED1	(3 << 0)
>  
>  #define DWC3_DCFG_NUMP_SHIFT	17
> -#define DWC3_DCFG_NUMP(n)	(((n) & 0x1f) >> DWC3_DCFG_NUMP_SHIFT)
> +#define DWC3_DCFG_NUMP(n)	(((n) >> DWC3_DCFG_NUMP_SHIFT) & 0x1f)
>  #define DWC3_DCFG_NUMP_MASK	(0x1f << DWC3_DCFG_NUMP_SHIFT)
>  #define DWC3_DCFG_LPM_CAP	(1 << 22)
>  
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (819 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ