aboutsummaryrefslogtreecommitdiffstats
path: root/usb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2005-11-28 13:54:42 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2005-11-28 13:54:42 -0800
commitd38f69ec46298606986c5b2cb9ef9292ca642968 (patch)
treeb7fe240709bfd970664d4e1838e9d2c96f318ae8 /usb
parented087c4bc638c8606bc06a35154016e3fa07752f (diff)
downloadpatches-d38f69ec46298606986c5b2cb9ef9292ca642968.tar.gz
usb and pci patches
Diffstat (limited to 'usb')
-rw-r--r--usb/additional-device-id-for-conexant-accessrunner-usb-driver.patch30
-rw-r--r--usb/isp116x-hcd-minor-cleanup.patch35
-rw-r--r--usb/usb-cleanups-for-usb-gadget-mass-storage.patch31
-rw-r--r--usb/usb-documentation-update.patch32
-rw-r--r--usb/usb-fix-usb-suspend-resume-crasher.patch90
5 files changed, 184 insertions, 34 deletions
diff --git a/usb/additional-device-id-for-conexant-accessrunner-usb-driver.patch b/usb/additional-device-id-for-conexant-accessrunner-usb-driver.patch
new file mode 100644
index 00000000000000..38ef63551c62a0
--- /dev/null
+++ b/usb/additional-device-id-for-conexant-accessrunner-usb-driver.patch
@@ -0,0 +1,30 @@
+From davej@redhat.com Mon Nov 28 10:50:35 2005
+Date: Mon, 28 Nov 2005 13:44:52 -0500
+From: Dave Jones <davej@redhat.com>
+Cc: gregkh@suse.de, petr.tuma@mff.cuni.cz
+Subject: Additional device ID for Conexant AccessRunner USB driver
+Message-ID: <20051128184452.GA25570@redhat.com>
+Content-Disposition: inline
+
+Reported as working in Fedora bugzilla by Petr.
+
+From: Petr Tuma <petr.tuma@mff.cuni.cz>
+Signed-off-by: Dave Jones <davej@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/atm/cxacru.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- gregkh-2.6.orig/drivers/usb/atm/cxacru.c
++++ gregkh-2.6/drivers/usb/atm/cxacru.c
+@@ -787,6 +787,9 @@ static const struct usb_device_id cxacru
+ { /* V = Conexant P = ADSL modem (Hasbani project) */
+ USB_DEVICE(0x0572, 0xcb00), .driver_info = (unsigned long) &cxacru_cb00
+ },
++ { /* V = Conexant P = ADSL modem (Well PTI-800 */
++ USB_DEVICE(0x0572, 0xcb02), .driver_info = (unsigned long) &cxacru_cb00
++ },
+ { /* V = Conexant P = ADSL modem */
+ USB_DEVICE(0x0572, 0xcb01), .driver_info = (unsigned long) &cxacru_cb00
+ },
diff --git a/usb/isp116x-hcd-minor-cleanup.patch b/usb/isp116x-hcd-minor-cleanup.patch
new file mode 100644
index 00000000000000..bea2f547c00ffc
--- /dev/null
+++ b/usb/isp116x-hcd-minor-cleanup.patch
@@ -0,0 +1,35 @@
+From ok@artecdesign.ee Fri Nov 25 16:01:02 2005
+Date: Sat, 26 Nov 2005 01:58:36 +0200 (EET)
+From: Olav Kongas <ok@artecdesign.ee>
+To: Greg KH <greg@kroah.com>
+Subject: isp116x-hcd: minor cleanup
+Message-ID: <Pine.LNX.4.63.0511260153120.21074@pcy.artec.ee>
+
+When going to suspend, there's no point in setting HC state in
+host controller driver as USB core takes care of this.
+
+Signed-off-by: Olav Kongas <ok@artecdesign.ee>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/isp116x-hcd.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+--- gregkh-2.6.orig/drivers/usb/host/isp116x-hcd.c
++++ gregkh-2.6/drivers/usb/host/isp116x-hcd.c
+@@ -1426,7 +1426,6 @@ static int isp116x_bus_suspend(struct us
+ val = isp116x_read_reg32(isp116x, HCCONTROL);
+ switch (val & HCCONTROL_HCFS) {
+ case HCCONTROL_USB_OPER:
+- hcd->state = HC_STATE_QUIESCING;
+ val &= (~HCCONTROL_HCFS & ~HCCONTROL_RWE);
+ val |= HCCONTROL_USB_SUSPEND;
+ if (device_may_wakeup(&hcd->self.root_hub->dev))
+@@ -1434,7 +1433,6 @@ static int isp116x_bus_suspend(struct us
+ /* Wait for usb transfers to finish */
+ mdelay(2);
+ isp116x_write_reg32(isp116x, HCCONTROL, val);
+- hcd->state = HC_STATE_SUSPENDED;
+ /* Wait for devices to suspend */
+ mdelay(5);
+ case HCCONTROL_USB_SUSPEND:
diff --git a/usb/usb-cleanups-for-usb-gadget-mass-storage.patch b/usb/usb-cleanups-for-usb-gadget-mass-storage.patch
new file mode 100644
index 00000000000000..204dc4c5345adc
--- /dev/null
+++ b/usb/usb-cleanups-for-usb-gadget-mass-storage.patch
@@ -0,0 +1,31 @@
+From stern@rowland.harvard.edu Sun Nov 27 06:49:40 2005
+Date: Sun, 27 Nov 2005 09:47:28 -0500 (EST)
+From: Pavel Machek <pavel@ucw.cz>
+To: Greg KH <greg@kroah.com>
+CC: <mtd@centrum.cz>
+Subject: USB: Cleanups for usb gadget mass-storage
+Message-ID: <Pine.LNX.4.44L0.0511270946350.6263-100000@netrider.rowland.org>
+
+Remove useless initalizers.
+
+Signed-off-by: Pavel Machek <pavel@suse.cz>
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+
+
+---
+ drivers/usb/gadget/file_storage.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- gregkh-2.6.orig/drivers/usb/gadget/file_storage.c
++++ gregkh-2.6/drivers/usb/gadget/file_storage.c
+@@ -336,8 +336,8 @@ MODULE_LICENSE("Dual BSD/GPL");
+ #define MAX_LUNS 8
+
+ /* Arggh! There should be a module_param_array_named macro! */
+-static char *file[MAX_LUNS] = {NULL, };
+-static int ro[MAX_LUNS] = {0, };
++static char *file[MAX_LUNS];
++static int ro[MAX_LUNS];
+
+ static struct {
+ int num_filenames;
diff --git a/usb/usb-documentation-update.patch b/usb/usb-documentation-update.patch
new file mode 100644
index 00000000000000..30bc31de9e0185
--- /dev/null
+++ b/usb/usb-documentation-update.patch
@@ -0,0 +1,32 @@
+From stern@rowland.harvard.edu Mon Nov 28 12:26:20 2005
+Date: Mon, 28 Nov 2005 15:22:55 -0500 (EST)
+From: Alan Stern <stern@rowland.harvard.edu>
+To: Greg KH <greg@kroah.com>
+cc: David Brownell <david-b@pacbell.net>, Chris Humbert <mahadri-usb@drigon.com>
+Subject: USB: documentation update
+Message-ID: <Pine.LNX.4.44L0.0511281521290.4910-100000@iolanthe.rowland.org>
+
+This patch (as611) fixes a minor mistake and misspelling in the USB
+documentation.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ Documentation/usb/error-codes.txt | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- gregkh-2.6.orig/Documentation/usb/error-codes.txt
++++ gregkh-2.6/Documentation/usb/error-codes.txt
+@@ -46,8 +46,9 @@ USB-specific:
+
+ -EMSGSIZE (a) endpoint maxpacket size is zero; it is not usable
+ in the current interface altsetting.
+- (b) ISO packet is biger than endpoint maxpacket
+- (c) requested data transfer size is invalid (negative)
++ (b) ISO packet is larger than the endpoint maxpacket.
++ (c) requested data transfer length is invalid: negative
++ or too large for the host controller.
+
+ -ENOSPC This request would overcommit the usb bandwidth reserved
+ for periodic transfers (interrupt, isochronous).
diff --git a/usb/usb-fix-usb-suspend-resume-crasher.patch b/usb/usb-fix-usb-suspend-resume-crasher.patch
index 9964f7e486a72f..9d2e6101b99716 100644
--- a/usb/usb-fix-usb-suspend-resume-crasher.patch
+++ b/usb/usb-fix-usb-suspend-resume-crasher.patch
@@ -1,30 +1,24 @@
-From benh@kernel.crashing.org Tue Nov 22 22:47:24 2005
-Subject: USB: Fix USB suspend/resume crasher
+From benh@kernel.crashing.org Thu Nov 24 15:05:54 2005
+Subject: [PATCH] USB: Fix USB suspend/resume crasher (#2)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-To: David Brownell <david-b@pacbell.net>
-Cc: Paul Mackerras <paulus@samba.org>, Andrew Morton <akpm@osdl.org>, Greg KH <greg@kroah.com>, Alan Stern <stern@rowland.harvard.edu>
-Date: Wed, 23 Nov 2005 14:08:07 +1100
-Message-Id: <1132715288.26560.262.camel@gaston>
+To: Greg KH <greg@kroah.com>
+Cc: Alan Stern <stern@rowland.harvard.edu>, David Brownell <david-b@pacbell.net>, Andrew Morton <akpm@osdl.org>
+Date: Fri, 25 Nov 2005 09:59:46 +1100
+Message-Id: <1132873186.26560.487.camel@gaston>
-This is my latest patch against current linus -git, it closes the IRQ
-race and makes various other OHCI & EHCI code path safer vs.
-suspend/resume. I've been able to (finally !) successfully suspend and
-resume various Mac models, with or without USB mouse plugged, or
-plugging while asleep, or unplugging while asleep etc... all without a
-crash. There are still some races here or there in the USB code, but at
-least the main cause of crash is now fixes by this patch (access to a
-controller that has been suspended, due to either shared interrupts or
-other code path).
+This patch closes the IRQ race and makes various other OHCI & EHCI code
+path safer vs. suspend/resume.
+I've been able to (finally !) successfully suspend and resume various
+Mac models, with or without USB mouse plugged, or plugging while asleep,
+or unplugging while asleep etc... all without a crash.
-I haven't fixed UHCI as I don't have any HW to test, though I hope I
-haven't broken it neither. Alan, I would appreciate if you could have a
-look.
+Alan, please verify the UHCI bit I did, I only verified that it builds.
+It's very simple so I wouldn't expect any issue there. If you aren't
+confident, then just drop the hunks that change uhci-hcd.c
-This patch applies on top of the patch that moves the PowerMac specific
-code out of ohci-pci.c to hcd-pci.c where it belongs. This patch isn't
-upstream yet for reasons I don't fully understand (why does USB stuffs
-has such a high latency for going upstream ?), I'm sending it as a reply
-to this email for completeness.
+I also made the patch a little bit more "safer" by making sure the store
+to the interrupt register that disables interrupts is not posted before
+I set the flag and drop the spinlock.
Without this patch, you cannot reliably sleep/wakeup any recent Mac, and
I suspect PCs have some more sneaky issues too (they don't frankly crash
@@ -34,17 +28,19 @@ situations, but the USB code may still misbehave).
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/core/hcd-pci.c | 3 ++-
drivers/usb/core/hcd.c | 15 ++++++++++-----
drivers/usb/core/hcd.h | 7 ++++++-
- drivers/usb/host/ehci-pci.c | 24 +++++++++++++++++++++++-
+ drivers/usb/host/ehci-pci.c | 27 ++++++++++++++++++++++++++-
drivers/usb/host/ehci-q.c | 24 ++++++++++++++++--------
drivers/usb/host/ehci-sched.c | 18 ++++++++++++++++--
drivers/usb/host/ohci-hcd.c | 6 +++++-
drivers/usb/host/ohci-hub.c | 24 ++++++++++++++++++++----
- drivers/usb/host/ohci-pci.c | 26 ++++++++++++++++++++++++--
- 9 files changed, 122 insertions(+), 25 deletions(-)
+ drivers/usb/host/ohci-pci.c | 27 +++++++++++++++++++++++++--
+ drivers/usb/host/uhci-hcd.c | 6 ++++++
+ 10 files changed, 132 insertions(+), 25 deletions(-)
--- gregkh-2.6.orig/drivers/usb/core/hcd-pci.c
+++ gregkh-2.6/drivers/usb/core/hcd-pci.c
@@ -128,7 +124,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
unsigned rh_registered:1;/* is root hub registered? */
--- gregkh-2.6.orig/drivers/usb/host/ehci-pci.c
+++ gregkh-2.6/drivers/usb/host/ehci-pci.c
-@@ -228,14 +228,34 @@ static int ehci_pci_reset(struct usb_hcd
+@@ -228,14 +228,36 @@ static int ehci_pci_reset(struct usb_hcd
static int ehci_pci_suspend(struct usb_hcd *hcd, pm_message_t message)
{
struct ehci_hcd *ehci = hcd_to_ehci(hcd);
@@ -152,6 +148,8 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+ goto bail;
+ }
+ writel (0, &ehci->regs->intr_enable);
++ (void)readl(&ehci->regs->intr_enable);
++
+ clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
+ bail:
+ spin_unlock_irqrestore (&ehci->lock, flags);
@@ -164,15 +162,16 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
static int ehci_pci_resume(struct usb_hcd *hcd)
-@@ -255,6 +275,8 @@ static int ehci_pci_resume(struct usb_hc
- if (readl(&ehci->regs->configured_flag) != FLAG_CF)
- goto restart;
+@@ -251,6 +273,9 @@ static int ehci_pci_resume(struct usb_hc
+ if (time_before(jiffies, ehci->next_statechange))
+ msleep(100);
++ /* Mark hardware accessible again as we are out of D3 state by now */
+ set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
+
- /* If any port is suspended (or owned by the companion),
- * we know we can/must resume the HC (and mustn't reset it).
- * We just defer that to the root hub code.
+ /* If CF is clear, we lost PCI Vaux power and need to restart. */
+ if (readl(&ehci->regs->configured_flag) != FLAG_CF)
+ goto restart;
--- gregkh-2.6.orig/drivers/usb/host/ehci-q.c
+++ gregkh-2.6/drivers/usb/host/ehci-q.c
@@ -912,6 +912,7 @@ submit_async (
@@ -350,7 +349,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
switch (wValue) {
--- gregkh-2.6.orig/drivers/usb/host/ohci-pci.c
+++ gregkh-2.6/drivers/usb/host/ohci-pci.c
-@@ -105,13 +105,35 @@ ohci_pci_start (struct usb_hcd *hcd)
+@@ -105,13 +105,36 @@ ohci_pci_start (struct usb_hcd *hcd)
static int ohci_pci_suspend (struct usb_hcd *hcd, pm_message_t message)
{
@@ -374,6 +373,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+ goto bail;
+ }
+ ohci_writel(ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable);
++ (void)ohci_readl(ohci, &ohci->regs->intrdisable);
+ clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
+ bail:
+ spin_unlock_irqrestore (&ohci->lock, flags);
@@ -388,3 +388,25 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
usb_hcd_resume_root_hub(hcd);
return 0;
}
+--- gregkh-2.6.orig/drivers/usb/host/uhci-hcd.c
++++ gregkh-2.6/drivers/usb/host/uhci-hcd.c
+@@ -717,6 +717,7 @@ static int uhci_suspend(struct usb_hcd *
+ * at the source, so we must turn off PIRQ.
+ */
+ pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP, 0);
++ clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
+ uhci->hc_inaccessible = 1;
+ hcd->poll_rh = 0;
+
+@@ -733,6 +734,11 @@ static int uhci_resume(struct usb_hcd *h
+
+ dev_dbg(uhci_dev(uhci), "%s\n", __FUNCTION__);
+
++ /* We aren't in D3 state anymore, we do that even if dead as I
++ * really don't want to keep a stale HCD_FLAG_HW_ACCESSIBLE=0
++ */
++ set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
++
+ if (uhci->rh_state == UHCI_RH_RESET) /* Dead */
+ return 0;
+ spin_lock_irq(&uhci->lock);