Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1393116 > unrolled thread
| Started by | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| First post | 2016-05-03 09:50 +0200 |
| Last post | 2016-05-03 23:20 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[patch] usb: dwc3: gadget: fix mask and shift order in DWC3_DCFG_NUMP() Dan Carpenter <dan.carpenter@oracle.com> - 2016-05-03 09:50 +0200
Re: [patch] usb: dwc3: gadget: fix mask and shift order in DWC3_DCFG_NUMP() Felipe Balbi <balbi@kernel.org> - 2016-05-03 10:00 +0200
Re: [patch] usb: dwc3: gadget: fix mask and shift order in DWC3_DCFG_NUMP() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-03 23:20 +0200
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Date | 2016-05-03 09:50 +0200 |
| Subject | [patch] usb: dwc3: gadget: fix mask and shift order in DWC3_DCFG_NUMP() |
| Message-ID | <ruDfH-3LT-3@gated-at.bofh.it> |
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@oracle.com>
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)
[toc] | [next] | [standalone]
| From | Felipe Balbi <balbi@kernel.org> |
|---|---|
| Date | 2016-05-03 10:00 +0200 |
| Subject | Re: [patch] usb: dwc3: gadget: fix mask and shift order in DWC3_DCFG_NUMP() |
| Message-ID | <ruDpo-3Rg-7@gated-at.bofh.it> |
| In reply to | #1393116 |
[Multipart message — attachments visible in raw view] — view raw
Hi,
Dan Carpenter <dan.carpenter@oracle.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@oracle.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@kernel.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@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
balbi
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-05-03 23:20 +0200 |
| Message-ID | <ruPTA-7jM-19@gated-at.bofh.it> |
| In reply to | #1393136 |
On Tue, May 03, 2016 at 10:53:05AM +0300, Felipe Balbi wrote:
>
> Hi,
>
> Dan Carpenter <dan.carpenter@oracle.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@oracle.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@kernel.org>
I'll take it, thanks.
greg k-h
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web