Re: [PATCH] usb: gadget zero: avoid unnecessary reinit of data in f_sourcesink

2012-12-18 Thread Sebastian Andrzej Siewior
On Mon, Dec 17, 2012 at 06:21:16PM +0100, Armando Visconti wrote:
> >Besides that the patch looks fine :)
> 
> Do you mean that 'inited' should be changed with 'initialized'?
Yes, I do.

> Oh ... my poor english... :(
Don't worry. Others, including myself, do this from time to time as well :)

> 
> Rgds,
> Arm

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] usb: gadget zero: avoid unnecessary reinit of data in f_sourcesink

2012-12-18 Thread Sebastian Andrzej Siewior
On Mon, Dec 17, 2012 at 06:21:16PM +0100, Armando Visconti wrote:
 Besides that the patch looks fine :)
 
 Do you mean that 'inited' should be changed with 'initialized'?
Yes, I do.

 Oh ... my poor english... :(
Don't worry. Others, including myself, do this from time to time as well :)

 
 Rgds,
 Arm

Sebastian
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] usb: gadget zero: avoid unnecessary reinit of data in f_sourcesink

2012-12-17 Thread Armando Visconti

On 12/17/2012 04:45 PM, Sebastian Andrzej Siewior wrote:

On Thu, Dec 13, 2012 at 03:11:19PM +0100, Armando Visconti wrote:

In the IN case, since the USB request is allocated only when
the source/sink function is started and never freed, the USB ept
buffer needs to be inited only at the beginning. This change

  ^^

results into a more performant g_zero module, especially when
'pattern=1' is selected.


Besides that the patch looks fine :)


Do you mean that 'inited' should be changed with 'initialized'?
Oh ... my poor english... :(

Rgds,
Arm

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] usb: gadget zero: avoid unnecessary reinit of data in f_sourcesink

2012-12-17 Thread Sebastian Andrzej Siewior
On Thu, Dec 13, 2012 at 03:11:19PM +0100, Armando Visconti wrote:
> In the IN case, since the USB request is allocated only when
> the source/sink function is started and never freed, the USB ept
> buffer needs to be inited only at the beginning. This change
 ^^
> results into a more performant g_zero module, especially when
> 'pattern=1' is selected.

Besides that the patch looks fine :)

> Signed-off-by: Armando Visconti 

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] usb: gadget zero: avoid unnecessary reinit of data in f_sourcesink

2012-12-17 Thread Armando Visconti

On 12/17/2012 04:45 PM, Sebastian Andrzej Siewior wrote:

On Thu, Dec 13, 2012 at 03:11:19PM +0100, Armando Visconti wrote:

In the IN case, since the USB request is allocated only when
the source/sink function is started and never freed, the USB ept
buffer needs to be inited only at the beginning. This change

  ^^

results into a more performant g_zero module, especially when
'pattern=1' is selected.


Besides that the patch looks fine :)


Do you mean that 'inited' should be changed with 'initialized'?
Oh ... my poor english... :(

Rgds,
Arm

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] usb: gadget zero: avoid unnecessary reinit of data in f_sourcesink

2012-12-17 Thread Sebastian Andrzej Siewior
On Thu, Dec 13, 2012 at 03:11:19PM +0100, Armando Visconti wrote:
 In the IN case, since the USB request is allocated only when
 the source/sink function is started and never freed, the USB ept
 buffer needs to be inited only at the beginning. This change
 ^^
 results into a more performant g_zero module, especially when
 'pattern=1' is selected.

Besides that the patch looks fine :)

 Signed-off-by: Armando Visconti armando.visco...@st.com

Sebastian
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] usb: gadget zero: avoid unnecessary reinit of data in f_sourcesink

2012-12-13 Thread Armando Visconti
In the IN case, since the USB request is allocated only when
the source/sink function is started and never freed, the USB ept
buffer needs to be inited only at the beginning. This change
results into a more performant g_zero module, especially when
'pattern=1' is selected.

Signed-off-by: Armando Visconti 
---
 drivers/usb/gadget/f_sourcesink.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/f_sourcesink.c 
b/drivers/usb/gadget/f_sourcesink.c
index 3c126fd..534cf8c 100644
--- a/drivers/usb/gadget/f_sourcesink.c
+++ b/drivers/usb/gadget/f_sourcesink.c
@@ -536,8 +536,7 @@ static void source_sink_complete(struct usb_ep *ep, struct 
usb_request *req)
check_read_data(ss, req);
if (pattern != 2)
memset(req->buf, 0x55, req->length);
-   } else
-   reinit_write_data(ep, req);
+   }
break;
 
/* this endpoint is normally active while we're configured */
-- 
1.7.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] usb: gadget zero: avoid unnecessary reinit of data in f_sourcesink

2012-12-13 Thread Armando Visconti
In the IN case, since the USB request is allocated only when
the source/sink function is started and never freed, the USB ept
buffer needs to be inited only at the beginning. This change
results into a more performant g_zero module, especially when
'pattern=1' is selected.

Signed-off-by: Armando Visconti armando.visco...@st.com
---
 drivers/usb/gadget/f_sourcesink.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/f_sourcesink.c 
b/drivers/usb/gadget/f_sourcesink.c
index 3c126fd..534cf8c 100644
--- a/drivers/usb/gadget/f_sourcesink.c
+++ b/drivers/usb/gadget/f_sourcesink.c
@@ -536,8 +536,7 @@ static void source_sink_complete(struct usb_ep *ep, struct 
usb_request *req)
check_read_data(ss, req);
if (pattern != 2)
memset(req-buf, 0x55, req-length);
-   } else
-   reinit_write_data(ep, req);
+   }
break;
 
/* this endpoint is normally active while we're configured */
-- 
1.7.4.4

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/