From: Armando Visconti <armando.visconti@st.com>
To: <balbi@ti.com>
Cc: <gregkh@linuxfoundation.org>, <pratyush.anand@st.com>,
<linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<spear-devel@list.st.com>
Subject: [PATCH] usb: gadget zero: avoid unnecessary reinit of data in f_sourcesink
Date: Thu, 13 Dec 2012 15:11:19 +0100 [thread overview]
Message-ID: <1355407879-11784-1-git-send-email-armando.visconti@st.com> (raw)
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.visconti@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
next reply other threads:[~2012-12-13 14:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-13 14:11 Armando Visconti [this message]
2012-12-17 15:45 ` Sebastian Andrzej Siewior
2012-12-17 17:21 ` Armando Visconti
2012-12-18 8:27 ` Sebastian Andrzej Siewior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1355407879-11784-1-git-send-email-armando.visconti@st.com \
--to=armando.visconti@st.com \
--cc=balbi@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=pratyush.anand@st.com \
--cc=spear-devel@list.st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®