All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tatyana Brokhman <tlinder-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	balbi-l0cyMroinI0@public.gmane.org,
	ablay-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	Tatyana Brokhman
	<tlinder-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	open list <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [PATCH/RFC 4/5] usb:dummy_hcd: Disable single-request fifo in dummy hcd
Date: Thu, 16 Jun 2011 16:31:06 +0300	[thread overview]
Message-ID: <1308231068-24038-5-git-send-email-tlinder@codeaurora.org> (raw)
In-Reply-To: <1308231068-24038-2-git-send-email-tlinder-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>

This is not the actual behavior of the udc, thus it's removed.

This patch is needed for several of UAS test to pass.

Signed-off-by: Tatyana Brokhman <tlinder-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>

---
 drivers/usb/gadget/dummy_hcd.c |   26 +-------------------------
 1 files changed, 1 insertions(+), 25 deletions(-)

diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
index 7d0a6fe..41c7961 100644
--- a/drivers/usb/gadget/dummy_hcd.c
+++ b/drivers/usb/gadget/dummy_hcd.c
@@ -608,11 +608,6 @@ dummy_free_request (struct usb_ep *_ep, struct usb_request *_req)
 	kfree (req);
 }
 
-static void
-fifo_complete (struct usb_ep *ep, struct usb_request *req)
-{
-}
-
 static int
 dummy_queue (struct usb_ep *_ep, struct usb_request *_req,
 		gfp_t mem_flags)
@@ -648,26 +643,7 @@ dummy_queue (struct usb_ep *_ep, struct usb_request *_req,
 	_req->actual = 0;
 	spin_lock_irqsave (&dum->lock, flags);
 
-	/* implement an emulated single-request FIFO */
-	if (ep->desc && (ep->desc->bEndpointAddress & USB_DIR_IN) &&
-			list_empty (&dum->fifo_req.queue) &&
-			list_empty (&ep->queue) &&
-			_req->length <= FIFO_SIZE) {
-		req = &dum->fifo_req;
-		req->req = *_req;
-		req->req.buf = dum->fifo_buf;
-		memcpy (dum->fifo_buf, _req->buf, _req->length);
-		req->req.context = dum;
-		req->req.complete = fifo_complete;

WARNING: multiple messages have this Message-ID (diff)
From: Tatyana Brokhman <tlinder@codeaurora.org>
To: greg@kroah.com
Cc: linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	balbi@ti.com, ablay@codeaurora.org,
	Tatyana Brokhman <tlinder@codeaurora.org>,
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH/RFC 4/5] usb:dummy_hcd: Disable single-request fifo in dummy hcd
Date: Thu, 16 Jun 2011 16:31:06 +0300	[thread overview]
Message-ID: <1308231068-24038-5-git-send-email-tlinder@codeaurora.org> (raw)
In-Reply-To: <1308231068-24038-2-git-send-email-tlinder@codeaurora.org>

This is not the actual behavior of the udc, thus it's removed.

This patch is needed for several of UAS test to pass.

Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>

---
 drivers/usb/gadget/dummy_hcd.c |   26 +-------------------------
 1 files changed, 1 insertions(+), 25 deletions(-)

diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
index 7d0a6fe..41c7961 100644
--- a/drivers/usb/gadget/dummy_hcd.c
+++ b/drivers/usb/gadget/dummy_hcd.c
@@ -608,11 +608,6 @@ dummy_free_request (struct usb_ep *_ep, struct usb_request *_req)
 	kfree (req);
 }
 
-static void
-fifo_complete (struct usb_ep *ep, struct usb_request *req)
-{
-}
-
 static int
 dummy_queue (struct usb_ep *_ep, struct usb_request *_req,
 		gfp_t mem_flags)
@@ -648,26 +643,7 @@ dummy_queue (struct usb_ep *_ep, struct usb_request *_req,
 	_req->actual = 0;
 	spin_lock_irqsave (&dum->lock, flags);
 
-	/* implement an emulated single-request FIFO */
-	if (ep->desc && (ep->desc->bEndpointAddress & USB_DIR_IN) &&
-			list_empty (&dum->fifo_req.queue) &&
-			list_empty (&ep->queue) &&
-			_req->length <= FIFO_SIZE) {
-		req = &dum->fifo_req;
-		req->req = *_req;
-		req->req.buf = dum->fifo_buf;
-		memcpy (dum->fifo_buf, _req->buf, _req->length);
-		req->req.context = dum;
-		req->req.complete = fifo_complete;
-
-		list_add_tail(&req->queue, &ep->queue);
-		spin_unlock (&dum->lock);
-		_req->actual = _req->length;
-		_req->status = 0;
-		_req->complete (_ep, _req);
-		spin_lock (&dum->lock);
-	}  else
-		list_add_tail(&req->queue, &ep->queue);
+	list_add_tail(&req->queue, &ep->queue);
 	spin_unlock_irqrestore (&dum->lock, flags);
 
 	/* real hardware would likely enable transfers here, in case
-- 
1.7.3.3

--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

  parent reply	other threads:[~2011-06-16 13:31 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-16 13:31 [PATCH/RFC 1/5] usb:tools: usb unittests framework Tatyana Brokhman
2011-06-16 13:31 ` Tatyana Brokhman
     [not found] ` <1308231068-24038-2-git-send-email-tlinder-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2011-06-16 13:31   ` [PATCH/RFC 2/5] usb:dummy_hcd: connect/disconnect test support Tatyana Brokhman
2011-06-16 13:31     ` Tatyana Brokhman
2011-06-16 15:06     ` Alan Stern
2011-06-16 15:06       ` Alan Stern
2011-06-16 16:16       ` Felipe Balbi
2011-06-16 17:06         ` Alan Stern
2011-06-16 17:06           ` Alan Stern
2011-06-16 17:19           ` Alan Stern
2011-06-16 17:19             ` Alan Stern
2011-06-16 15:17     ` Alan Stern
2011-06-16 15:17       ` Alan Stern
2011-06-16 16:18     ` Felipe Balbi
2011-06-16 13:31   ` Tatyana Brokhman [this message]
2011-06-16 13:31     ` [PATCH/RFC 4/5] usb:dummy_hcd: Disable single-request fifo in dummy hcd Tatyana Brokhman
2011-06-16 15:09     ` Alan Stern
2011-06-16 15:09       ` Alan Stern
2011-06-16 13:31 ` [PATCH/RFC 3/5] usb:g_zero: bulk in/out unittest support Tatyana Brokhman
2011-06-16 13:31   ` Tatyana Brokhman
2011-06-16 16:25   ` Felipe Balbi
2011-06-16 13:31 ` [PATCH/RFC 5/5] usb: Add support for streams alloc/dealloc to devio.c Tatyana Brokhman
2011-06-16 13:31   ` Tatyana Brokhman
2011-06-16 16:28   ` Felipe Balbi
2011-06-16 18:21     ` Greg KH
2011-06-17  8:55       ` ablay
2011-06-17  8:55         ` ablay
2011-06-17 14:35         ` Alan Stern
2011-06-17 14:35           ` Alan Stern
     [not found]   ` <1308231068-24038-6-git-send-email-tlinder-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2011-06-16 15:20     ` Alan Stern
2011-06-16 15:20       ` Alan Stern
2011-06-30 17:45     ` Sarah Sharp
2011-06-30 17:45       ` Sarah Sharp
2011-06-30 18:39       ` William Gulland
2011-06-30 18:39         ` William Gulland
2011-06-30 18:41       ` Tanya Brokhman
2011-06-30 18:41         ` Tanya Brokhman
2011-07-19  9:12       ` Amit Blay
2011-07-19  9:12         ` Amit Blay
2011-07-19  9:18         ` Oliver Neukum
2011-07-19 10:07           ` Amit Blay
2011-07-19 10:07             ` Amit Blay
2011-07-19 10:26             ` Oliver Neukum
2011-07-19 10:36               ` Amit Blay
2011-07-19 10:36                 ` Amit Blay
2011-07-27  6:21         ` Amit Blay
     [not found]           ` <a9d8b0f164cdb51e88125d8432644213.squirrel-mMfbam+mt9083fI46fginR2eb7JE58TQ@public.gmane.org>
2011-08-17  7:06             ` Hans Petter Selasky
2011-08-17  7:06               ` Hans Petter Selasky
2011-08-18 22:47           ` Sarah Sharp
2011-08-21 10:18             ` Amit Blay
2011-08-21 10:18               ` Amit Blay
2011-08-22  7:58               ` Hans Petter Selasky
2011-08-22  7:56             ` Hans Petter Selasky
2011-08-22 16:41               ` Sarah Sharp

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=1308231068-24038-5-git-send-email-tlinder@codeaurora.org \
    --to=tlinder-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
    --cc=ablay-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=balbi-l0cyMroinI0@public.gmane.org \
    --cc=greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.