aboutsummaryrefslogtreecommitdiffstats
path: root/usb.current
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2009-02-24 21:16:56 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2009-02-24 21:16:56 -0800
commit602aaad8c220fb64717b037820735f4845292fd6 (patch)
tree33ed7e5e41ce0698822633e25a50bfcf65469996 /usb.current
parente7b74933924610a7d14af135e875f91afae937e0 (diff)
downloadpatches-602aaad8c220fb64717b037820735f4845292fd6.tar.gz
loads of rework and new patches and version sync for 2.6.29-rc6
Diffstat (limited to 'usb.current')
-rw-r--r--usb.current/usb-cdc-acm-add-usb-id-for-motomagx-phones.patch33
-rw-r--r--usb.current/usb-musb-be-careful-with-64k-transfer-lengths-host-side.patch66
-rw-r--r--usb.current/usb-musb-be-careful-with-64k-transfer-lengths.patch46
-rw-r--r--usb.current/usb-musb-fix-data-toggle-saving-with-shared-fifo.patch46
-rw-r--r--usb.current/usb-musb-fix-musb_host_tx-for-shared-endpoint-fifo.patch43
-rw-r--r--usb.current/usb-musb-fix-srp-sysfs-entry-deletion.patch44
-rw-r--r--usb.current/usb-musb-fix-urb_dequeue-method.patch75
-rw-r--r--usb.current/usb-musb-host-endpoint_disable-oops-fixes.patch93
-rw-r--r--usb.current/usb-musb-make-davinci-work-in-mainline.patch144
-rw-r--r--usb.current/usb-musb-resume-suspended-root-hub-on-disconnect.patch38
-rw-r--r--usb.current/usb-musb-use-right-poll-limit-for-low-speed-devices.patch56
-rw-r--r--usb.current/usb-serial-add-support-for-second-revision-of-ericsson-f3507g-wwan-card.patch42
12 files changed, 726 insertions, 0 deletions
diff --git a/usb.current/usb-cdc-acm-add-usb-id-for-motomagx-phones.patch b/usb.current/usb-cdc-acm-add-usb-id-for-motomagx-phones.patch
new file mode 100644
index 00000000000000..a1c2f14a569b28
--- /dev/null
+++ b/usb.current/usb-cdc-acm-add-usb-id-for-motomagx-phones.patch
@@ -0,0 +1,33 @@
+From dimichxp@gmail.com Tue Feb 24 21:12:08 2009
+From: Dmitriy Taychenachev <dimichxp@gmail.com>
+Date: Wed, 25 Feb 2009 12:36:51 +0800
+Subject: USB: cdc-acm: add usb id for motomagx phones
+To: linux-usb@vger.kernel.org
+Message-ID: <2651740bf64c1d981c26.1235536611@wifi.master>
+
+
+The Motorola MOTOMAGX phones (Z6, E8, Zn5 so far) are providing
+combined ACM/BLAN USB configuration. Since it has Vendor Specific
+class, the corresponding drivers (cdc-acm, zaurus) can't find it just
+by interface info. This patch adds usb id so the cdc-acm driver can
+properly handle this combined device.
+
+Signed-off-by: Dmitriy Taychenachev <dimichxp@gmail.com>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/class/cdc-acm.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/usb/class/cdc-acm.c
++++ b/drivers/usb/class/cdc-acm.c
+@@ -1376,6 +1376,8 @@ static struct usb_device_id acm_ids[] =
+ { USB_DEVICE(0x0572, 0x1324), /* Conexant USB MODEM RD02-D400 */
+ .driver_info = NO_UNION_NORMAL, /* has no union descriptor */
+ },
++ { USB_DEVICE(0x22b8, 0x6425), /* Motorola MOTOMAGX phones */
++ },
+
+ /* control interfaces with various AT-command sets */
+ { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,
diff --git a/usb.current/usb-musb-be-careful-with-64k-transfer-lengths-host-side.patch b/usb.current/usb-musb-be-careful-with-64k-transfer-lengths-host-side.patch
new file mode 100644
index 00000000000000..e8dbe1f2503446
--- /dev/null
+++ b/usb.current/usb-musb-be-careful-with-64k-transfer-lengths-host-side.patch
@@ -0,0 +1,66 @@
+From david-b@pacbell.net Tue Feb 24 21:08:27 2009
+From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
+Date: Sat, 21 Feb 2009 15:31:23 -0800
+Subject: USB: musb: be careful with 64K+ transfer lengths, host side
+To: Greg KH <greg@kroah.com>
+Cc: linux-usb@vger.kernel.org, Sergei Shtylyov <sshtylyov@ru.mvista.com>
+Message-ID: <200902211531.23169.david-b@pacbell.net>
+Content-Disposition: inline
+
+
+From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
+
+Feeding 32-bit length cast down to 'u16' to min() to calculate the FIFO
+count in musb_host_tx() risks sending a short packet prematurely for
+transfer sizes over 64 KB.
+
+Similarly, although data transfer size shouldn't exceed 65535 bytes for
+the control endpoint, making musb_h_ep0_continue() more robust WRT URBs
+with possibly oversized buffer will not hurt either...
+
+Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Cc: Felipe Balbi <felipe.balbi@nokia.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/musb/musb_host.c | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+--- a/drivers/usb/musb/musb_host.c
++++ b/drivers/usb/musb/musb_host.c
+@@ -937,8 +937,8 @@ static bool musb_h_ep0_continue(struct m
+ switch (musb->ep0_stage) {
+ case MUSB_EP0_IN:
+ fifo_dest = urb->transfer_buffer + urb->actual_length;
+- fifo_count = min(len, ((u16) (urb->transfer_buffer_length
+- - urb->actual_length)));
++ fifo_count = min_t(size_t, len, urb->transfer_buffer_length -
++ urb->actual_length);
+ if (fifo_count < len)
+ urb->status = -EOVERFLOW;
+
+@@ -971,10 +971,9 @@ static bool musb_h_ep0_continue(struct m
+ }
+ /* FALLTHROUGH */
+ case MUSB_EP0_OUT:
+- fifo_count = min(qh->maxpacket, ((u16)
+- (urb->transfer_buffer_length
+- - urb->actual_length)));
+-
++ fifo_count = min_t(size_t, qh->maxpacket,
++ urb->transfer_buffer_length -
++ urb->actual_length);
+ if (fifo_count) {
+ fifo_dest = (u8 *) (urb->transfer_buffer
+ + urb->actual_length);
+@@ -1304,7 +1303,8 @@ void musb_host_tx(struct musb *musb, u8
+ * packets before updating TXCSR ... other docs disagree ...
+ */
+ /* PIO: start next packet in this URB */
+- wLength = min(qh->maxpacket, (u16) wLength);
++ if (wLength > qh->maxpacket)
++ wLength = qh->maxpacket;
+ musb_write_fifo(hw_ep, wLength, buf);
+ qh->segsize = wLength;
+
diff --git a/usb.current/usb-musb-be-careful-with-64k-transfer-lengths.patch b/usb.current/usb-musb-be-careful-with-64k-transfer-lengths.patch
new file mode 100644
index 00000000000000..d1fab57b512f6d
--- /dev/null
+++ b/usb.current/usb-musb-be-careful-with-64k-transfer-lengths.patch
@@ -0,0 +1,46 @@
+From david-b@pacbell.net Tue Feb 24 21:06:10 2009
+From: Felipe Balbi <felipe.balbi@nokia.com>
+Date: Sat, 21 Feb 2009 15:29:42 -0800
+Subject: USB: musb: be careful with 64K+ transfer lengths (gadget side)
+To: Greg KH <greg@kroah.com>
+Cc: linux-usb@vger.kernel.org, Felipe Balbi <felipe.balbi@nokia.com>
+Message-ID: <200902211529.42439.david-b@pacbell.net>
+Content-Disposition: inline
+
+
+From: Felipe Balbi <felipe.balbi@nokia.com>
+
+request->actual is an unsigned and we should use the same
+variable type for fifo_count otherwise we might lose some
+data if request->length >= 64kbytes.
+
+[ dbrownell@users.sourceforge.net: fix compiler warning ]
+
+Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/musb/musb_gadget.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/musb/musb_gadget.c
++++ b/drivers/usb/musb/musb_gadget.c
+@@ -575,7 +575,7 @@ static void rxstate(struct musb *musb, s
+ struct usb_request *request = &req->request;
+ struct musb_ep *musb_ep = &musb->endpoints[epnum].ep_out;
+ void __iomem *epio = musb->endpoints[epnum].regs;
+- u16 fifo_count = 0;
++ unsigned fifo_count = 0;
+ u16 len = musb_ep->packet_sz;
+
+ csr = musb_readw(epio, MUSB_RXCSR);
+@@ -687,7 +687,7 @@ static void rxstate(struct musb *musb, s
+ len, fifo_count,
+ musb_ep->packet_sz);
+
+- fifo_count = min(len, fifo_count);
++ fifo_count = min_t(unsigned, len, fifo_count);
+
+ #ifdef CONFIG_USB_TUSB_OMAP_DMA
+ if (tusb_dma_omap() && musb_ep->dma) {
diff --git a/usb.current/usb-musb-fix-data-toggle-saving-with-shared-fifo.patch b/usb.current/usb-musb-fix-data-toggle-saving-with-shared-fifo.patch
new file mode 100644
index 00000000000000..bb75c3306baa5f
--- /dev/null
+++ b/usb.current/usb-musb-fix-data-toggle-saving-with-shared-fifo.patch
@@ -0,0 +1,46 @@
+From david-b@pacbell.net Tue Feb 24 21:07:45 2009
+From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
+Date: Sat, 21 Feb 2009 15:31:13 -0800
+Subject: USB: musb: fix data toggle saving with shared FIFO
+To: Greg KH <greg@kroah.com>
+Cc: linux-usb@vger.kernel.org, Sergei Shtylyov <sshtylyov@ru.mvista.com>
+Message-ID: <200902211531.13134.david-b@pacbell.net>
+Content-Disposition: inline
+
+
+From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
+
+For some strange reason the host side musb_giveback() decides
+that it's always got an IN transfer when the hardware endpoint
+is using a shared FIFO. This causes musb_save_toggle() to read
+the toggle state from the RXCSR register instead of TXCSR, and
+may also cause unneeded reloading of RX endpoint registers.
+
+Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/musb/musb_host.c | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+--- a/drivers/usb/musb/musb_host.c
++++ b/drivers/usb/musb/musb_host.c
+@@ -335,16 +335,11 @@ musb_save_toggle(struct musb_hw_ep *ep,
+ static struct musb_qh *
+ musb_giveback(struct musb_qh *qh, struct urb *urb, int status)
+ {
+- int is_in;
+ struct musb_hw_ep *ep = qh->hw_ep;
+ struct musb *musb = ep->musb;
++ int is_in = usb_pipein(urb->pipe);
+ int ready = qh->is_ready;
+
+- if (ep->is_shared_fifo)
+- is_in = 1;
+- else
+- is_in = usb_pipein(urb->pipe);
+-
+ /* save toggle eagerly, for paranoia */
+ switch (qh->type) {
+ case USB_ENDPOINT_XFER_BULK:
diff --git a/usb.current/usb-musb-fix-musb_host_tx-for-shared-endpoint-fifo.patch b/usb.current/usb-musb-fix-musb_host_tx-for-shared-endpoint-fifo.patch
new file mode 100644
index 00000000000000..1c876093b06582
--- /dev/null
+++ b/usb.current/usb-musb-fix-musb_host_tx-for-shared-endpoint-fifo.patch
@@ -0,0 +1,43 @@
+From david-b@pacbell.net Tue Feb 24 21:06:30 2009
+From: Dmitry Krivoschekov <dkrivoschekov@ru.mvista.com>
+Date: Sat, 21 Feb 2009 15:30:15 -0800
+Subject: USB: musb: fix musb_host_tx() for shared endpoint FIFO
+To: Greg KH <greg@kroah.com>
+Cc: linux-usb@vger.kernel.org, Dmitry Krivoschekov <dkrivoschekov@ru.mvista.com>
+Message-ID: <200902211530.15372.david-b@pacbell.net>
+Content-Disposition: inline
+
+
+From: Dmitry Krivoschekov <dkrivoschekov@ru.mvista.com>
+
+The input queue should be used for TX on endpoints which
+share FIFO hardware. The host TX path wasn't doing that.
+
+Shared FIFOs are most often configured for periodic endpoints,
+which are mostly used for RX/IN transfers ... that's probably
+how this bug managed to linger for a long time.
+
+[ dbrownell@users.sourceforge.net: update patch description ]
+
+Signed-off-by: Dmitry Krivoschekov <dkrivoschekov@ru.mvista.com>
+Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
+Acked-by: David Brownell <dbrownell@users.sourceforge.net>
+Cc: Felipe Balbi <felipe.balbi@nokia.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/musb/musb_host.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/musb/musb_host.c
++++ b/drivers/usb/musb/musb_host.c
+@@ -1161,7 +1161,8 @@ void musb_host_tx(struct musb *musb, u8
+ struct urb *urb;
+ struct musb_hw_ep *hw_ep = musb->endpoints + epnum;
+ void __iomem *epio = hw_ep->regs;
+- struct musb_qh *qh = hw_ep->out_qh;
++ struct musb_qh *qh = hw_ep->is_shared_fifo ? hw_ep->in_qh
++ : hw_ep->out_qh;
+ u32 status = 0;
+ void __iomem *mbase = musb->mregs;
+ struct dma_channel *dma;
diff --git a/usb.current/usb-musb-fix-srp-sysfs-entry-deletion.patch b/usb.current/usb-musb-fix-srp-sysfs-entry-deletion.patch
new file mode 100644
index 00000000000000..05f7d06439f410
--- /dev/null
+++ b/usb.current/usb-musb-fix-srp-sysfs-entry-deletion.patch
@@ -0,0 +1,44 @@
+From david-b@pacbell.net Tue Feb 24 21:09:27 2009
+From: Vikram Pandita <vikram.pandita@ti.com>
+Date: Sat, 21 Feb 2009 15:31:44 -0800
+Subject: USB: musb: fix srp sysfs entry deletion
+To: Greg KH <greg@kroah.com>
+Cc: linux-usb@vger.kernel.org, "Pandita, Vikram" <vikram.pandita@ti.com>
+Message-ID: <200902211531.44907.david-b@pacbell.net>
+
+
+From: Vikram Pandita <vikram.pandita@ti.com>
+
+The SRP sysfs attribute is dependent on gadget mode; any
+gadget may support SRP. But "rmmod musb_hdrc" didn't
+remove that attribute; fix.
+
+Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
+Acked-by: Felipe Balbi <me@felipebalbi.com>
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/musb/musb_core.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/musb/musb_core.c
++++ b/drivers/usb/musb/musb_core.c
+@@ -1816,7 +1816,7 @@ static void musb_free(struct musb *musb)
+ #ifdef CONFIG_SYSFS
+ device_remove_file(musb->controller, &dev_attr_mode);
+ device_remove_file(musb->controller, &dev_attr_vbus);
+-#ifdef CONFIG_USB_MUSB_OTG
++#ifdef CONFIG_USB_GADGET_MUSB_HDRC
+ device_remove_file(musb->controller, &dev_attr_srp);
+ #endif
+ #endif
+@@ -2064,7 +2064,7 @@ fail2:
+ #ifdef CONFIG_SYSFS
+ device_remove_file(musb->controller, &dev_attr_mode);
+ device_remove_file(musb->controller, &dev_attr_vbus);
+-#ifdef CONFIG_USB_MUSB_OTG
++#ifdef CONFIG_USB_GADGET_MUSB_HDRC
+ device_remove_file(musb->controller, &dev_attr_srp);
+ #endif
+ #endif
diff --git a/usb.current/usb-musb-fix-urb_dequeue-method.patch b/usb.current/usb-musb-fix-urb_dequeue-method.patch
new file mode 100644
index 00000000000000..ddd7419e3be7ad
--- /dev/null
+++ b/usb.current/usb-musb-fix-urb_dequeue-method.patch
@@ -0,0 +1,75 @@
+From david-b@pacbell.net Tue Feb 24 21:06:55 2009
+From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
+Date: Sat, 21 Feb 2009 15:30:45 -0800
+Subject: USB: musb: fix urb_dequeue() method
+To: Greg KH <greg@kroah.com>
+Cc: linux-usb@vger.kernel.org, Sergei Shtylyov <sshtylyov@ru.mvista.com>
+Message-ID: <200902211530.45704.david-b@pacbell.net>
+Content-Disposition: inline
+
+
+From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
+
+The urb_dequeue() method forgets to unlink 'struct musb_qh' from the
+control or bulk schedules when the URB being cancelled is the only
+one queued to its endpoint. That will cause musb_advance_schedule()
+to block once it reaches 'struct musb_qh' with now empty URB list, so
+URBs queued for other endpoints after the one being dequeued will not
+be served.
+
+Fix by unlinking the QH from the list except when it's already being
+handled (typically by musb_giveback). Since a QH with an empty URB
+list is now supposed to be freed, do that. And remove a now-useless
+check from musb_advance_schedule().
+
+[ dbrownell@users.sourceforge.net: update patch description,
+ and fold in a dequeue() comment patch ]
+
+Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Cc: Felipe Balbi <felipe.balbi@nokia.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/musb/musb_host.c | 15 ++++++++++++---
+ 1 file changed, 12 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/musb/musb_host.c
++++ b/drivers/usb/musb/musb_host.c
+@@ -432,7 +432,7 @@ musb_advance_schedule(struct musb *musb,
+ else
+ qh = musb_giveback(qh, urb, urb->status);
+
+- if (qh && qh->is_ready && !list_empty(&qh->hep->urb_list)) {
++ if (qh != NULL && qh->is_ready) {
+ DBG(4, "... next ep%d %cX urb %p\n",
+ hw_ep->epnum, is_in ? 'R' : 'T',
+ next_urb(qh));
+@@ -2038,9 +2038,9 @@ static int musb_urb_dequeue(struct usb_h
+ goto done;
+
+ /* Any URB not actively programmed into endpoint hardware can be
+- * immediately given back. Such an URB must be at the head of its
++ * immediately given back; that's any URB not at the head of an
+ * endpoint queue, unless someday we get real DMA queues. And even
+- * then, it might not be known to the hardware...
++ * if it's at the head, it might not be known to the hardware...
+ *
+ * Otherwise abort current transfer, pending dma, etc.; urb->status
+ * has already been updated. This is a synchronous abort; it'd be
+@@ -2079,6 +2079,15 @@ static int musb_urb_dequeue(struct usb_h
+ qh->is_ready = 0;
+ __musb_giveback(musb, urb, 0);
+ qh->is_ready = ready;
++
++ /* If nothing else (usually musb_giveback) is using it
++ * and its URB list has emptied, recycle this qh.
++ */
++ if (ready && list_empty(&qh->hep->urb_list)) {
++ qh->hep->hcpriv = NULL;
++ list_del(&qh->ring);
++ kfree(qh);
++ }
+ } else
+ ret = musb_cleanup_urb(urb, qh, urb->pipe & USB_DIR_IN);
+ done:
diff --git a/usb.current/usb-musb-host-endpoint_disable-oops-fixes.patch b/usb.current/usb-musb-host-endpoint_disable-oops-fixes.patch
new file mode 100644
index 00000000000000..0eb20519bb362e
--- /dev/null
+++ b/usb.current/usb-musb-host-endpoint_disable-oops-fixes.patch
@@ -0,0 +1,93 @@
+From david-b@pacbell.net Tue Feb 24 21:07:26 2009
+From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
+Date: Sat, 21 Feb 2009 15:31:01 -0800
+Subject: USB: musb: host endpoint_disable() oops fixes
+To: Greg KH <greg@kroah.com>
+Cc: linux-usb@vger.kernel.org, Sergei Shtylyov <sshtylyov@ru.mvista.com>
+Message-ID: <200902211531.01389.david-b@pacbell.net>
+Content-Disposition: inline
+
+
+From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
+
+The musb_h_disable() routine can oops in some cases:
+
+ - It's not safe to read hep->hcpriv outside musb->lock,
+ since it gets changed on completion IRQ paths.
+
+ - The list iterators aren't safe to use in that way;
+ just remove the first element while !list_empty(),
+ so deletions on other code paths can't make trouble.
+
+We need two "scrub the list" loops because only one branch
+should touch hardware and advance the schedule.
+
+[ dbrownell@users.sourceforge.net: massively simplify
+ patch description; add key points as code comments ]
+
+Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/musb/musb_host.c | 36 ++++++++++++++++++++++++++----------
+ 1 file changed, 26 insertions(+), 10 deletions(-)
+
+--- a/drivers/usb/musb/musb_host.c
++++ b/drivers/usb/musb/musb_host.c
+@@ -2103,15 +2103,16 @@ 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 urb *urb, *tmp;
++ struct musb_qh *qh;
++ struct urb *urb;
+ struct list_head *sched;
+
+- if (!qh)
+- return;
+-
+ spin_lock_irqsave(&musb->lock, flags);
+
++ qh = hep->hcpriv;
++ if (qh == NULL)
++ goto exit;
++
+ switch (qh->type) {
+ case USB_ENDPOINT_XFER_CONTROL:
+ sched = &musb->control;
+@@ -2145,13 +2146,28 @@ musb_h_disable(struct usb_hcd *hcd, stru
+
+ /* 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);
++ /* Then nuke all the others ... and advance the
++ * queue on hw_ep (e.g. bulk ring) when we're done.
++ */
++ while (!list_empty(&hep->urb_list)) {
++ urb = next_urb(qh);
++ urb->status = -ESHUTDOWN;
++ musb_advance_schedule(musb, urb, qh->hw_ep, is_in);
++ }
++ } else {
++ /* Just empty the queue; the hardware is busy with
++ * other transfers, and since !qh->is_ready nothing
++ * will activate any of these as it advances.
++ */
++ while (!list_empty(&hep->urb_list))
++ __musb_giveback(musb, next_urb(qh), -ESHUTDOWN);
+
++ hep->hcpriv = NULL;
++ list_del(&qh->ring);
++ kfree(qh);
++ }
++exit:
+ spin_unlock_irqrestore(&musb->lock, flags);
+ }
+
diff --git a/usb.current/usb-musb-make-davinci-work-in-mainline.patch b/usb.current/usb-musb-make-davinci-work-in-mainline.patch
new file mode 100644
index 00000000000000..f5025e57bdf2ed
--- /dev/null
+++ b/usb.current/usb-musb-make-davinci-work-in-mainline.patch
@@ -0,0 +1,144 @@
+From david-b@pacbell.net Tue Feb 24 21:03:58 2009
+From: David Brownell <david-b@pacbell.net>
+Date: Fri, 20 Feb 2009 13:45:17 -0800
+Subject: usb: musb: make Davinci *work* in mainline
+To: Greg KH <greg@kroah.com>, linux-usb@vger.kernel.org
+Cc: DaVinci <davinci-linux-open-source@linux.davincidsp.com>
+Message-ID: <200902201345.17183.david-b@pacbell.net>
+Content-Disposition: inline
+
+
+From: David Brownell <dbrownell@users.sourceforge.net>
+
+Now that the musb build fixes for DaVinci got merged (RC3?), kick in
+the other bits needed to get it finally *working* in mainline:
+
+ - Use clk_enable()/clk_disable() ... the "always enable USB clocks"
+ code this originally relied on has since been removed.
+
+ - Initialize the USB device only after the relevant I2C GPIOs are
+ available, so the host side can properly enable VBUS.
+
+ - Tweak init sequencing to cope with mainline's relatively late init
+ of the I2C system bus for power switches, transceivers, and so on.
+
+Sanity tested on DM6664 EVM for host and peripheral modes; that system
+won't boot with CONFIG_PM enabled, so OTG can't yet be tested. Also
+verified on OMAP3.
+
+(Unrelated: correct the MODULE_PARM_DESC spelling of musb_debug.)
+
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Cc: Felipe Balbi <me@felipebalbi.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/arm/mach-davinci/board-evm.c | 6 +++---
+ arch/arm/mach-davinci/clock.c | 5 +++++
+ arch/arm/mach-davinci/usb.c | 1 +
+ drivers/usb/musb/davinci.c | 15 ++++-----------
+ drivers/usb/musb/musb_core.c | 8 ++++----
+ 5 files changed, 17 insertions(+), 18 deletions(-)
+
+--- a/arch/arm/mach-davinci/board-evm.c
++++ b/arch/arm/mach-davinci/board-evm.c
+@@ -311,6 +311,9 @@ evm_u35_setup(struct i2c_client *client,
+ gpio_request(gpio + 7, "nCF_SEL");
+ gpio_direction_output(gpio + 7, 1);
+
++ /* irlml6401 sustains over 3A, switches 5V in under 8 msec */
++ setup_usb(500, 8);
++
+ return 0;
+ }
+
+@@ -417,9 +420,6 @@ static __init void davinci_evm_init(void
+ platform_add_devices(davinci_evm_devices,
+ ARRAY_SIZE(davinci_evm_devices));
+ evm_init_i2c();
+-
+- /* irlml6401 sustains over 3A, switches 5V in under 8 msec */
+- setup_usb(500, 8);
+ }
+
+ static __init void davinci_evm_irq_init(void)
+--- a/arch/arm/mach-davinci/clock.c
++++ b/arch/arm/mach-davinci/clock.c
+@@ -231,6 +231,11 @@ static struct clk davinci_clks[] = {
+ .lpsc = DAVINCI_LPSC_GPIO,
+ },
+ {
++ .name = "usb",
++ .rate = &commonrate,
++ .lpsc = DAVINCI_LPSC_USB,
++ },
++ {
+ .name = "AEMIFCLK",
+ .rate = &commonrate,
+ .lpsc = DAVINCI_LPSC_AEMIF,
+--- a/arch/arm/mach-davinci/usb.c
++++ b/arch/arm/mach-davinci/usb.c
+@@ -47,6 +47,7 @@ static struct musb_hdrc_platform_data us
+ #elif defined(CONFIG_USB_MUSB_HOST)
+ .mode = MUSB_HOST,
+ #endif
++ .clock = "usb",
+ .config = &musb_config,
+ };
+
+--- a/drivers/usb/musb/davinci.c
++++ b/drivers/usb/musb/davinci.c
+@@ -377,18 +377,8 @@ int __init musb_platform_init(struct mus
+ u32 revision;
+
+ musb->mregs += DAVINCI_BASE_OFFSET;
+-#if 0
+- /* REVISIT there's something odd about clocking, this
+- * didn't appear do the job ...
+- */
+- musb->clock = clk_get(pDevice, "usb");
+- if (IS_ERR(musb->clock))
+- return PTR_ERR(musb->clock);
+
+- status = clk_enable(musb->clock);
+- if (status < 0)
+- return -ENODEV;
+-#endif
++ clk_enable(musb->clock);
+
+ /* returns zero if e.g. not clocked */
+ revision = musb_readl(tibase, DAVINCI_USB_VERSION_REG);
+@@ -453,5 +443,8 @@ int musb_platform_exit(struct musb *musb
+ }
+
+ phy_off();
++
++ clk_disable(musb->clock);
++
+ return 0;
+ }
+--- a/drivers/usb/musb/musb_core.c
++++ b/drivers/usb/musb/musb_core.c
+@@ -115,7 +115,7 @@
+
+
+ unsigned musb_debug;
+-module_param(musb_debug, uint, S_IRUGO | S_IWUSR);
++module_param_named(debug, musb_debug, uint, S_IRUGO | S_IWUSR);
+ MODULE_PARM_DESC(debug, "Debug message level. Default = 0");
+
+ #define DRIVER_AUTHOR "Mentor Graphics, Texas Instruments, Nokia"
+@@ -2243,10 +2243,10 @@ static int __init musb_init(void)
+ return platform_driver_probe(&musb_driver, musb_probe);
+ }
+
+-/* make us init after usbcore and before usb
+- * gadget and host-side drivers start to register
++/* make us init after usbcore and i2c (transceivers, regulators, etc)
++ * and before usb gadget and host-side drivers start to register
+ */
+-subsys_initcall(musb_init);
++fs_initcall(musb_init);
+
+ static void __exit musb_cleanup(void)
+ {
diff --git a/usb.current/usb-musb-resume-suspended-root-hub-on-disconnect.patch b/usb.current/usb-musb-resume-suspended-root-hub-on-disconnect.patch
new file mode 100644
index 00000000000000..47a734aa362e40
--- /dev/null
+++ b/usb.current/usb-musb-resume-suspended-root-hub-on-disconnect.patch
@@ -0,0 +1,38 @@
+From david-b@pacbell.net Tue Feb 24 21:09:07 2009
+From: Anand Gadiyar <gadiyar@ti.com>
+Date: Sat, 21 Feb 2009 15:31:40 -0800
+Subject: USB: musb: resume suspended root hub on disconnect
+To: Greg KH <greg@kroah.com>
+Cc: linux-usb@vger.kernel.org, Anand Gadiyar <gadiyar@ti.com>
+Message-ID: <200902211531.40766.david-b@pacbell.net>
+Content-Disposition: inline
+
+
+From: Anand Gadiyar <gadiyar@ti.com>
+
+If this is not done, khubd will not be informed of the disconnect
+and will assume the device is still there.
+
+Easily seen when a hub is connected with no device attached to it;
+it will autosuspend. When the hub is disconnected, it still shows
+up in /proc/bus/usb/devices
+
+Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
+Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/musb/musb_core.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/musb/musb_core.c
++++ b/drivers/usb/musb/musb_core.c
+@@ -767,6 +767,7 @@ static irqreturn_t musb_stage2_irq(struc
+ #ifdef CONFIG_USB_MUSB_HDRC_HCD
+ case OTG_STATE_A_HOST:
+ case OTG_STATE_A_SUSPEND:
++ usb_hcd_resume_root_hub(musb_to_hcd(musb));
+ musb_root_disconnect(musb);
+ if (musb->a_wait_bcon != 0)
+ musb_platform_try_idle(musb, jiffies
diff --git a/usb.current/usb-musb-use-right-poll-limit-for-low-speed-devices.patch b/usb.current/usb-musb-use-right-poll-limit-for-low-speed-devices.patch
new file mode 100644
index 00000000000000..c12bd48a5c55fa
--- /dev/null
+++ b/usb.current/usb-musb-use-right-poll-limit-for-low-speed-devices.patch
@@ -0,0 +1,56 @@
+From david-b@pacbell.net Tue Feb 24 21:08:49 2009
+From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
+Date: Sat, 21 Feb 2009 15:31:35 -0800
+Subject: USB: musb: use right poll limit for low speed devices
+To: Greg KH <greg@kroah.com>
+Cc: linux-usb@vger.kernel.org, Sergei Shtylyov <sshtylyov@ru.mvista.com>
+Message-ID: <200902211531.35324.david-b@pacbell.net>
+Content-Disposition: inline
+
+
+From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
+
+Remove wrongly applied upper limit on the interrupt transfer
+interval for low speed devices (not much of an error per se,
+according to USB specs).
+
+Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/musb/musb_host.c | 18 ++++++++++--------
+ 1 file changed, 10 insertions(+), 8 deletions(-)
+
+--- a/drivers/usb/musb/musb_host.c
++++ b/drivers/usb/musb/musb_host.c
+@@ -1863,19 +1863,21 @@ static int musb_urb_enqueue(
+ }
+ qh->type_reg = type_reg;
+
+- /* precompute rxinterval/txinterval register */
+- interval = min((u8)16, epd->bInterval); /* log encoding */
++ /* Precompute RXINTERVAL/TXINTERVAL register */
+ switch (qh->type) {
+ case USB_ENDPOINT_XFER_INT:
+- /* fullspeed uses linear encoding */
+- if (USB_SPEED_FULL == urb->dev->speed) {
+- interval = epd->bInterval;
+- if (!interval)
+- interval = 1;
++ /*
++ * Full/low speeds use the linear encoding,
++ * high speed uses the logarithmic encoding.
++ */
++ if (urb->dev->speed <= USB_SPEED_FULL) {
++ interval = max_t(u8, epd->bInterval, 1);
++ break;
+ }
+ /* FALLTHROUGH */
+ case USB_ENDPOINT_XFER_ISOC:
+- /* iso always uses log encoding */
++ /* ISO always uses logarithmic encoding */
++ interval = min_t(u8, epd->bInterval, 16);
+ break;
+ default:
+ /* REVISIT we actually want to use NAK limits, hinting to the
diff --git a/usb.current/usb-serial-add-support-for-second-revision-of-ericsson-f3507g-wwan-card.patch b/usb.current/usb-serial-add-support-for-second-revision-of-ericsson-f3507g-wwan-card.patch
new file mode 100644
index 00000000000000..1acacebeb015ca
--- /dev/null
+++ b/usb.current/usb-serial-add-support-for-second-revision-of-ericsson-f3507g-wwan-card.patch
@@ -0,0 +1,42 @@
+From akpm@linux-foundation.org Tue Feb 24 21:13:38 2009
+From: Patrik Kullman <patrik@yes.nu>
+Date: Tue, 24 Feb 2009 13:38:53 -0800
+Subject: USB: serial: add support for second revision of Ericsson F3507G WWAN card
+To: mm-commits@vger.kernel.org
+Cc: patrik@yes.nu, greg@kroah.com
+Message-ID: <200902242138.n1OLcr0l013079@imap1.linux-foundation.org>
+
+From: Patrik Kullman <patrik@yes.nu>
+
+I noticed that my revision of the F3507G WWAN card isn't listed in
+drivers/usb/serial/option.c
+
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/option.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -294,7 +294,8 @@ static int option_send_setup(struct tty
+
+ /* Ericsson products */
+ #define ERICSSON_VENDOR_ID 0x0bdb
+-#define ERICSSON_PRODUCT_F3507G 0x1900
++#define ERICSSON_PRODUCT_F3507G_1 0x1900
++#define ERICSSON_PRODUCT_F3507G_2 0x1902
+
+ #define BENQ_VENDOR_ID 0x04a5
+ #define BENQ_PRODUCT_H10 0x4068
+@@ -512,7 +513,8 @@ static struct usb_device_id option_ids[]
+ { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF626) },
+ { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628) },
+ { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH) },
+- { USB_DEVICE(ERICSSON_VENDOR_ID, ERICSSON_PRODUCT_F3507G) },
++ { USB_DEVICE(ERICSSON_VENDOR_ID, ERICSSON_PRODUCT_F3507G_1) },
++ { USB_DEVICE(ERICSSON_VENDOR_ID, ERICSSON_PRODUCT_F3507G_2) },
+ { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) },
+ { USB_DEVICE(0x1da5, 0x4515) }, /* BenQ H20 */
+ { } /* Terminating entry */