aboutsummaryrefslogtreecommitdiffstats
path: root/usb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2005-11-15 17:18:05 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2005-11-15 17:18:05 -0800
commit376d5673273f68eb407e0041a285dc4174b59998 (patch)
treef8c792d2571750499b0eb0b7f5fe225720c19eb9 /usb
parent4f415b7205b018e1a5f67913d5a01cdbaf2a1ce2 (diff)
downloadpatches-376d5673273f68eb407e0041a285dc4174b59998.tar.gz
more USB patches added
Diffstat (limited to 'usb')
-rw-r--r--usb/usb-devio-warning-fix.patch29
-rw-r--r--usb/usb-maxtor-onetouch-button-support-for-older-drives.patch34
-rw-r--r--usb/usb-ohci-lh7a404-platform-device-conversion-fixup.patch28
-rw-r--r--usb/usbcore-central-handling-for-host-controllers-that-were-reset-during-suspend-resume.patch151
4 files changed, 242 insertions, 0 deletions
diff --git a/usb/usb-devio-warning-fix.patch b/usb/usb-devio-warning-fix.patch
new file mode 100644
index 0000000000000..a3afce81d0a89
--- /dev/null
+++ b/usb/usb-devio-warning-fix.patch
@@ -0,0 +1,29 @@
+From akpm@osdl.org Mon Nov 14 23:38:45 2005
+Message-Id: <200511150751.jAF7p9fP022460@shell0.pdx.osdl.net>
+To: akpm@osdl.org, greg@kroah.com, mm-commits@vger.kernel.org
+From: akpm@osdl.org
+Subject: usb devio warning fix
+Date: Mon, 14 Nov 2005 23:50:53 -0800
+
+From: Andrew Morton <akpm@osdl.org>
+
+drivers/usb/core/devio.c: In function `proc_ioctl_compat':
+drivers/usb/core/devio.c:1401: warning: passing arg 1 of `compat_ptr' makes integer from pointer without a cast
+
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+---
+ drivers/usb/core/devio.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- gregkh-2.6.orig/drivers/usb/core/devio.c
++++ gregkh-2.6/drivers/usb/core/devio.c
+@@ -1398,7 +1398,7 @@ static int proc_ioctl_compat(struct dev_
+ struct usbdevfs_ioctl ctrl;
+ u32 udata;
+
+- uioc = compat_ptr(arg);
++ uioc = compat_ptr((long)arg);
+ if (get_user(ctrl.ifno, &uioc->ifno) ||
+ get_user(ctrl.ioctl_code, &uioc->ioctl_code) ||
+ __get_user(udata, &uioc->data))
diff --git a/usb/usb-maxtor-onetouch-button-support-for-older-drives.patch b/usb/usb-maxtor-onetouch-button-support-for-older-drives.patch
new file mode 100644
index 0000000000000..6ded52722c9e5
--- /dev/null
+++ b/usb/usb-maxtor-onetouch-button-support-for-older-drives.patch
@@ -0,0 +1,34 @@
+From linux-usb-devel-admin@lists.sourceforge.net Mon Nov 14 05:37:11 2005
+From: Antti Andreimann <Antti.Andreimann@mail.ee>
+Message-Id: <1131943956.13282.62.camel@localhost.localdomain>
+Subject: USB: Maxtor OneTouch button support for older drives
+Date: Mon, 14 Nov 2005 06:52:36 +0200
+
+
+This small patch adds a device ID used by older Maxtor OneTouch drives
+(the ones with blue face-plate instead of the fancy silver one used in
+newer models). The button on those drives works well with the current
+driver.
+
+
+From: Antti Andreimann <Antti.Andreimann@mail.ee>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/storage/unusual_devs.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- gregkh-2.6.orig/drivers/usb/storage/unusual_devs.h
++++ gregkh-2.6/drivers/usb/storage/unusual_devs.h
+@@ -1003,6 +1003,11 @@ UNUSUAL_DEV( 0x0c0b, 0xa109, 0x0000, 0xf
+ *
+ */
+ #ifdef CONFIG_USB_STORAGE_ONETOUCH
++ UNUSUAL_DEV( 0x0d49, 0x7000, 0x0000, 0x9999,
++ "Maxtor",
++ "OneTouch External Harddrive",
++ US_SC_DEVICE, US_PR_DEVICE, onetouch_connect_input,
++ 0),
+ UNUSUAL_DEV( 0x0d49, 0x7010, 0x0000, 0x9999,
+ "Maxtor",
+ "OneTouch External Harddrive",
diff --git a/usb/usb-ohci-lh7a404-platform-device-conversion-fixup.patch b/usb/usb-ohci-lh7a404-platform-device-conversion-fixup.patch
new file mode 100644
index 0000000000000..c506b53ef7c73
--- /dev/null
+++ b/usb/usb-ohci-lh7a404-platform-device-conversion-fixup.patch
@@ -0,0 +1,28 @@
+From rpurdie@rpsys.net Mon Nov 14 10:09:23 2005
+From: Richard Purdie <rpurdie@rpsys.net>
+To: Greg KH <gregkh@suse.de>
+Date: Mon, 14 Nov 2005 17:46:56 +0000
+Subject: USB: OHCI lh7a404 platform device conversion fixup
+Message-Id: <1131990416.7590.6.camel@localhost.localdomain>
+
+Fix an error in the OHCI lh7a404 driver after the platform device
+conversion.
+
+Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/ohci-lh7a404.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- gregkh-2.6.orig/drivers/usb/host/ohci-lh7a404.c
++++ gregkh-2.6/drivers/usb/host/ohci-lh7a404.c
+@@ -219,7 +219,7 @@ static int ohci_hcd_lh7a404_drv_probe(st
+
+ static int ohci_hcd_lh7a404_drv_remove(struct platform_device *pdev)
+ {
+- struct usb_hcd *hcd = platform_get_drvdata(dev);
++ struct usb_hcd *hcd = platform_get_drvdata(pdev);
+
+ usb_hcd_lh7a404_remove(hcd, pdev);
+ return 0;
diff --git a/usb/usbcore-central-handling-for-host-controllers-that-were-reset-during-suspend-resume.patch b/usb/usbcore-central-handling-for-host-controllers-that-were-reset-during-suspend-resume.patch
new file mode 100644
index 0000000000000..dfbee74dc8c39
--- /dev/null
+++ b/usb/usbcore-central-handling-for-host-controllers-that-were-reset-during-suspend-resume.patch
@@ -0,0 +1,151 @@
+From stern@rowland.harvard.edu Mon Nov 14 08:32:36 2005
+Date: Mon, 14 Nov 2005 11:45:38 -0500 (EST)
+From: Alan Stern <stern@rowland.harvard.edu>
+To: Greg KH <greg@kroah.com>
+Subject: [PATCH] usbcore: central handling for host controllers that were reset during suspend/resume
+Message-ID: <Pine.LNX.4.44L0.0511141137380.13996-100000@iolanthe.rowland.org>
+
+This patch (as515b) adds a routine to usbcore to simplify handling of
+host controllers that lost power or were reset during suspend/resume.
+The new core routine marks all the child devices of the root hub as
+NOTATTACHED and tells khubd to disconnect the device structures as soon
+as possible.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/core/hcd.h | 1 +
+ drivers/usb/core/hub.c | 33 +++++++++++++++++++++++++++++++++
+ drivers/usb/host/ehci-pci.c | 9 +--------
+ drivers/usb/host/ohci-hcd.c | 7 +------
+ drivers/usb/host/sl811-hcd.c | 1 +
+ drivers/usb/host/uhci-hcd.c | 6 +++++-
+ 6 files changed, 42 insertions(+), 15 deletions(-)
+
+--- gregkh-2.6.orig/drivers/usb/core/hub.c
++++ gregkh-2.6/drivers/usb/core/hub.c
+@@ -1044,6 +1044,39 @@ void usb_set_device_state(struct usb_dev
+ EXPORT_SYMBOL(usb_set_device_state);
+
+
++#ifdef CONFIG_PM
++
++/**
++ * usb_root_hub_lost_power - called by HCD if the root hub lost Vbus power
++ * @rhdev: struct usb_device for the root hub
++ *
++ * The USB host controller driver calls this function when its root hub
++ * is resumed and Vbus power has been interrupted or the controller
++ * has been reset. The routine marks all the children of the root hub
++ * as NOTATTACHED and marks logical connect-change events on their ports.
++ */
++void usb_root_hub_lost_power(struct usb_device *rhdev)
++{
++ struct usb_hub *hub;
++ int port1;
++ unsigned long flags;
++
++ dev_warn(&rhdev->dev, "root hub lost power or was reset\n");
++ spin_lock_irqsave(&device_state_lock, flags);
++ hub = hdev_to_hub(rhdev);
++ for (port1 = 1; port1 <= rhdev->maxchild; ++port1) {
++ if (rhdev->children[port1 - 1]) {
++ recursively_mark_NOTATTACHED(
++ rhdev->children[port1 - 1]);
++ set_bit(port1, hub->change_bits);
++ }
++ }
++ spin_unlock_irqrestore(&device_state_lock, flags);
++}
++EXPORT_SYMBOL_GPL(usb_root_hub_lost_power);
++
++#endif
++
+ static void choose_address(struct usb_device *udev)
+ {
+ int devnum;
+--- gregkh-2.6.orig/drivers/usb/core/hcd.h
++++ gregkh-2.6/drivers/usb/core/hcd.h
+@@ -375,6 +375,7 @@ extern int usb_find_interface_driver (st
+ #ifdef CONFIG_PM
+ extern void usb_hcd_suspend_root_hub (struct usb_hcd *hcd);
+ extern void usb_hcd_resume_root_hub (struct usb_hcd *hcd);
++extern void usb_root_hub_lost_power (struct usb_device *rhdev);
+ extern int hcd_bus_suspend (struct usb_bus *bus);
+ extern int hcd_bus_resume (struct usb_bus *bus);
+ #else
+--- gregkh-2.6.orig/drivers/usb/host/ehci-pci.c
++++ gregkh-2.6/drivers/usb/host/ehci-pci.c
+@@ -251,7 +251,6 @@ static int ehci_pci_resume(struct usb_hc
+ {
+ struct ehci_hcd *ehci = hcd_to_ehci(hcd);
+ unsigned port;
+- struct usb_device *root = hcd->self.root_hub;
+ struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
+ int retval = -EINVAL;
+
+@@ -282,13 +281,7 @@ static int ehci_pci_resume(struct usb_hc
+
+ restart:
+ ehci_dbg(ehci, "lost power, restarting\n");
+- for (port = HCS_N_PORTS(ehci->hcs_params); port > 0; ) {
+- port--;
+- if (!root->children [port])
+- continue;
+- usb_set_device_state(root->children[port],
+- USB_STATE_NOTATTACHED);
+- }
++ usb_root_hub_lost_power(hcd->self.root_hub);
+
+ /* Else reset, to cope with power loss or flush-to-storage
+ * style "resume" having let BIOS kick in during reboot.
+--- gregkh-2.6.orig/drivers/usb/host/uhci-hcd.c
++++ gregkh-2.6/drivers/usb/host/uhci-hcd.c
+@@ -740,8 +740,12 @@ static int uhci_resume(struct usb_hcd *h
+ check_and_reset_hc(uhci);
+ configure_hc(uhci);
+
+- if (uhci->rh_state == UHCI_RH_RESET)
++ if (uhci->rh_state == UHCI_RH_RESET) {
++
++ /* The controller had to be reset */
++ usb_root_hub_lost_power(hcd->self.root_hub);
+ suspend_rh(uhci, UHCI_RH_SUSPENDED);
++ }
+
+ spin_unlock_irq(&uhci->lock);
+
+--- gregkh-2.6.orig/drivers/usb/host/ohci-hcd.c
++++ gregkh-2.6/drivers/usb/host/ohci-hcd.c
+@@ -791,7 +791,6 @@ static int ohci_restart (struct ohci_hcd
+ int temp;
+ int i;
+ struct urb_priv *priv;
+- struct usb_device *root = ohci_to_hcd(ohci)->self.root_hub;
+
+ /* mark any devices gone, so they do nothing till khubd disconnects.
+ * recycle any "live" eds/tds (and urbs) right away.
+@@ -800,11 +799,7 @@ static int ohci_restart (struct ohci_hcd
+ */
+ spin_lock_irq(&ohci->lock);
+ disable (ohci);
+- for (i = 0; i < root->maxchild; i++) {
+- if (root->children [i])
+- usb_set_device_state (root->children[i],
+- USB_STATE_NOTATTACHED);
+- }
++ usb_root_hub_lost_power(ohci_to_hcd(ohci)->self.root_hub);
+ if (!list_empty (&ohci->pending))
+ ohci_dbg(ohci, "abort schedule...\n");
+ list_for_each_entry (priv, &ohci->pending, pending) {
+--- gregkh-2.6.orig/drivers/usb/host/sl811-hcd.c
++++ gregkh-2.6/drivers/usb/host/sl811-hcd.c
+@@ -1803,6 +1803,7 @@ sl811h_resume(struct platform_device *de
+ || !device_can_wakeup(&hcd->self.root_hub->dev)) {
+ sl811->port1 = 0;
+ port_power(sl811, 1);
++ usb_root_hub_lost_power(hcd->self.root_hub);
+ return 0;
+ }
+