aboutsummaryrefslogtreecommitdiffstats
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2008-11-12 15:51:02 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2008-11-12 15:51:02 -0800
commitdba72ed2bb49b619361b190032ea7694b1035d69 (patch)
tree164255315c942b02bd6c887e26a68f2afa791dab
parentc13d606a63220ce453c2b96cdd567c5af4c3a771 (diff)
downloadpatches-dba72ed2bb49b619361b190032ea7694b1035d69.tar.gz
added a usb patch and deleted 2 musb ones.
-rw-r--r--series4
-rw-r--r--usb.current/usb-musb-fix-bulk-request-on-different-available-endpoints.patch15
-rw-r--r--usb.current/usb-musb-fix-for-kernel-panic-with-multiple-bulk-transfer.patch195
-rw-r--r--usb.current/usb-musb-fixes-endpoint-allocation-logic.patch73
-rw-r--r--usb.current/usb-net-asix-add-support-for-cables-to-go-usb-ethernet-adapter.patch32
5 files changed, 39 insertions, 280 deletions
diff --git a/series b/series
index 7f9cc96f1165a2..b034c022fc1736 100644
--- a/series
+++ b/series
@@ -20,12 +20,10 @@ usb.current/usb-vstusb-fix-compiler-warning-on-x86-64.patch
usb.current/usb-add-nikon-d300-camera-to-unusual_devs.patch
usb.current/usb-don-t-register-endpoints-for-interfaces-that-are-going-away.patch
usb.current/usb-musb-fix-for-isochronous-in-transfer.patch
-usb.current/usb-musb-fixes-endpoint-allocation-logic.patch
usb.current/usb-musb-tusb6010-kill-compile-warning.patch
usb.current/usb-musb-removes-compilation-warning-in-gadget-mode.patch
usb.current/usb-musb-fix-debug-global-variable-name.patch
usb.current/usb-musb-fix-bulk-request-on-different-available-endpoints.patch
-usb.current/usb-musb-fix-for-kernel-panic-with-multiple-bulk-transfer.patch
usb.current/usb-add-yiso-u893-usb-modem-vendor-and-product-ids-to-option-driver.patch
usb.current/usb-mention-urb_free_buffer-in-usb_free_urb-documentation.patch
@@ -45,6 +43,7 @@ usb.current/usb-fsl_qe_udc-report-disconnect-before-unbinding-fixing-oopses.patc
usb.current/usb-ehci-fix-handling-of-dead-controllers.patch
usb.current/usb-ehci-fix-divide-by-zero-bug.patch
usb.current/usb-gadget-cdc-acm-deadlock-fix.patch
+usb.current/usb-net-asix-add-support-for-cables-to-go-usb-ethernet-adapter.patch
#####################################################################
@@ -247,4 +246,3 @@ staging/staging-add-the-meilhaus-me-ids-driver-package.patch
#usb-remove-err-macro-from-usb.h.patch
-
diff --git a/usb.current/usb-musb-fix-bulk-request-on-different-available-endpoints.patch b/usb.current/usb-musb-fix-bulk-request-on-different-available-endpoints.patch
index 6b416877f56433..4af882ee7ca19f 100644
--- a/usb.current/usb-musb-fix-bulk-request-on-different-available-endpoints.patch
+++ b/usb.current/usb-musb-fix-bulk-request-on-different-available-endpoints.patch
@@ -52,7 +52,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
case USB_ENDPOINT_XFER_ISOC:
case USB_ENDPOINT_XFER_INT:
/* this is where periodic bandwidth should be
-@@ -391,17 +404,6 @@ musb_giveback(struct musb_qh *qh, struct
+@@ -388,17 +401,6 @@ musb_giveback(struct musb_qh *qh, struct
kfree(qh);
qh = NULL;
break;
@@ -70,7 +70,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
}
return qh;
-@@ -1711,22 +1713,9 @@ static int musb_schedule(
+@@ -1708,22 +1710,9 @@ static int musb_schedule(
struct list_head *head = NULL;
/* use fixed hardware for control and bulk */
@@ -94,7 +94,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
goto success;
}
-@@ -1766,15 +1755,25 @@ static int musb_schedule(
+@@ -1762,19 +1751,34 @@ static int musb_schedule(
else
diff = hw_ep->max_packet_sz_tx - qh->maxpacket;
@@ -120,10 +120,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
idle = 1;
+ qh->mux = 0;
hw_ep = musb->endpoints + best_end;
- if (is_in)
- musb->in[best_end] = qh;
-@@ -1782,6 +1781,11 @@ static int musb_schedule(
- musb->out[best_end] = qh;
+ musb->periodic[best_end] = qh;
DBG(4, "qh %p periodic slot %d\n", qh, best_end);
success:
+ if (head) {
@@ -134,7 +131,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
qh->hw_ep = hw_ep;
qh->hep->hcpriv = qh;
if (idle)
-@@ -2059,11 +2063,13 @@ static int musb_urb_dequeue(struct usb_h
+@@ -2052,11 +2056,13 @@ static int musb_urb_dequeue(struct usb_h
sched = &musb->control;
break;
case USB_ENDPOINT_XFER_BULK:
@@ -153,7 +150,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
default:
/* REVISIT when we get a schedule tree, periodic
* transfers won't always be at the head of a
-@@ -2111,11 +2117,13 @@ musb_h_disable(struct usb_hcd *hcd, stru
+@@ -2104,11 +2110,13 @@ musb_h_disable(struct usb_hcd *hcd, stru
sched = &musb->control;
break;
case USB_ENDPOINT_XFER_BULK:
diff --git a/usb.current/usb-musb-fix-for-kernel-panic-with-multiple-bulk-transfer.patch b/usb.current/usb-musb-fix-for-kernel-panic-with-multiple-bulk-transfer.patch
deleted file mode 100644
index 0a67731b547e99..00000000000000
--- a/usb.current/usb-musb-fix-for-kernel-panic-with-multiple-bulk-transfer.patch
+++ /dev/null
@@ -1,195 +0,0 @@
-From felipe.balbi@nokia.com Fri Oct 31 09:58:18 2008
-From: Felipe Balbi <felipe.balbi@nokia.com>
-Date: Wed, 29 Oct 2008 15:10:37 +0200
-Subject: usb: musb: Fix for kernel panic with multiple bulk transfer
-To: linux-usb@vger.kernel.org
-Cc: Greg Kroah-Hartman <gregkh@suse.de>, Ajay Kumar Gupta <ajay.gupta@ti.com>, Romit Dasgupta <romit@ti.com>, Felipe Balbi <felipe.balbi@nokia.com>
-Message-ID: <1225285839-3085-8-git-send-email-felipe.balbi@nokia.com>
-
-
-From: Ajay Kumar Gupta <ajay.gupta@ti.com>
-
-Fixes kernel panic when multiple copy is performed among more than two mass
-storage media and transfer is aborted. musb_advance_schedule(),
-musb_urb_dequeue(), musb_cleanup_urb() and musb_h_disable() functions have
-been modified to correct urb handling associated with bulk and control
-endpoints which are multiplexed on one hardware endpoint.
-
-musb_advance_schedule() has been removed from musb_cleanup_urb() and added
-to musb_urb_dequeue(). musb_h_disable() has been modified to take care of
-multiple qh on same hw_ep scenario.
-
-Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
-Signed-off-by: Romit Dasgupta <romit@ti.com>
-Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/usb/musb/musb_host.c | 110 ++++++++++++++++++++++++++++++++-----------
- 1 file changed, 82 insertions(+), 28 deletions(-)
-
---- a/drivers/usb/musb/musb_host.c
-+++ b/drivers/usb/musb/musb_host.c
-@@ -431,8 +431,18 @@ musb_advance_schedule(struct musb *musb,
- qh = musb_giveback(qh, urb, 0);
- else
- qh = musb_giveback(qh, urb, urb->status);
-+ while (qh && qh->is_ready && qh->hep &&
-+ list_empty(&qh->hep->urb_list)) {
-+ struct list_head *head;
-+ head = qh->ring.prev;
-+ list_del(&qh->ring);
-+ qh->hep->hcpriv = NULL;
-+ kfree(qh);
-+ qh = first_qh(head);
-+ }
-+
-
-- if (qh && qh->is_ready && !list_empty(&qh->hep->urb_list)) {
-+ if (qh && qh->is_ready) {
- DBG(4, "... next ep%d %cX urb %p\n",
- hw_ep->epnum, is_in ? 'R' : 'T',
- next_urb(qh));
-@@ -2019,8 +2029,6 @@ static int musb_cleanup_urb(struct urb *
- /* flush cpu writebuffer */
- csr = musb_readw(epio, MUSB_TXCSR);
- }
-- if (status == 0)
-- musb_advance_schedule(ep->musb, urb, ep, is_in);
- return status;
- }
-
-@@ -2083,13 +2091,27 @@ static int musb_urb_dequeue(struct usb_h
- /* NOTE: qh is invalid unless !list_empty(&hep->urb_list) */
- if (ret < 0 || (sched && qh != first_qh(sched))) {
- int ready = qh->is_ready;
--
-+ int type = urb->pipe;
- ret = 0;
- qh->is_ready = 0;
- __musb_giveback(musb, urb, 0);
-- qh->is_ready = ready;
-- } else
-+
-+ if (qh->hep && list_empty(&qh->hep->urb_list) &&
-+ list_empty(&qh->ring))
-+ list_del(&qh->ring);
-+ else
-+ qh->is_ready = ready;
-+ if (usb_pipeisoc(type) && usb_pipein(type))
-+ musb->in[qh->hw_ep->epnum] = NULL;
-+ else if (usb_pipeisoc(type) && usb_pipeout(type))
-+ musb->out[qh->hw_ep->epnum] = NULL;
-+ } else {
- ret = musb_cleanup_urb(urb, qh, urb->pipe & USB_DIR_IN);
-+ if (!ret) {
-+ musb_advance_schedule(qh->hw_ep->musb, urb, qh->hw_ep,
-+ urb->pipe & USB_DIR_IN);
-+ }
-+ }
- done:
- spin_unlock_irqrestore(&musb->lock, flags);
- return ret;
-@@ -2103,14 +2125,17 @@ musb_h_disable(struct usb_hcd *hcd, stru
- unsigned long flags;
- struct musb *musb = hcd_to_musb(hcd);
- u8 is_in = epnum & USB_DIR_IN;
-- struct musb_qh *qh = hep->hcpriv;
-+ struct musb_qh *qh, *qh_for_curr_urb;
- struct urb *urb, *tmp;
- struct list_head *sched;
--
-- if (!qh)
-- return;
-+ int i;
-
- spin_lock_irqsave(&musb->lock, flags);
-+ qh = hep->hcpriv;
-+ if (!qh) {
-+ spin_unlock_irqrestore(&musb->lock, flags);
-+ return;
-+ }
-
- switch (qh->type) {
- case USB_ENDPOINT_XFER_CONTROL:
-@@ -2124,6 +2149,13 @@ musb_h_disable(struct usb_hcd *hcd, stru
- sched = &musb->out_bulk;
- break;
- }
-+ case USB_ENDPOINT_XFER_ISOC:
-+ case USB_ENDPOINT_XFER_INT:
-+ for (i = 1; i < musb->nr_endpoints; i++) {
-+ if ((musb->in[i] == qh) || (musb->out[i] == qh))
-+ sched = &qh->ring;
-+ break;
-+ }
- default:
- /* REVISIT when we get a schedule tree, periodic transfers
- * won't always be at the head of a singleton queue...
-@@ -2132,26 +2164,48 @@ musb_h_disable(struct usb_hcd *hcd, stru
- break;
- }
-
-- /* NOTE: qh is invalid unless !list_empty(&hep->urb_list) */
--
- /* kick first urb off the hardware, if needed */
-- qh->is_ready = 0;
-- if (!sched || qh == first_qh(sched)) {
-+ if (sched) {
-+ qh_for_curr_urb = qh;
- urb = next_urb(qh);
--
-- /* make software (then hardware) stop ASAP */
-- if (!urb->unlinked)
-- urb->status = -ESHUTDOWN;
--
-- /* cleanup */
-- musb_cleanup_urb(urb, qh, urb->pipe & USB_DIR_IN);
-- } else
-- urb = NULL;
--
-- /* then just nuke all the others */
-- list_for_each_entry_safe_from(urb, tmp, &hep->urb_list, urb_list)
-- musb_giveback(qh, urb, -ESHUTDOWN);
--
-+ if (urb) {
-+ /* make software (then hardware) stop ASAP */
-+ if (!urb->unlinked)
-+ urb->status = -ESHUTDOWN;
-+ /* cleanup first urb of first qh; */
-+ if (qh == first_qh(sched)) {
-+ musb_cleanup_urb(urb, qh,
-+ urb->pipe & USB_DIR_IN);
-+ }
-+ qh = musb_giveback(qh, urb, -ESHUTDOWN);
-+ if (qh == qh_for_curr_urb) {
-+ list_for_each_entry_safe_from(urb, tmp,
-+ &hep->urb_list, urb_list) {
-+ qh = musb_giveback(qh, tmp, -ESHUTDOWN);
-+ if (qh != qh_for_curr_urb)
-+ break;
-+ }
-+ }
-+ }
-+ /* pick the next candidate and go */
-+ if (qh && qh->is_ready) {
-+ while (qh && qh->is_ready && qh->hep &&
-+ list_empty(&qh->hep->urb_list)) {
-+ struct list_head *head;
-+ head = qh->ring.prev;
-+ list_del(&qh->ring);
-+ qh->hep->hcpriv = NULL;
-+ kfree(qh);
-+ qh = first_qh(head);
-+ }
-+ if (qh && qh->is_ready && qh->hep &&
-+ qh_for_curr_urb == first_qh(sched)) {
-+ epnum = qh->hep->desc.bEndpointAddress;
-+ is_in = epnum & USB_DIR_IN;
-+ musb_start_urb(musb, is_in, qh);
-+ }
-+ }
-+ }
- spin_unlock_irqrestore(&musb->lock, flags);
- }
-
diff --git a/usb.current/usb-musb-fixes-endpoint-allocation-logic.patch b/usb.current/usb-musb-fixes-endpoint-allocation-logic.patch
deleted file mode 100644
index 3bceb579b124b4..00000000000000
--- a/usb.current/usb-musb-fixes-endpoint-allocation-logic.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From felipe.balbi@nokia.com Fri Oct 31 09:55:18 2008
-From: Felipe Balbi <felipe.balbi@nokia.com>
-Date: Wed, 29 Oct 2008 15:10:34 +0200
-Subject: usb: musb: Fixes endpoint allocation logic
-To: linux-usb@vger.kernel.org
-Cc: Greg Kroah-Hartman <gregkh@suse.de>, Ajay Kumar Gupta <ajay.gupta@ti.com>, Felipe Balbi <felipe.balbi@nokia.com>
-Message-ID: <1225285839-3085-5-git-send-email-felipe.balbi@nokia.com>
-
-
-From: Ajay Kumar Gupta <ajay.gupta@ti.com>
-
-musb->periodic[] flag was getting set for an endpoint even when only rx
-or tx is used.This patch adds two field musb->in[16] and musb->out[16]
-in place of musb->periodic[32] which will enable endpoint allocation
-flag setting on rx/tx basis of an endpoint.
-
-Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
-Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/usb/musb/musb_core.h | 3 ++-
- drivers/usb/musb/musb_host.c | 13 ++++++++++---
- 2 files changed, 12 insertions(+), 4 deletions(-)
-
---- a/drivers/usb/musb/musb_core.h
-+++ b/drivers/usb/musb/musb_core.h
-@@ -331,7 +331,8 @@ struct musb {
- struct list_head control; /* of musb_qh */
- struct list_head in_bulk; /* of musb_qh */
- struct list_head out_bulk; /* of musb_qh */
-- struct musb_qh *periodic[32]; /* tree of interrupt+iso */
-+ struct musb_qh *in[16];
-+ struct musb_qh *out[16];
- #endif
-
- /* called with IRQs blocked; ON/nonzero implies starting a session,
---- a/drivers/usb/musb/musb_host.c
-+++ b/drivers/usb/musb/musb_host.c
-@@ -384,7 +384,10 @@ musb_giveback(struct musb_qh *qh, struct
- * de-allocated if it's tracked and allocated;
- * and where we'd update the schedule tree...
- */
-- musb->periodic[ep->epnum] = NULL;
-+ if (is_in)
-+ musb->in[ep->epnum] = NULL;
-+ else
-+ musb->out[ep->epnum] = NULL;
- kfree(qh);
- qh = NULL;
- break;
-@@ -1751,7 +1754,8 @@ static int musb_schedule(
- for (epnum = 1; epnum < musb->nr_endpoints; epnum++) {
- int diff;
-
-- if (musb->periodic[epnum])
-+ if ((is_in && musb->in[epnum]) ||
-+ (!is_in && musb->out[epnum]))
- continue;
- hw_ep = &musb->endpoints[epnum];
- if (hw_ep == musb->bulk_ep)
-@@ -1772,7 +1776,10 @@ static int musb_schedule(
-
- idle = 1;
- hw_ep = musb->endpoints + best_end;
-- musb->periodic[best_end] = qh;
-+ if (is_in)
-+ musb->in[best_end] = qh;
-+ else
-+ musb->out[best_end] = qh;
- DBG(4, "qh %p periodic slot %d\n", qh, best_end);
- success:
- qh->hw_ep = hw_ep;
diff --git a/usb.current/usb-net-asix-add-support-for-cables-to-go-usb-ethernet-adapter.patch b/usb.current/usb-net-asix-add-support-for-cables-to-go-usb-ethernet-adapter.patch
new file mode 100644
index 00000000000000..ebfde01e000efd
--- /dev/null
+++ b/usb.current/usb-net-asix-add-support-for-cables-to-go-usb-ethernet-adapter.patch
@@ -0,0 +1,32 @@
+From jason@lakedaemon.net Wed Nov 12 15:39:55 2008
+From: Jason Cooper <jason@lakedaemon.net>
+Date: Tue, 11 Nov 2008 13:02:53 -0500
+Subject: USB: net: asix: add support for Cables-to-Go USB Ethernet adapter
+To: Greg KH <greg@kroah.com>
+Cc: <alan@lxorguk.ukuu.org.uk>
+Message-ID: <4919C8CD.5020301@lakedaemon.net>
+
+
+Add support to drivers/net/usb/asix.c for the Cables-to-Go "USB 2.0 to
+10/100 Ethernet Adapter". USB id 0b95:772a.
+
+Signed-off-by: Jason Cooper <jason@lakedaemon.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/usb/asix.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/net/usb/asix.c
++++ b/drivers/net/usb/asix.c
+@@ -1444,6 +1444,10 @@ static const struct usb_device_id produc
+ // Apple USB Ethernet Adapter
+ USB_DEVICE(0x05ac, 0x1402),
+ .driver_info = (unsigned long) &ax88772_info,
++}, {
++ // Cables-to-Go USB Ethernet Adapter
++ USB_DEVICE(0x0b95, 0x772a),
++ .driver_info = (unsigned long) &ax88772_info,
+ },
+ { }, // END
+ };