aboutsummaryrefslogtreecommitdiffstats
path: root/usb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2006-06-06 15:59:55 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-06 15:59:55 -0700
commit24422233277d7b2b940fa93e7374d881063a6cff (patch)
tree7337f04b2c9d06213b72b1d1db7306793f1ceac6 /usb
parentadf31abd3de5ae59f5a064cf6c50ef342d2918a3 (diff)
downloadpatches-24422233277d7b2b940fa93e7374d881063a6cff.tar.gz
new usb patches added
Diffstat (limited to 'usb')
-rw-r--r--usb/uhci-improve-fsbr-off-timing.patch251
-rw-r--r--usb/uhci-remove-hc_inaccessible-flag.patch206
-rw-r--r--usb/uhci-various-updates.patch150
-rw-r--r--usb/usb-add-apple-macbook-product-ids-to-usbhid.patch30
-rw-r--r--usb/usb-ehci-on-non-au1200-build-fix.patch47
-rw-r--r--usb/usb-free-allocated-memory-on-io_edgeport-startup-memory-failure.patch42
-rw-r--r--usb/usb-sisusbvga-possible-cleanups.patch63
-rw-r--r--usb/usb-storage-unusual_devs-entry-for-nikon-dsc-d70s.patch54
8 files changed, 836 insertions, 7 deletions
diff --git a/usb/uhci-improve-fsbr-off-timing.patch b/usb/uhci-improve-fsbr-off-timing.patch
new file mode 100644
index 00000000000000..c878bf8379a132
--- /dev/null
+++ b/usb/uhci-improve-fsbr-off-timing.patch
@@ -0,0 +1,251 @@
+From stern@rowland.harvard.edu Mon Jun 5 09:29:00 2006
+Date: Mon, 5 Jun 2006 12:28:57 -0400 (EDT)
+From: Alan Stern <stern@rowland.harvard.edu>
+To: Greg KH <greg@kroah.com>
+Subject: UHCI: Improve FSBR-off timing
+Message-ID: <Pine.LNX.4.44L0.0606051221320.5765-100000@iolanthe.rowland.org>
+
+This patch (as707) improves the FSBR operation in uhci-hcd by turning it
+off more quickly when it isn't needed. FSBR puts a noticeable load on a
+computer's PCI bus, so it should be disabled as soon as possible when it
+isn't in use. The patch leaves it running for only 10 ms after the last
+URB stops using it, on the theory that this should be long enough for a
+driver to submit another URB if it wants keep FSBR going.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/uhci-hcd.c | 5 +--
+ drivers/usb/host/uhci-hcd.h | 8 +++-
+ drivers/usb/host/uhci-q.c | 71 +++++++++++++++++++++++++++++++-------------
+ 3 files changed, 59 insertions(+), 25 deletions(-)
+
+--- gregkh-2.6.orig/drivers/usb/host/uhci-hcd.c
++++ gregkh-2.6/drivers/usb/host/uhci-hcd.c
+@@ -497,9 +497,9 @@ static int uhci_start(struct usb_hcd *hc
+ hcd->uses_new_polling = 1;
+
+ spin_lock_init(&uhci->lock);
+-
++ setup_timer(&uhci->fsbr_timer, uhci_fsbr_timeout,
++ (unsigned long) uhci);
+ INIT_LIST_HEAD(&uhci->idle_qh_list);
+-
+ init_waitqueue_head(&uhci->waitqh);
+
+ if (DEBUG_CONFIGURED) {
+@@ -675,6 +675,7 @@ static void uhci_stop(struct usb_hcd *hc
+ uhci_scan_schedule(uhci, NULL);
+ spin_unlock_irq(&uhci->lock);
+
++ del_timer_sync(&uhci->fsbr_timer);
+ release_uhci(uhci);
+ }
+
+--- gregkh-2.6.orig/drivers/usb/host/uhci-hcd.h
++++ gregkh-2.6/drivers/usb/host/uhci-hcd.h
+@@ -86,7 +86,7 @@
+
+ /* When no queues need Full-Speed Bandwidth Reclamation,
+ * delay this long before turning FSBR off */
+-#define FSBR_OFF_DELAY msecs_to_jiffies(400)
++#define FSBR_OFF_DELAY msecs_to_jiffies(10)
+
+ /* If a queue hasn't advanced after this much time, assume it is stuck */
+ #define QH_WAIT_TIMEOUT msecs_to_jiffies(200)
+@@ -382,8 +382,6 @@ struct uhci_hcd {
+ __le32 *frame;
+ void **frame_cpu; /* CPU's frame list */
+
+- unsigned long fsbr_jiffies; /* Time when FSBR was last wanted */
+-
+ enum uhci_rh_state rh_state;
+ unsigned long auto_stop_time; /* When to AUTO_STOP */
+
+@@ -400,6 +398,10 @@ struct uhci_hcd {
+ need to be polled */
+ unsigned int is_initialized:1; /* Data structure is usable */
+ unsigned int fsbr_is_on:1; /* FSBR is turned on */
++ unsigned int fsbr_is_wanted:1; /* Does any URB want FSBR? */
++ unsigned int fsbr_expiring:1; /* FSBR is timing out */
++
++ struct timer_list fsbr_timer; /* For turning off FBSR */
+
+ /* Support for port suspend/resume/reset */
+ unsigned long port_c_suspend; /* Bit-arrays of ports */
+--- gregkh-2.6.orig/drivers/usb/host/uhci-q.c
++++ gregkh-2.6/drivers/usb/host/uhci-q.c
+@@ -64,16 +64,30 @@ static void uhci_add_fsbr(struct uhci_hc
+ urbp->fsbr = 1;
+ }
+
+-static void uhci_qh_wants_fsbr(struct uhci_hcd *uhci, struct uhci_qh *qh)
++static void uhci_urbp_wants_fsbr(struct uhci_hcd *uhci, struct urb_priv *urbp)
+ {
+- struct urb_priv *urbp =
+- list_entry(qh->queue.next, struct urb_priv, node);
+-
+ if (urbp->fsbr) {
+- uhci->fsbr_jiffies = jiffies;
++ uhci->fsbr_is_wanted = 1;
+ if (!uhci->fsbr_is_on)
+ uhci_fsbr_on(uhci);
++ else if (uhci->fsbr_expiring) {
++ uhci->fsbr_expiring = 0;
++ del_timer(&uhci->fsbr_timer);
++ }
++ }
++}
++
++static void uhci_fsbr_timeout(unsigned long _uhci)
++{
++ struct uhci_hcd *uhci = (struct uhci_hcd *) _uhci;
++ unsigned long flags;
++
++ spin_lock_irqsave(&uhci->lock, flags);
++ if (uhci->fsbr_expiring) {
++ uhci->fsbr_expiring = 0;
++ uhci_fsbr_off(uhci);
+ }
++ spin_unlock_irqrestore(&uhci->lock, flags);
+ }
+
+
+@@ -287,7 +301,7 @@ static int uhci_cleanup_queue(struct uhc
+ if (qh->type == USB_ENDPOINT_XFER_ISOC) {
+ ret = (uhci->frame_number + uhci->is_stopped !=
+ qh->unlink_frame);
+- return ret;
++ goto done;
+ }
+
+ /* If the URB isn't first on its queue, adjust the link pointer
+@@ -304,24 +318,26 @@ static int uhci_cleanup_queue(struct uhc
+ td = list_entry(urbp->td_list.prev, struct uhci_td,
+ list);
+ ptd->link = td->link;
+- return ret;
++ goto done;
+ }
+
+ /* If the QH element pointer is UHCI_PTR_TERM then then currently
+ * executing URB has already been unlinked, so this one isn't it. */
+ if (qh_element(qh) == UHCI_PTR_TERM)
+- return ret;
++ goto done;
+ qh->element = UHCI_PTR_TERM;
+
+ /* Control pipes have to worry about toggles */
+ if (qh->type == USB_ENDPOINT_XFER_CONTROL)
+- return ret;
++ goto done;
+
+ /* Save the next toggle value */
+ WARN_ON(list_empty(&urbp->td_list));
+ td = list_entry(urbp->td_list.next, struct uhci_td, list);
+ qh->needs_fixup = 1;
+ qh->initial_toggle = uhci_toggle(td_token(td));
++
++done:
+ return ret;
+ }
+
+@@ -1175,7 +1191,7 @@ static int uhci_urb_enqueue(struct usb_h
+ * queue isn't stopped. */
+ if (qh->queue.next == &urbp->node && !qh->is_stopped) {
+ uhci_activate_qh(uhci, qh);
+- uhci_qh_wants_fsbr(uhci, qh);
++ uhci_urbp_wants_fsbr(uhci, urbp);
+ }
+ goto done;
+
+@@ -1404,7 +1420,7 @@ static int uhci_advance_check(struct uhc
+ unsigned status;
+
+ if (qh->type == USB_ENDPOINT_XFER_ISOC)
+- return ret;
++ goto done;
+
+ /* Treat an UNLINKING queue as though it hasn't advanced.
+ * This is okay because reactivation will treat it as though
+@@ -1427,21 +1443,24 @@ static int uhci_advance_check(struct uhc
+ /* We're okay, the queue has advanced */
+ qh->wait_expired = 0;
+ qh->advance_jiffies = jiffies;
+- return ret;
++ goto done;
+ }
+ ret = 0;
+ }
+
+ /* The queue hasn't advanced; check for timeout */
+- if (!qh->wait_expired && time_after(jiffies,
+- qh->advance_jiffies + QH_WAIT_TIMEOUT)) {
++ if (qh->wait_expired)
++ goto done;
++
++ if (time_after(jiffies, qh->advance_jiffies + QH_WAIT_TIMEOUT)) {
+
+ /* Detect the Intel bug and work around it */
+ if (qh->post_td && qh_element(qh) ==
+ cpu_to_le32(qh->post_td->dma_handle)) {
+ qh->element = qh->post_td->link;
+ qh->advance_jiffies = jiffies;
+- return 1;
++ ret = 1;
++ goto done;
+ }
+
+ qh->wait_expired = 1;
+@@ -1452,7 +1471,14 @@ static int uhci_advance_check(struct uhc
+ * starts moving again. */
+ if (urbp && urbp->fsbr && !(status & TD_CTRL_IOC))
+ uhci_unlink_qh(uhci, qh);
++
++ } else {
++ /* Unmoving but not-yet-expired queues keep FSBR alive */
++ if (urbp)
++ uhci_urbp_wants_fsbr(uhci, urbp);
+ }
++
++done:
+ return ret;
+ }
+
+@@ -1472,6 +1498,7 @@ static void uhci_scan_schedule(struct uh
+ uhci->scan_in_progress = 1;
+ rescan:
+ uhci->need_rescan = 0;
++ uhci->fsbr_is_wanted = 0;
+
+ uhci_clear_next_interrupt(uhci);
+ uhci_get_current_frame_number(uhci);
+@@ -1487,8 +1514,10 @@ rescan:
+
+ if (uhci_advance_check(uhci, qh)) {
+ uhci_scan_qh(uhci, qh, regs);
+- if (qh->state == QH_STATE_ACTIVE)
+- uhci_qh_wants_fsbr(uhci, qh);
++ if (qh->state == QH_STATE_ACTIVE) {
++ uhci_urbp_wants_fsbr(uhci,
++ list_entry(qh->queue.next, struct urb_priv, node));
++ }
+ }
+ }
+ }
+@@ -1498,9 +1527,11 @@ rescan:
+ goto rescan;
+ uhci->scan_in_progress = 0;
+
+- if (uhci->fsbr_is_on && time_after(jiffies,
+- uhci->fsbr_jiffies + FSBR_OFF_DELAY))
+- uhci_fsbr_off(uhci);
++ if (uhci->fsbr_is_on && !uhci->fsbr_is_wanted &&
++ !uhci->fsbr_expiring) {
++ uhci->fsbr_expiring = 1;
++ mod_timer(&uhci->fsbr_timer, jiffies + FSBR_OFF_DELAY);
++ }
+
+ if (list_empty(&uhci->skel_unlink_qh->node))
+ uhci_clear_next_interrupt(uhci);
diff --git a/usb/uhci-remove-hc_inaccessible-flag.patch b/usb/uhci-remove-hc_inaccessible-flag.patch
new file mode 100644
index 00000000000000..4eda1290749045
--- /dev/null
+++ b/usb/uhci-remove-hc_inaccessible-flag.patch
@@ -0,0 +1,206 @@
+From stern@rowland.harvard.edu Mon Jun 5 09:21:33 2006
+Date: Mon, 5 Jun 2006 12:21:30 -0400 (EDT)
+From: Alan Stern <stern@rowland.harvard.edu>
+To: Greg KH <greg@kroah.com>
+Subject: UHCI: remove hc_inaccessible flag
+Message-ID: <Pine.LNX.4.44L0.0606051216400.5765-100000@iolanthe.rowland.org>
+
+This patch (as706) removes the private hc_inaccessible flag from
+uhci-hcd. It's not needed because it conveys exactly the same
+information as the generic HCD_FLAG_HW_ACCESSIBLE bit.
+
+In its place goes a new flag recording whether the controller is dead.
+The new code allows a complete device reset to resurrect a dead
+controller (although usbcore doesn't yet implement such a facility).
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/uhci-hcd.c | 49 +++++++++++++++++++++++---------------------
+ drivers/usb/host/uhci-hcd.h | 2 -
+ drivers/usb/host/uhci-hub.c | 4 +--
+ 3 files changed, 29 insertions(+), 26 deletions(-)
+
+--- gregkh-2.6.orig/drivers/usb/host/uhci-hcd.c
++++ gregkh-2.6/drivers/usb/host/uhci-hcd.c
+@@ -110,17 +110,23 @@ static void finish_reset(struct uhci_hcd
+ uhci->is_stopped = UHCI_IS_STOPPED;
+ uhci_to_hcd(uhci)->state = HC_STATE_HALT;
+ uhci_to_hcd(uhci)->poll_rh = 0;
++
++ uhci->dead = 0; /* Full reset resurrects the controller */
+ }
+
+ /*
+ * Last rites for a defunct/nonfunctional controller
+ * or one we don't want to use any more.
+ */
+-static void hc_died(struct uhci_hcd *uhci)
++static void uhci_hc_died(struct uhci_hcd *uhci)
+ {
++ uhci_get_current_frame_number(uhci);
+ uhci_reset_hc(to_pci_dev(uhci_dev(uhci)), uhci->io_addr);
+ finish_reset(uhci);
+- uhci->hc_inaccessible = 1;
++ uhci->dead = 1;
++
++ /* The current frame may already be partway finished */
++ ++uhci->frame_number;
+ }
+
+ /*
+@@ -234,7 +240,7 @@ __acquires(uhci->lock)
+ spin_unlock_irq(&uhci->lock);
+ msleep(1);
+ spin_lock_irq(&uhci->lock);
+- if (uhci->hc_inaccessible) /* Died */
++ if (uhci->dead)
+ return;
+ }
+ if (!(inw(uhci->io_addr + USBSTS) & USBSTS_HCH))
+@@ -287,7 +293,7 @@ __acquires(uhci->lock)
+ spin_unlock_irq(&uhci->lock);
+ msleep(20);
+ spin_lock_irq(&uhci->lock);
+- if (uhci->hc_inaccessible) /* Died */
++ if (uhci->dead)
+ return;
+
+ /* End Global Resume and wait for EOP to be sent */
+@@ -339,7 +345,7 @@ static irqreturn_t uhci_irq(struct usb_h
+ errbuf, ERRBUF_LEN);
+ lprintk(errbuf);
+ }
+- hc_died(uhci);
++ uhci_hc_died(uhci);
+
+ /* Force a callback in case there are
+ * pending unlinks */
+@@ -462,7 +468,7 @@ static void uhci_shutdown(struct pci_dev
+ {
+ struct usb_hcd *hcd = (struct usb_hcd *) pci_get_drvdata(pdev);
+
+- hc_died(hcd_to_uhci(hcd));
++ uhci_hc_died(hcd_to_uhci(hcd));
+ }
+
+ /*
+@@ -664,8 +670,8 @@ static void uhci_stop(struct usb_hcd *hc
+ struct uhci_hcd *uhci = hcd_to_uhci(hcd);
+
+ spin_lock_irq(&uhci->lock);
+- if (!uhci->hc_inaccessible)
+- hc_died(uhci);
++ if (test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags) && !uhci->dead)
++ uhci_hc_died(uhci);
+ uhci_scan_schedule(uhci, NULL);
+ spin_unlock_irq(&uhci->lock);
+
+@@ -681,7 +687,7 @@ static int uhci_rh_suspend(struct usb_hc
+ spin_lock_irq(&uhci->lock);
+ if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags))
+ rc = -ESHUTDOWN;
+- else if (!uhci->hc_inaccessible)
++ else if (!uhci->dead)
+ suspend_rh(uhci, UHCI_RH_SUSPENDED);
+ spin_unlock_irq(&uhci->lock);
+ return rc;
+@@ -696,7 +702,7 @@ static int uhci_rh_resume(struct usb_hcd
+ if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) {
+ dev_warn(&hcd->self.root_hub->dev, "HC isn't running!\n");
+ rc = -ESHUTDOWN;
+- } else if (!uhci->hc_inaccessible)
++ } else if (!uhci->dead)
+ wakeup_rh(uhci);
+ spin_unlock_irq(&uhci->lock);
+ return rc;
+@@ -710,8 +716,8 @@ static int uhci_suspend(struct usb_hcd *
+ dev_dbg(uhci_dev(uhci), "%s\n", __FUNCTION__);
+
+ spin_lock_irq(&uhci->lock);
+- if (uhci->hc_inaccessible) /* Dead or already suspended */
+- goto done;
++ if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags) || uhci->dead)
++ goto done_okay; /* Already suspended or dead */
+
+ if (uhci->rh_state > UHCI_RH_SUSPENDED) {
+ dev_warn(uhci_dev(uhci), "Root hub isn't suspended!\n");
+@@ -724,12 +730,12 @@ static int uhci_suspend(struct usb_hcd *
+ */
+ pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP, 0);
+ mb();
+- clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
+- uhci->hc_inaccessible = 1;
+ hcd->poll_rh = 0;
+
+ /* FIXME: Enable non-PME# remote wakeup? */
+
++done_okay:
++ clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
+ done:
+ spin_unlock_irq(&uhci->lock);
+ return rc;
+@@ -742,25 +748,22 @@ static int uhci_resume(struct usb_hcd *h
+ dev_dbg(uhci_dev(uhci), "%s\n", __FUNCTION__);
+
+ /* Since we aren't in D3 any more, it's safe to set this flag
+- * even if the controller was dead. It might not even be dead
+- * any more, if the firmware or quirks code has reset it.
++ * even if the controller was dead.
+ */
+ set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
+ mb();
+
+- if (uhci->rh_state == UHCI_RH_RESET) /* Dead */
+- return 0;
+-
+ spin_lock_irq(&uhci->lock);
+
+ /* FIXME: Disable non-PME# remote wakeup? */
+
+- uhci->hc_inaccessible = 0;
+-
+- /* The BIOS may have changed the controller settings during a
+- * system wakeup. Check it and reconfigure to avoid problems.
++ /* The firmware or a boot kernel may have changed the controller
++ * settings during a system wakeup. Check it and reconfigure
++ * to avoid problems.
+ */
+ check_and_reset_hc(uhci);
++
++ /* If the controller was dead before, it's back alive now */
+ configure_hc(uhci);
+
+ if (uhci->rh_state == UHCI_RH_RESET) {
+--- gregkh-2.6.orig/drivers/usb/host/uhci-hcd.h
++++ gregkh-2.6/drivers/usb/host/uhci-hcd.h
+@@ -395,7 +395,7 @@ struct uhci_hcd {
+
+ unsigned int scan_in_progress:1; /* Schedule scan is running */
+ unsigned int need_rescan:1; /* Redo the schedule scan */
+- unsigned int hc_inaccessible:1; /* HC is suspended or dead */
++ unsigned int dead:1; /* Controller has died */
+ unsigned int working_RD:1; /* Suspended root hub doesn't
+ need to be polled */
+ unsigned int is_initialized:1; /* Data structure is usable */
+--- gregkh-2.6.orig/drivers/usb/host/uhci-hub.c
++++ gregkh-2.6/drivers/usb/host/uhci-hub.c
+@@ -171,7 +171,7 @@ static int uhci_hub_status_data(struct u
+ spin_lock_irqsave(&uhci->lock, flags);
+
+ uhci_scan_schedule(uhci, NULL);
+- if (uhci->hc_inaccessible)
++ if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags) || uhci->dead)
+ goto done;
+ uhci_check_ports(uhci);
+
+@@ -227,7 +227,7 @@ static int uhci_hub_control(struct usb_h
+ u16 wPortChange, wPortStatus;
+ unsigned long flags;
+
+- if (uhci->hc_inaccessible)
++ if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags) || uhci->dead)
+ return -ETIMEDOUT;
+
+ spin_lock_irqsave(&uhci->lock, flags);
diff --git a/usb/uhci-various-updates.patch b/usb/uhci-various-updates.patch
new file mode 100644
index 00000000000000..d355c0423979b7
--- /dev/null
+++ b/usb/uhci-various-updates.patch
@@ -0,0 +1,150 @@
+From stern@rowland.harvard.edu Mon Jun 5 09:16:47 2006
+Date: Mon, 5 Jun 2006 12:16:39 -0400 (EDT)
+From: Alan Stern <stern@rowland.harvard.edu>
+To: Greg KH <greg@kroah.com>
+cc: USB development list <linux-usb-devel@lists.sourceforge.net>
+Subject: UHCI: various updates
+Message-ID: <Pine.LNX.4.44L0.0606051209410.5765-100000@iolanthe.rowland.org>
+
+From: David Brownell <david-b@pacbell.net>
+
+This patch (as705) contains a small set of updates for uhci-hcd written
+mostly by Dave Brownell:
+
+ * Root hub suspend messages come out labeled as root hub messages;
+ PCI messages should only come out when the pci device suspends.
+
+ * Rename the reset() method to better match its init() role
+
+ * Behave more like the other HCDs by returning -ESHUTDOWN for root-hub
+ suspend/resume errors.
+
+ * When an URB fails, associate the message with the usb device not
+ the host controller (it still hides endpoint and direction)
+
+From: David Brownell <david-b@pacbell.net>
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/uhci-hcd.c | 37 +++++++++++++++++++++----------------
+ drivers/usb/host/uhci-q.c | 2 +-
+ 2 files changed, 22 insertions(+), 17 deletions(-)
+
+--- gregkh-2.6.orig/drivers/usb/host/uhci-hcd.c
++++ gregkh-2.6/drivers/usb/host/uhci-hcd.c
+@@ -124,8 +124,9 @@ static void hc_died(struct uhci_hcd *uhc
+ }
+
+ /*
+- * Initialize a controller that was newly discovered or has just been
+- * resumed. In either case we can't be sure of its previous state.
++ * Initialize a controller that was newly discovered or has lost power
++ * or otherwise been reset while it was suspended. In none of these cases
++ * can we be sure of its previous state.
+ */
+ static void check_and_reset_hc(struct uhci_hcd *uhci)
+ {
+@@ -198,7 +199,8 @@ __acquires(uhci->lock)
+ int int_enable;
+
+ auto_stop = (new_state == UHCI_RH_AUTO_STOPPED);
+- dev_dbg(uhci_dev(uhci), "%s%s\n", __FUNCTION__,
++ dev_dbg(&uhci_to_hcd(uhci)->self.root_hub->dev,
++ "%s%s\n", __FUNCTION__,
+ (auto_stop ? " (auto-stop)" : ""));
+
+ /* If we get a suspend request when we're already auto-stopped
+@@ -236,7 +238,8 @@ __acquires(uhci->lock)
+ return;
+ }
+ if (!(inw(uhci->io_addr + USBSTS) & USBSTS_HCH))
+- dev_warn(uhci_dev(uhci), "Controller not stopped yet!\n");
++ dev_warn(&uhci_to_hcd(uhci)->self.root_hub->dev,
++ "Controller not stopped yet!\n");
+
+ uhci_get_current_frame_number(uhci);
+
+@@ -268,7 +271,8 @@ static void wakeup_rh(struct uhci_hcd *u
+ __releases(uhci->lock)
+ __acquires(uhci->lock)
+ {
+- dev_dbg(uhci_dev(uhci), "%s%s\n", __FUNCTION__,
++ dev_dbg(&uhci_to_hcd(uhci)->self.root_hub->dev,
++ "%s%s\n", __FUNCTION__,
+ uhci->rh_state == UHCI_RH_AUTO_STOPPED ?
+ " (auto-start)" : "");
+
+@@ -406,7 +410,7 @@ static void release_uhci(struct uhci_hcd
+ uhci->frame, uhci->frame_dma_handle);
+ }
+
+-static int uhci_reset(struct usb_hcd *hcd)
++static int uhci_init(struct usb_hcd *hcd)
+ {
+ struct uhci_hcd *uhci = hcd_to_uhci(hcd);
+ unsigned io_size = (unsigned) hcd->rsrc_len;
+@@ -672,12 +676,15 @@ static void uhci_stop(struct usb_hcd *hc
+ static int uhci_rh_suspend(struct usb_hcd *hcd)
+ {
+ struct uhci_hcd *uhci = hcd_to_uhci(hcd);
++ int rc = 0;
+
+ spin_lock_irq(&uhci->lock);
+- if (!uhci->hc_inaccessible) /* Not dead */
++ if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags))
++ rc = -ESHUTDOWN;
++ else if (!uhci->hc_inaccessible)
+ suspend_rh(uhci, UHCI_RH_SUSPENDED);
+ spin_unlock_irq(&uhci->lock);
+- return 0;
++ return rc;
+ }
+
+ static int uhci_rh_resume(struct usb_hcd *hcd)
+@@ -686,13 +693,10 @@ static int uhci_rh_resume(struct usb_hcd
+ int rc = 0;
+
+ spin_lock_irq(&uhci->lock);
+- if (uhci->hc_inaccessible) {
+- if (uhci->rh_state == UHCI_RH_SUSPENDED) {
+- dev_warn(uhci_dev(uhci), "HC isn't running!\n");
+- rc = -ENODEV;
+- }
+- /* Otherwise the HC is dead */
+- } else
++ if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) {
++ dev_warn(&hcd->self.root_hub->dev, "HC isn't running!\n");
++ rc = -ESHUTDOWN;
++ } else if (!uhci->hc_inaccessible)
+ wakeup_rh(uhci);
+ spin_unlock_irq(&uhci->lock);
+ return rc;
+@@ -746,6 +750,7 @@ static int uhci_resume(struct usb_hcd *h
+
+ if (uhci->rh_state == UHCI_RH_RESET) /* Dead */
+ return 0;
++
+ spin_lock_irq(&uhci->lock);
+
+ /* FIXME: Disable non-PME# remote wakeup? */
+@@ -828,7 +833,7 @@ static const struct hc_driver uhci_drive
+ .flags = HCD_USB11,
+
+ /* Basic lifecycle operations */
+- .reset = uhci_reset,
++ .reset = uhci_init,
+ .start = uhci_start,
+ #ifdef CONFIG_PM
+ .suspend = uhci_suspend,
+--- gregkh-2.6.orig/drivers/usb/host/uhci-q.c
++++ gregkh-2.6/drivers/usb/host/uhci-q.c
+@@ -910,7 +910,7 @@ static int uhci_result_common(struct uhc
+ uhci_packetout(td_token(td)));
+ if ((debug == 1 && ret != -EPIPE) || debug > 1) {
+ /* Some debugging code */
+- dev_dbg(uhci_dev(uhci),
++ dev_dbg(&urb->dev->dev,
+ "%s: failed with status %x\n",
+ __FUNCTION__, status);
+
diff --git a/usb/usb-add-apple-macbook-product-ids-to-usbhid.patch b/usb/usb-add-apple-macbook-product-ids-to-usbhid.patch
new file mode 100644
index 00000000000000..c27c8c082f194e
--- /dev/null
+++ b/usb/usb-add-apple-macbook-product-ids-to-usbhid.patch
@@ -0,0 +1,30 @@
+From linux-kernel-owner+greg=40kroah.com-S932113AbWFDJkG@vger.kernel.org Sun Jun 4 02:41:16 2006
+From: Rene Rebe <rene@exactcode.de>
+Subject: USB: Add Apple MacBook product IDs to usbhid
+Date: Sun, 4 Jun 2006 11:39:09 +0200
+Cc: Andrew Morton <akpm@osdl.org>
+Content-Disposition: inline
+Message-Id: <200606041139.09533.rene@exactcode.de>
+
+This adds the Apple MacBook product IDs for the Fn translation
+to the usbhid.
+
+Signed-off-by: Rene Rebe <rene@exactcode.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/input/hid-core.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- gregkh-2.6.orig/drivers/usb/input/hid-core.c
++++ gregkh-2.6/drivers/usb/input/hid-core.c
+@@ -1693,6 +1693,9 @@ static const struct hid_blacklist {
+ { USB_VENDOR_ID_APPLE, 0x0214, HID_QUIRK_POWERBOOK_HAS_FN },
+ { USB_VENDOR_ID_APPLE, 0x0215, HID_QUIRK_POWERBOOK_HAS_FN },
+ { USB_VENDOR_ID_APPLE, 0x0216, HID_QUIRK_POWERBOOK_HAS_FN },
++ { USB_VENDOR_ID_APPLE, 0x0217, HID_QUIRK_POWERBOOK_HAS_FN },
++ { USB_VENDOR_ID_APPLE, 0x0218, HID_QUIRK_POWERBOOK_HAS_FN },
++ { USB_VENDOR_ID_APPLE, 0x0219, HID_QUIRK_POWERBOOK_HAS_FN },
+ { USB_VENDOR_ID_APPLE, 0x030A, HID_QUIRK_POWERBOOK_HAS_FN },
+ { USB_VENDOR_ID_APPLE, 0x030B, HID_QUIRK_POWERBOOK_HAS_FN },
+
diff --git a/usb/usb-ehci-on-non-au1200-build-fix.patch b/usb/usb-ehci-on-non-au1200-build-fix.patch
new file mode 100644
index 00000000000000..eb3c141a22d02b
--- /dev/null
+++ b/usb/usb-ehci-on-non-au1200-build-fix.patch
@@ -0,0 +1,47 @@
+From ralf@linux-mips.org Sat Jun 3 15:59:05 2006
+Date: Sat, 3 Jun 2006 23:58:55 +0100
+From: Ralf Baechle <ralf@linux-mips.org>
+To: gregkh@suse.de, dbrownell@users.sourceforge.net,
+Subject: USB: EHCI on non-Au1200 build fix
+Message-ID: <20060603225855.GA2234@linux-mips.org>
+Content-Disposition: inline
+
+From: Ralf Baechle <ralf@linux-mips.org>
+
+Including ehci-au1xxx.c on a non-Au1200 Alchemy only to have it throw
+an error is stupid.
+
+From: Ralf Baechle <ralf@linux-mips.org>
+Acked-by: David Brownell <david-b@pacbell.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ drivers/usb/host/ehci-au1xxx.c | 4 ----
+ drivers/usb/host/ehci-hcd.c | 2 +-
+ 2 files changed, 1 insertion(+), 5 deletions(-)
+
+--- gregkh-2.6.orig/drivers/usb/host/ehci-au1xxx.c
++++ gregkh-2.6/drivers/usb/host/ehci-au1xxx.c
+@@ -16,10 +16,6 @@
+ #include <linux/platform_device.h>
+ #include <asm/mach-au1x00/au1000.h>
+
+-#ifndef CONFIG_SOC_AU1200
+-#error "this Alchemy chip doesn't have EHCI"
+-#else /* Au1200 */
+-
+ #define USB_HOST_CONFIG (USB_MSR_BASE + USB_MSR_MCFG)
+ #define USB_MCFG_PFEN (1<<31)
+ #define USB_MCFG_RDCOMB (1<<30)
+--- gregkh-2.6.orig/drivers/usb/host/ehci-hcd.c
++++ gregkh-2.6/drivers/usb/host/ehci-hcd.c
+@@ -897,7 +897,7 @@ MODULE_LICENSE ("GPL");
+ #define PLATFORM_DRIVER ehci_fsl_driver
+ #endif
+
+-#ifdef CONFIG_SOC_AU1X00
++#ifdef CONFIG_SOC_AU1200
+ #include "ehci-au1xxx.c"
+ #define PLATFORM_DRIVER ehci_hcd_au1xxx_driver
+ #endif
diff --git a/usb/usb-free-allocated-memory-on-io_edgeport-startup-memory-failure.patch b/usb/usb-free-allocated-memory-on-io_edgeport-startup-memory-failure.patch
new file mode 100644
index 00000000000000..059d9eb7a56d2b
--- /dev/null
+++ b/usb/usb-free-allocated-memory-on-io_edgeport-startup-memory-failure.patch
@@ -0,0 +1,42 @@
+From docmax@gmail.com Sat Jun 3 14:05:00 2006
+Message-ID: <68669c1d0606031358l368b4d6dk436149f5fb1349b6@mail.gmail.com>
+Date: Sat, 3 Jun 2006 13:58:19 -0700
+From: "Chris Lund" <docmax@gmail.com>
+To: greg@kroah.com
+Subject: USB: free allocated memory on io_edgeport startup memory failure
+Content-Disposition: inline
+
+While an Edgeport is allocating individual port structures, if kmalloc
+returns NULL, the serial structure is freed and -ENOMEM, but the ports
+allocated before the failure are not freed. This patch addresses that
+condition.
+
+Signed-off-by: Christopher Lund <docmax@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/io_edgeport.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- gregkh-2.6.orig/drivers/usb/serial/io_edgeport.c
++++ gregkh-2.6/drivers/usb/serial/io_edgeport.c
+@@ -2730,7 +2730,7 @@ static int edge_startup (struct usb_seri
+ struct edgeport_serial *edge_serial;
+ struct edgeport_port *edge_port;
+ struct usb_device *dev;
+- int i;
++ int i, j;
+
+ dev = serial->dev;
+
+@@ -2794,6 +2794,10 @@ static int edge_startup (struct usb_seri
+ edge_port = kmalloc (sizeof(struct edgeport_port), GFP_KERNEL);
+ if (edge_port == NULL) {
+ dev_err(&serial->dev->dev, "%s - Out of memory\n", __FUNCTION__);
++ for (j = 0; j < i; ++j) {
++ kfree (usb_get_serial_port_data(serial->port[j]));
++ usb_set_serial_port_data(serial->port[j], NULL);
++ }
+ usb_set_serial_data(serial, NULL);
+ kfree(edge_serial);
+ return -ENOMEM;
diff --git a/usb/usb-sisusbvga-possible-cleanups.patch b/usb/usb-sisusbvga-possible-cleanups.patch
index 7e462a98a40085..7b0e301fe1b2ef 100644
--- a/usb/usb-sisusbvga-possible-cleanups.patch
+++ b/usb/usb-sisusbvga-possible-cleanups.patch
@@ -22,12 +22,12 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
---
- drivers/usb/misc/sisusbvga/sisusb.c | 35 ++++-------------------------
- drivers/usb/misc/sisusbvga/sisusb_con.c | 24 +------------------
- drivers/usb/misc/sisusbvga/sisusb_init.c | 4 ++-
- drivers/usb/misc/sisusbvga/sisusb_init.h | 20 ++++++++++++++--
+ drivers/usb/misc/sisusbvga/sisusb.c | 50 ++---------------------------
+ drivers/usb/misc/sisusbvga/sisusb_con.c | 24 +------------
+ drivers/usb/misc/sisusbvga/sisusb_init.c | 4 +-
+ drivers/usb/misc/sisusbvga/sisusb_init.h | 20 +++++++++--
drivers/usb/misc/sisusbvga/sisusb_struct.h | 2 -
- 5 files changed, 28 insertions(+), 57 deletions(-)
+ 5 files changed, 28 insertions(+), 72 deletions(-)
--- gregkh-2.6.orig/drivers/usb/misc/sisusbvga/sisusb.c
+++ gregkh-2.6/drivers/usb/misc/sisusbvga/sisusb.c
@@ -76,7 +76,56 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
static int sisusb_first_vc = 0;
static int sisusb_last_vc = 0;
module_param_named(first, sisusb_first_vc, int, 0);
-@@ -1449,6 +1420,8 @@ sisusb_readb(struct sisusb_usb_data *sis
+@@ -1360,9 +1331,6 @@ sisusb_getreg(struct sisusb_usb_data *si
+ }
+ #endif
+
+-#ifndef INCL_SISUSB_CON
+-static
+-#endif
+ int
+ sisusb_setidxreg(struct sisusb_usb_data *sisusb, int port, u8 index, u8 data)
+ {
+@@ -1372,9 +1340,6 @@ sisusb_setidxreg(struct sisusb_usb_data
+ return ret;
+ }
+
+-#ifndef INCL_SISUSB_CON
+-static
+-#endif
+ int
+ sisusb_getidxreg(struct sisusb_usb_data *sisusb, int port, u8 index, u8 *data)
+ {
+@@ -1384,9 +1349,6 @@ sisusb_getidxreg(struct sisusb_usb_data
+ return ret;
+ }
+
+-#ifndef INCL_SISUSB_CON
+-static
+-#endif
+ int
+ sisusb_setidxregandor(struct sisusb_usb_data *sisusb, int port, u8 idx,
+ u8 myand, u8 myor)
+@@ -1416,18 +1378,12 @@ sisusb_setidxregmask(struct sisusb_usb_d
+ return ret;
+ }
+
+-#ifndef INCL_SISUSB_CON
+-static
+-#endif
+ int
+ sisusb_setidxregor(struct sisusb_usb_data *sisusb, int port, u8 index, u8 myor)
+ {
+ return(sisusb_setidxregandor(sisusb, port, index, 0xff, myor));
+ }
+
+-#ifndef INCL_SISUSB_CON
+-static
+-#endif
+ int
+ sisusb_setidxregand(struct sisusb_usb_data *sisusb, int port, u8 idx, u8 myand)
+ {
+@@ -1449,6 +1405,8 @@ sisusb_readb(struct sisusb_usb_data *sis
return(sisusb_read_memio_byte(sisusb, SISUSB_TYPE_MEM, adr, data));
}
@@ -85,7 +134,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
int
sisusb_writew(struct sisusb_usb_data *sisusb, u32 adr, u16 data)
{
-@@ -1461,6 +1434,8 @@ sisusb_readw(struct sisusb_usb_data *sis
+@@ -1461,6 +1419,8 @@ sisusb_readw(struct sisusb_usb_data *sis
return(sisusb_read_memio_word(sisusb, SISUSB_TYPE_MEM, adr, data));
}
diff --git a/usb/usb-storage-unusual_devs-entry-for-nikon-dsc-d70s.patch b/usb/usb-storage-unusual_devs-entry-for-nikon-dsc-d70s.patch
new file mode 100644
index 00000000000000..db7dcdef8224d8
--- /dev/null
+++ b/usb/usb-storage-unusual_devs-entry-for-nikon-dsc-d70s.patch
@@ -0,0 +1,54 @@
+From stern@rowland.harvard.edu Tue Jun 6 12:19:30 2006
+Date: Tue, 6 Jun 2006 15:19:17 -0400 (EDT)
+From: Alan Stern <stern@rowland.harvard.edu>
+To: Greg KH <greg@kroah.com>, Phil Dibowitz <phil@ipom.com>
+Subject: usb-storage: unusual_devs entry for Nikon DSC D70s
+Message-ID: <Pine.LNX.4.44L0.0606061515250.8826-100000@iolanthe.rowland.org>
+
+This patch (as704) adds an unusual_devs entry for the Nikon DSC D70s,
+which uses a different Product ID from the D70. It also moves the entry
+for the DSC E2000 up in the list, to preserve the numerical ordering.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/storage/unusual_devs.h | 19 +++++++++++++------
+ 1 file changed, 13 insertions(+), 6 deletions(-)
+
+--- gregkh-2.6.orig/drivers/usb/storage/unusual_devs.h
++++ gregkh-2.6/drivers/usb/storage/unusual_devs.h
+@@ -216,6 +216,14 @@ UNUSUAL_DEV( 0x04a4, 0x0004, 0x0001, 0x
+ "DVD-CAM DZ-MV100A Camcorder",
+ US_SC_SCSI, US_PR_CB, NULL, US_FL_SINGLE_LUN),
+
++/* Patch for Nikon coolpix 2000
++ * Submitted by Fabien Cosse <fabien.cosse@wanadoo.fr>*/
++UNUSUAL_DEV( 0x04b0, 0x0301, 0x0010, 0x0010,
++ "NIKON",
++ "NIKON DSC E2000",
++ US_SC_DEVICE, US_PR_DEVICE,NULL,
++ US_FL_NOT_LOCKABLE ),
++
+ /* Reported by Andreas Bockhold <andreas@bockionline.de> */
+ UNUSUAL_DEV( 0x04b0, 0x0405, 0x0100, 0x0100,
+ "NIKON",
+@@ -223,13 +231,12 @@ UNUSUAL_DEV( 0x04b0, 0x0405, 0x0100, 0x
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_CAPACITY),
+
+-/* Patch for Nikon coolpix 2000
+- * Submitted by Fabien Cosse <fabien.cosse@wanadoo.fr>*/
+-UNUSUAL_DEV( 0x04b0, 0x0301, 0x0010, 0x0010,
++/* Reported by Jamie Kitson <jamie@staberinde.fsnet.co.uk> */
++UNUSUAL_DEV( 0x04b0, 0x040d, 0x0100, 0x0100,
+ "NIKON",
+- "NIKON DSC E2000",
+- US_SC_DEVICE, US_PR_DEVICE,NULL,
+- US_FL_NOT_LOCKABLE ),
++ "NIKON DSC D70s",
++ US_SC_DEVICE, US_PR_DEVICE, NULL,
++ US_FL_FIX_CAPACITY),
+
+ /* BENQ DC5330
+ * Reported by Manuel Fombuena <mfombuena@ya.com> and