public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6.34-rc6] mxc: gadget: Fix bitfield for calculating maximum packet size
@ 2010-05-03 19:41 Dinh.Nguyen
  2010-05-04  9:48 ` Sergei Shtylyov
  0 siblings, 1 reply; 3+ messages in thread
From: Dinh.Nguyen @ 2010-05-03 19:41 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arm-kernel, linux, s.hauer, valentin.longchamp, daniel,
	grant.likely, bryan.wu, amit.kucheria, Dinh Nguyen

From: Dinh Nguyen <Dinh.Nguyen@freescale.com>

The max packet length bit mask used for isochronous endpoints
should be 0x7FF instead of 0x8FF. 0x8FF will actually clear
higher-order bits in the max packet length field.

This patch applies to 2.6.34-rc6.

Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com>
---
 drivers/usb/gadget/fsl_udc_core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c
index fa3d142..08a9a62 100644
--- a/drivers/usb/gadget/fsl_udc_core.c
+++ b/drivers/usb/gadget/fsl_udc_core.c
@@ -489,7 +489,7 @@ static int fsl_ep_enable(struct usb_ep *_ep,
 	case USB_ENDPOINT_XFER_ISOC:
 		/* Calculate transactions needed for high bandwidth iso */
 		mult = (unsigned char)(1 + ((max >> 11) & 0x03));
-		max = max & 0x8ff;	/* bit 0~10 */
+		max = max & 0x7ff;	/* bit 0~10 */
 		/* 3 transactions at most */
 		if (mult > 3)
 			goto en_done;
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 2.6.34-rc6] mxc: gadget: Fix bitfield for calculating maximum packet size
  2010-05-03 19:41 [PATCH 2.6.34-rc6] mxc: gadget: Fix bitfield for calculating maximum packet size Dinh.Nguyen
@ 2010-05-04  9:48 ` Sergei Shtylyov
  0 siblings, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2010-05-04  9:48 UTC (permalink / raw)
  To: Dinh.Nguyen
  Cc: linux-kernel, amit.kucheria, linux, s.hauer, grant.likely,
	linux-arm-kernel, daniel, bryan.wu, valentin.longchamp

Hello.

Dinh.Nguyen@freescale.com wrote:

> From: Dinh Nguyen <Dinh.Nguyen@freescale.com>
>
> The max packet length bit mask used for isochronous endpoints
> should be 0x7FF instead of 0x8FF. 0x8FF will actually clear
> higher-order bits in the max packet length field.
>
> This patch applies to 2.6.34-rc6.
>
> Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com>

   You should send this to the linux-usb mailing list.

WBR, Sergei


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2.6.34-rc6] mxc: gadget: Fix bitfield for calculating maximum packet size
@ 2010-05-04 15:03 Dinh.Nguyen
  0 siblings, 0 replies; 3+ messages in thread
From: Dinh.Nguyen @ 2010-05-04 15:03 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-arm-kernel, linux, linux-usb, Dinh Nguyen

From: Dinh Nguyen <Dinh.Nguyen@freescale.com>

The max packet length bit mask used for isochronous endpoints
should be 0x7FF instead of 0x8FF. 0x8FF will actually clear
higher-order bits in the max packet length field.

This patch applies to 2.6.34-rc6.

Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com>
---
 drivers/usb/gadget/fsl_udc_core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c
index fa3d142..08a9a62 100644
--- a/drivers/usb/gadget/fsl_udc_core.c
+++ b/drivers/usb/gadget/fsl_udc_core.c
@@ -489,7 +489,7 @@ static int fsl_ep_enable(struct usb_ep *_ep,
 	case USB_ENDPOINT_XFER_ISOC:
 		/* Calculate transactions needed for high bandwidth iso */
 		mult = (unsigned char)(1 + ((max >> 11) & 0x03));
-		max = max & 0x8ff;	/* bit 0~10 */
+		max = max & 0x7ff;	/* bit 0~10 */
 		/* 3 transactions at most */
 		if (mult > 3)
 			goto en_done;
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-05-04 15:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-03 19:41 [PATCH 2.6.34-rc6] mxc: gadget: Fix bitfield for calculating maximum packet size Dinh.Nguyen
2010-05-04  9:48 ` Sergei Shtylyov
  -- strict thread matches above, loose matches on Subject: below --
2010-05-04 15:03 Dinh.Nguyen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox