lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 16 Jun 2011 16:31:06 +0300
From:	Tatyana Brokhman <tlinder@...eaurora.org>
To:	greg@...ah.com
Cc:	linux-usb@...r.kernel.org, linux-arm-msm@...r.kernel.org,
	balbi@...com, ablay@...eaurora.org,
	Tatyana Brokhman <tlinder@...eaurora.org>,
	linux-kernel@...r.kernel.org (open list)
Subject: [PATCH/RFC 4/5] usb:dummy_hcd: Disable single-request fifo in dummy hcd

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@...eaurora.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ