mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] USB: gadget: s3c-hsotg: fix maxpacket size
@ 2013-09-27 10:31 Robert Baldyga
  2013-10-01 13:56 ` Felipe Balbi
  0 siblings, 1 reply; 3+ messages in thread
From: Robert Baldyga @ 2013-09-27 10:31 UTC (permalink / raw)
  To: balbi
  Cc: gregkh, linux-usb, linux-kernel, b.zolnierkie, m.szyprowski,
	andrzej.p, Robert Baldyga

This patch changes ep maxpacket value from 512 to 1024, becouse it's needed
to handle interupt and isochronous endpoints in high-speed mode. This change
doesn't affect on driver functioning, becouse fifo size (3072) is still enough
for the maximum transaction payload (3*1024 for high-speed high-bandwidtch
endpoints).

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
---
 drivers/usb/gadget/s3c-hsotg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c
index 8a9e2c6..0d1dcbd 100644
--- a/drivers/usb/gadget/s3c-hsotg.c
+++ b/drivers/usb/gadget/s3c-hsotg.c
@@ -3146,7 +3146,7 @@ static void s3c_hsotg_initep(struct s3c_hsotg *hsotg,
 
 	hs_ep->parent = hsotg;
 	hs_ep->ep.name = hs_ep->name;
-	hs_ep->ep.maxpacket = epnum ? 512 : EP0_MPS_LIMIT;
+	hs_ep->ep.maxpacket = epnum ? 1024 : EP0_MPS_LIMIT;
 	hs_ep->ep.ops = &s3c_hsotg_ep_ops;
 
 	/*
-- 
1.7.9.5


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

* Re: [PATCH] USB: gadget: s3c-hsotg: fix maxpacket size
  2013-09-27 10:31 [PATCH] USB: gadget: s3c-hsotg: fix maxpacket size Robert Baldyga
@ 2013-10-01 13:56 ` Felipe Balbi
  2013-10-02  9:17   ` [PATCH v2] " Robert Baldyga
  0 siblings, 1 reply; 3+ messages in thread
From: Felipe Balbi @ 2013-10-01 13:56 UTC (permalink / raw)
  To: Robert Baldyga
  Cc: balbi, gregkh, linux-usb, linux-kernel, b.zolnierkie,
	m.szyprowski, andrzej.p

[-- Attachment #1: Type: text/plain, Size: 1220 bytes --]

Hi,

On Fri, Sep 27, 2013 at 12:31:09PM +0200, Robert Baldyga wrote:
> This patch changes ep maxpacket value from 512 to 1024, becouse it's needed

shouldn't you use 3072 instead to cope with high bandwidth ISO
endpoints ?

> to handle interupt and isochronous endpoints in high-speed mode. This change
> doesn't affect on driver functioning, becouse fifo size (3072) is still enough

s/becouse/because.

> for the maximum transaction payload (3*1024 for high-speed high-bandwidtch
> endpoints).
> 
> Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
> ---
>  drivers/usb/gadget/s3c-hsotg.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c
> index 8a9e2c6..0d1dcbd 100644
> --- a/drivers/usb/gadget/s3c-hsotg.c
> +++ b/drivers/usb/gadget/s3c-hsotg.c
> @@ -3146,7 +3146,7 @@ static void s3c_hsotg_initep(struct s3c_hsotg *hsotg,
>  
>  	hs_ep->parent = hsotg;
>  	hs_ep->ep.name = hs_ep->name;
> -	hs_ep->ep.maxpacket = epnum ? 512 : EP0_MPS_LIMIT;
> +	hs_ep->ep.maxpacket = epnum ? 1024 : EP0_MPS_LIMIT;
>  	hs_ep->ep.ops = &s3c_hsotg_ep_ops;
>  
>  	/*
> -- 
> 1.7.9.5
> 

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* [PATCH v2] USB: gadget: s3c-hsotg: fix maxpacket size
  2013-10-01 13:56 ` Felipe Balbi
@ 2013-10-02  9:17   ` Robert Baldyga
  0 siblings, 0 replies; 3+ messages in thread
From: Robert Baldyga @ 2013-10-02  9:17 UTC (permalink / raw)
  To: balbi
  Cc: gregkh, linux-usb, linux-kernel, b.zolnierkie, m.szyprowski,
	andrzej.p, Robert Baldyga

This patch changes ep maxpacket value from 512 to 1024, because it's needed
to handle interupt and isochronous endpoints in high-speed mode. This change
doesn't affect on driver functioning, because fifo size (3072) is still enough
for the maximum transaction payload (3*1024 for high-speed high-bandwidtch
endpoints).

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
---

Hello,

This is update for my patch. From last version I have fixed typos
pointed out by Felipe Balbi.

On 10/01/2013 03:56 PM, Felipe Balbi wrote:> Hi,
> 
> On Fri, Sep 27, 2013 at 12:31:09PM +0200, Robert Baldyga wrote:
>> This patch changes ep maxpacket value from 512 to 1024, becouse it's needed
> 
> shouldn't you use 3072 instead to cope with high bandwidth ISO
> endpoints ?
> 

No, because this value indicates maximum size of single transaction.
In high bandwidth transfers there are up to three transactions per
microframe which gives up to 3072 bytes. Number of additional
transactions per microframe is indicated by bits 11 and 12 of
wMaxPacketSize field of endpoint descriptor and does not depend on
endpoint maxpacket value.

Best regards
Robert Baldyga
Samsung R&D Institute Poland

 drivers/usb/gadget/s3c-hsotg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c
index 8a9e2c6..0d1dcbd 100644
--- a/drivers/usb/gadget/s3c-hsotg.c
+++ b/drivers/usb/gadget/s3c-hsotg.c
@@ -3146,7 +3146,7 @@ static void s3c_hsotg_initep(struct s3c_hsotg *hsotg,
 
 	hs_ep->parent = hsotg;
 	hs_ep->ep.name = hs_ep->name;
-	hs_ep->ep.maxpacket = epnum ? 512 : EP0_MPS_LIMIT;
+	hs_ep->ep.maxpacket = epnum ? 1024 : EP0_MPS_LIMIT;
 	hs_ep->ep.ops = &s3c_hsotg_ep_ops;
 
 	/*
-- 
1.7.9.5


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

end of thread, other threads:[~2013-10-02  9:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-27 10:31 [PATCH] USB: gadget: s3c-hsotg: fix maxpacket size Robert Baldyga
2013-10-01 13:56 ` Felipe Balbi
2013-10-02  9:17   ` [PATCH v2] " Robert Baldyga

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

all inboxes | Powered by JetHome®