* [PATCH 20/82] usb: gadget: udc: fsl: make use of new usb_endpoint_maxp_mult()
[not found] <20161031104914.1990-1-felipe.balbi@linux.intel.com>
@ 2016-10-31 10:48 ` Felipe Balbi
2016-10-31 10:48 ` [PATCH 44/82] usb: gadget: udc: fsl: remove unnecessary & operation Felipe Balbi
1 sibling, 0 replies; 2+ messages in thread
From: Felipe Balbi @ 2016-10-31 10:48 UTC (permalink / raw)
To: Linux USB; +Cc: Felipe Balbi, Li Yang, linuxppc-dev
We have introduced a helper to calculate multiplier
value from wMaxPacketSize. Start using it.
Cc: Li Yang <leoli@freescale.com>
Cc: <linuxppc-dev@lists.ozlabs.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
---
drivers/usb/gadget/udc/fsl_udc_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c b/drivers/usb/gadget/udc/fsl_udc_core.c
index aab5221d6c2e..4459644b9b55 100644
--- a/drivers/usb/gadget/udc/fsl_udc_core.c
+++ b/drivers/usb/gadget/udc/fsl_udc_core.c
@@ -585,7 +585,7 @@ static int fsl_ep_enable(struct usb_ep *_ep,
break;
case USB_ENDPOINT_XFER_ISOC:
/* Calculate transactions needed for high bandwidth iso */
- mult = (unsigned char)(1 + ((max >> 11) & 0x03));
+ mult = usb_endpoint_maxp_mult(desc);
max = max & 0x7ff; /* bit 0~10 */
/* 3 transactions at most */
if (mult > 3)
--
2.10.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 44/82] usb: gadget: udc: fsl: remove unnecessary & operation
[not found] <20161031104914.1990-1-felipe.balbi@linux.intel.com>
2016-10-31 10:48 ` [PATCH 20/82] usb: gadget: udc: fsl: make use of new usb_endpoint_maxp_mult() Felipe Balbi
@ 2016-10-31 10:48 ` Felipe Balbi
1 sibling, 0 replies; 2+ messages in thread
From: Felipe Balbi @ 2016-10-31 10:48 UTC (permalink / raw)
To: Linux USB; +Cc: Felipe Balbi, Li Yang, linuxppc-dev
Now that usb_endpoint_maxp() only returns the lowest
11 bits from wMaxPacketSize, we can remove the &
operation from this driver.
Cc: Li Yang <leoli@freescale.com>
Cc: <linuxppc-dev@lists.ozlabs.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
---
drivers/usb/gadget/udc/fsl_udc_core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c b/drivers/usb/gadget/udc/fsl_udc_core.c
index 4459644b9b55..71094e479a96 100644
--- a/drivers/usb/gadget/udc/fsl_udc_core.c
+++ b/drivers/usb/gadget/udc/fsl_udc_core.c
@@ -586,7 +586,6 @@ static int fsl_ep_enable(struct usb_ep *_ep,
case USB_ENDPOINT_XFER_ISOC:
/* Calculate transactions needed for high bandwidth iso */
mult = usb_endpoint_maxp_mult(desc);
- max = max & 0x7ff; /* bit 0~10 */
/* 3 transactions at most */
if (mult > 3)
goto en_done;
--
2.10.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-31 10:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20161031104914.1990-1-felipe.balbi@linux.intel.com>
2016-10-31 10:48 ` [PATCH 20/82] usb: gadget: udc: fsl: make use of new usb_endpoint_maxp_mult() Felipe Balbi
2016-10-31 10:48 ` [PATCH 44/82] usb: gadget: udc: fsl: remove unnecessary & operation Felipe Balbi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).