diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-05-09 01:03:50 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-05-09 01:03:50 -0700 |
commit | f628fa265a01b8223d60715906b86cffdc72d5f4 (patch) | |
tree | 8ea7977baace6309df9229cebf5ecfe06d8f28fe /usb | |
parent | bbba3abfba584a2439316e383b9ee3a4bad85e6d (diff) | |
download | patches-f628fa265a01b8223d60715906b86cffdc72d5f4.tar.gz |
add a bunch of usb patches
Diffstat (limited to 'usb')
8 files changed, 620 insertions, 0 deletions
diff --git a/usb/usb-add-an-ibm-usb-keyboard-to-the-hid_quirk_noget-blacklist.patch b/usb/usb-add-an-ibm-usb-keyboard-to-the-hid_quirk_noget-blacklist.patch new file mode 100644 index 0000000000000..0553e93bbc075 --- /dev/null +++ b/usb/usb-add-an-ibm-usb-keyboard-to-the-hid_quirk_noget-blacklist.patch @@ -0,0 +1,40 @@ +From olh@suse.de Fri May 5 02:07:22 2006 +Date: Fri, 5 May 2006 11:07:21 +0200 +From: Olaf Hering <olh@suse.de> +To: Greg Kroah-Hartman <gregkh@suse.de> +Subject: USB: add an IBM USB keyboard to the HID_QUIRK_NOGET blacklist +Message-ID: <20060505090721.GA4289@suse.de> +Content-Disposition: inline + + +After recent changes, the USB keyboard as shipped with IBM pSeries systems +does not work anymore, unless the keyboard is replugged after reboot. +Adding this model to the blacklist fixes it. + +Signed-off-by: Olaf Hering <olh@suse.de> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/input/hid-core.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- gregkh-2.6.orig/drivers/usb/input/hid-core.c ++++ gregkh-2.6/drivers/usb/input/hid-core.c +@@ -1557,6 +1557,9 @@ void hid_init_reports(struct hid_device + #define USB_VENDOR_ID_HP 0x03f0 + #define USB_DEVICE_ID_HP_USBHUB_KB 0x020c + ++#define USB_VENDOR_ID_IBM 0x04b3 ++#define USB_DEVICE_ID_IBM_USBHUB_KB 0x3005 ++ + #define USB_VENDOR_ID_CREATIVELABS 0x062a + #define USB_DEVICE_ID_CREATIVELABS_SILVERCREST 0x0201 + +@@ -1681,6 +1684,7 @@ static const struct hid_blacklist { + { USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_USBHUB_KB, HID_QUIRK_NOGET}, + { USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_CREATIVELABS_SILVERCREST, HID_QUIRK_NOGET }, + { USB_VENDOR_ID_HP, USB_DEVICE_ID_HP_USBHUB_KB, HID_QUIRK_NOGET }, ++ { USB_VENDOR_ID_IBM, USB_DEVICE_ID_IBM_USBHUB_KB, HID_QUIRK_NOGET }, + { USB_VENDOR_ID_TANGTOP, USB_DEVICE_ID_TANGTOP_USBPS2, HID_QUIRK_NOGET }, + { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_DUAL_USB_JOYPAD, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, + { USB_VENDOR_ID_SILVERCREST, USB_DEVICE_ID_SILVERCREST_KB, HID_QUIRK_NOGET }, diff --git a/usb/usb-add-sieraa-wireless-580-evdo-card-to-airprime.c.patch b/usb/usb-add-sieraa-wireless-580-evdo-card-to-airprime.c.patch new file mode 100644 index 0000000000000..b4b487356ec4b --- /dev/null +++ b/usb/usb-add-sieraa-wireless-580-evdo-card-to-airprime.c.patch @@ -0,0 +1,31 @@ +From ken@new.cgi101.com Tue May 9 00:41:08 2006 +From: Ken Brush <ken@new.cgi101.com> +Date: Mon, 8 May 2006 20:24:12 -0500 +To: greg@kroah.com +Cc: <dbudik@ist-traffic.com> +Subject: USB: Add Sieraa Wireless 580 evdo card to airprime.c +Message-ID: <20060509012412.GA9877@cgi101.com> +Content-Disposition: inline + +This adds the Sierra Wireless card to airprime.c. + +I tested this on my laptop. + + +Signed-off-by: Ken Brush <ken@cgi101.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/airprime.c | 1 + + 1 file changed, 1 insertion(+) + +--- gregkh-2.6.orig/drivers/usb/serial/airprime.c ++++ gregkh-2.6/drivers/usb/serial/airprime.c +@@ -18,6 +18,7 @@ + static struct usb_device_id id_table [] = { + { USB_DEVICE(0xf3d, 0x0112) }, /* AirPrime CDMA Wireless PC Card */ + { USB_DEVICE(0x1410, 0x1110) }, /* Novatel Wireless Merlin CDMA */ ++ { USB_DEVICE(0x1199, 0x0112) }, /* Sierra Wireless Aircard 580 */ + { }, + }; + MODULE_DEVICE_TABLE(usb, id_table); diff --git a/usb/usb-hid-hidbp-input-drivers-fix-various-usb-input-hid-input.c-bugs-that-make-apple-mighty-mouse-work-poorly.patch b/usb/usb-hid-hidbp-input-drivers-fix-various-usb-input-hid-input.c-bugs-that-make-apple-mighty-mouse-work-poorly.patch new file mode 100644 index 0000000000000..a5289118d70c0 --- /dev/null +++ b/usb/usb-hid-hidbp-input-drivers-fix-various-usb-input-hid-input.c-bugs-that-make-apple-mighty-mouse-work-poorly.patch @@ -0,0 +1,136 @@ +From bart@cs.pdx.edu Mon May 8 14:40:54 2006 +Message-Id: <200605082140.k48LeDTC002769@murzim.cs.pdx.edu> +To: "Vojtech Pavlik" <vojtech@suse.cz>, "Dmitry Torokhov" <dtor_core@ameritech.net> +cc: "Greg Kroah-Hartman" <greg@kroah.com> +Subject: USB HID/HIDBP, INPUT DRIVERS: fix various usb/input/hid-input.c bugs that make Apple Mighty Mouse work poorly +Date: Mon, 08 May 2006 14:40:13 -0700 +From: Barton C Massey <bart@cs.pdx.edu> + +From: Bart Massey <bart@cs.pdx.edu> + +Transposed lines of code in drivers/usb/input/hid-input.c causes the +capability bits for a new HID device to be set before quirks are applied +at configuration time. When an HID event is then sent up to the input +layer, it may then be discarded as irrelevant because the wrong +capability bit is set. + +Further, the quirks for the Apple Mighty Mouse are not quite right: the +horizontal scrolling needs its axis reversed, and the left and center +buttons are transposed. Also, the mouse is labeled in the kernel with +its earlier name (I think) of Apple PowerMouse. + +Steps to reproduce problem: Plug in an Apple Mighty Mouse. Note that +horizontal scrolling doesn't work at all, and in fact doesn't generate +any input events on /dev/input/eventN. Note also that pushing the +middle button performs the right button action, and vice versa. Once +you have the horizontal scrolling working, note that it is backward WRT +both to vertical scrolling and to common sense. + +This patch maybe should be broken up, as it does address two problems. +The transposed code in hidinput_configure_usage() probably creates bugs +beyond just the Mighty Mouse. The rest of the patch renames POWERMOUSE +to MIGHTYMOUSE everywhere (which I *believe* is correct), fixes the +MIGHTYMOUSE quirk to swap the center and right mouse buttons, and adds a +new quirk HID_QUIRK_INVERT_HWHEEL also assigned to the MIGHTYMOUSE with +code in hidinput_hid_event() to implement it. + +Signed-off-by: Bart Massey <bart@cs.pdx.edu> + +--- + +--- + drivers/usb/input/hid-core.c | 4 ++-- + drivers/usb/input/hid-input.c | 32 ++++++++++++++++++++++---------- + drivers/usb/input/hid.h | 3 ++- + 3 files changed, 26 insertions(+), 13 deletions(-) + +--- gregkh-2.6.orig/drivers/usb/input/hid-core.c ++++ gregkh-2.6/drivers/usb/input/hid-core.c +@@ -1549,7 +1549,7 @@ void hid_init_reports(struct hid_device + #define USB_DEVICE_ID_LD_MACHINETEST 0x2040 + + #define USB_VENDOR_ID_APPLE 0x05ac +-#define USB_DEVICE_ID_APPLE_POWERMOUSE 0x0304 ++#define USB_DEVICE_ID_APPLE_MIGHTYMOUSE 0x0304 + + #define USB_VENDOR_ID_CHERRY 0x046a + #define USB_DEVICE_ID_CHERRY_CYMOTION 0x0023 +@@ -1689,7 +1689,7 @@ static const struct hid_blacklist { + { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_DUAL_USB_JOYPAD, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, + { USB_VENDOR_ID_SILVERCREST, USB_DEVICE_ID_SILVERCREST_KB, HID_QUIRK_NOGET }, + +- { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_POWERMOUSE, HID_QUIRK_2WHEEL_POWERMOUSE }, ++ { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE, HID_QUIRK_MIGHTYMOUSE | HID_QUIRK_INVERT_HWHEEL }, + { USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK_7 }, + { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE, HID_QUIRK_2WHEEL_MOUSE_HACK_5 }, + +--- gregkh-2.6.orig/drivers/usb/input/hid-input.c ++++ gregkh-2.6/drivers/usb/input/hid-input.c +@@ -567,16 +567,14 @@ static void hidinput_configure_usage(str + break; + } + +- set_bit(usage->type, input->evbit); +- +- while (usage->code <= max && test_and_set_bit(usage->code, bit)) +- usage->code = find_next_zero_bit(bit, max + 1, usage->code); +- +- if (usage->code > max) +- goto ignore; +- +- if (((device->quirks & (HID_QUIRK_2WHEEL_POWERMOUSE)) && (usage->hid == 0x00010032))) +- map_rel(REL_HWHEEL); ++ if (device->quirks & HID_QUIRK_MIGHTYMOUSE) { ++ if (usage->hid == HID_GD_Z) ++ map_rel(REL_HWHEEL); ++ else if (usage->code == BTN_1) ++ map_key(BTN_2); ++ else if (usage->code == BTN_2) ++ map_key(BTN_1); ++ } + + if ((device->quirks & (HID_QUIRK_2WHEEL_MOUSE_HACK_7 | HID_QUIRK_2WHEEL_MOUSE_HACK_5)) && + (usage->type == EV_REL) && (usage->code == REL_WHEEL)) +@@ -586,6 +584,15 @@ static void hidinput_configure_usage(str + || ((device->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_7) && (usage->hid == 0x00090007))) + goto ignore; + ++ set_bit(usage->type, input->evbit); ++ ++ while (usage->code <= max && test_and_set_bit(usage->code, bit)) ++ usage->code = find_next_zero_bit(bit, max + 1, usage->code); ++ ++ if (usage->code > max) ++ goto ignore; ++ ++ + if (usage->type == EV_ABS) { + + int a = field->logical_minimum; +@@ -647,6 +654,11 @@ void hidinput_hid_event(struct hid_devic + return; + } + ++ if ((hid->quirks & HID_QUIRK_INVERT_HWHEEL) && (usage->code == REL_HWHEEL)) { ++ input_event(input, usage->type, usage->code, -value); ++ return; ++ } ++ + if ((hid->quirks & HID_QUIRK_2WHEEL_MOUSE_HACK_ON) && (usage->code == REL_WHEEL)) { + input_event(input, usage->type, REL_HWHEEL, value); + return; +--- gregkh-2.6.orig/drivers/usb/input/hid.h ++++ gregkh-2.6/drivers/usb/input/hid.h +@@ -247,10 +247,11 @@ struct hid_item { + #define HID_QUIRK_2WHEEL_MOUSE_HACK_7 0x00000080 + #define HID_QUIRK_2WHEEL_MOUSE_HACK_5 0x00000100 + #define HID_QUIRK_2WHEEL_MOUSE_HACK_ON 0x00000200 +-#define HID_QUIRK_2WHEEL_POWERMOUSE 0x00000400 ++#define HID_QUIRK_MIGHTYMOUSE 0x00000400 + #define HID_QUIRK_CYMOTION 0x00000800 + #define HID_QUIRK_POWERBOOK_HAS_FN 0x00001000 + #define HID_QUIRK_POWERBOOK_FN_ON 0x00002000 ++#define HID_QUIRK_INVERT_HWHEEL 0x00004000 + + /* + * This is the global environment of the parser. This information is diff --git a/usb/usb-net2280-add-a-shutdown-routine.patch b/usb/usb-net2280-add-a-shutdown-routine.patch new file mode 100644 index 0000000000000..0b3b8f6f51f66 --- /dev/null +++ b/usb/usb-net2280-add-a-shutdown-routine.patch @@ -0,0 +1,52 @@ +From stern@rowland.harvard.edu Fri May 5 13:23:47 2006 +Date: Fri, 5 May 2006 16:23:42 -0400 (EDT) +From: Alan Stern <stern@rowland.harvard.edu> +To: Greg KH <greg@kroah.com> +cc: David Brownell <david-b@pacbell.net> +Subject: USB: net2280: add a shutdown routine +Message-ID: <Pine.LNX.4.44L0.0605051620550.5854-100000@iolanthe.rowland.org> + +The net2280 board has an annoying habit of surviving soft reboots with +interrupts enabled. This patch (as674) adds a shutdown routine to the +driver so that the board can be put in a quiescent state. + +Signed-off-by: Alan Stern <stern@rowland.harvard.edu> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/gadget/net2280.c | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +--- gregkh-2.6.orig/drivers/usb/gadget/net2280.c ++++ gregkh-2.6/drivers/usb/gadget/net2280.c +@@ -2972,6 +2972,22 @@ done: + return retval; + } + ++/* make sure the board is quiescent; otherwise it will continue ++ * generating IRQs across the upcoming reboot. ++ */ ++ ++static void net2280_shutdown (struct pci_dev *pdev) ++{ ++ struct net2280 *dev = pci_get_drvdata (pdev); ++ ++ /* disable IRQs */ ++ writel (0, &dev->regs->pciirqenb0); ++ writel (0, &dev->regs->pciirqenb1); ++ ++ /* disable the pullup so the host will think we're gone */ ++ writel (0, &dev->usb->usbctl); ++} ++ + + /*-------------------------------------------------------------------------*/ + +@@ -3001,6 +3017,7 @@ static struct pci_driver net2280_pci_dri + + .probe = net2280_probe, + .remove = net2280_remove, ++ .shutdown = net2280_shutdown, + + /* FIXME add power management support */ + }; diff --git a/usb/usb-shuttle_usbat-hardcode-flash-detection-for-now.patch b/usb/usb-shuttle_usbat-hardcode-flash-detection-for-now.patch new file mode 100644 index 0000000000000..a724bb4840277 --- /dev/null +++ b/usb/usb-shuttle_usbat-hardcode-flash-detection-for-now.patch @@ -0,0 +1,42 @@ +From dsd@ntlworld.com Mon May 8 15:43:08 2006 +From: Daniel Drake <dsd@gentoo.org> +To: greg@kroah.com +Cc: linux-usb-devel@lists.sourceforge.net +Cc: usb-storage@lists.one-eyed-alien.net +Cc: mdharm-usb@one-eyed-alien.net +Subject: USB shuttle_usbat: hardcode flash detection for now +Message-Id: <20060508224302.4B22A888119@zog.reactivated.net> +Date: Mon, 8 May 2006 23:43:02 +0100 (BST) + +After some further testing with my flash device I realised that our current +probe doesn't always work (e.g. when no media is inserted). + +Now that Peter Chubb's patch has simplified the detection of 99% of the HP CD +writers out there, we have a much smaller range of hardware to work with on +the shared device ID, so it should be possible to try some of the previous +probe options again: we just need to find another tester with a USBAT2-based HP +CD writer. + +This patch hardcodes the flash detection until someone comes along with one of +these obscure CD drives. Note that these devices are extremely rare, so even if +we can't ever find a decent probe method, at least we will be supporting almost +all of the USBAT-based hardware out there. + +Signed-off-by: Daniel Drake <dsd@gentoo.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/storage/unusual_devs.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- gregkh-2.6.orig/drivers/usb/storage/unusual_devs.h ++++ gregkh-2.6/drivers/usb/storage/unusual_devs.h +@@ -393,7 +393,7 @@ UNUSUAL_DEV( 0x04fc, 0x80c2, 0x0100, 0x + UNUSUAL_DEV( 0x04e6, 0x1010, 0x0000, 0x9999, + "Shuttle/SCM", + "USBAT-02", +- US_SC_SCSI, US_PR_USBAT, init_usbat_probe, ++ US_SC_SCSI, US_PR_USBAT, init_usbat_flash, + US_FL_SINGLE_LUN), + #endif + diff --git a/usb/usb-uhci-fix-obscure-bug-in-enqueue.patch b/usb/usb-uhci-fix-obscure-bug-in-enqueue.patch new file mode 100644 index 0000000000000..a6b1621e633d9 --- /dev/null +++ b/usb/usb-uhci-fix-obscure-bug-in-enqueue.patch @@ -0,0 +1,74 @@ +From stern@rowland.harvard.edu Fri May 5 13:32:09 2006 +Date: Fri, 5 May 2006 16:32:02 -0400 (EDT) +From: Alan Stern <stern@rowland.harvard.edu> +To: Greg KH <greg@kroah.com> +Subject: USB: UHCI: fix obscure bug in enqueue() +Message-ID: <Pine.LNX.4.44L0.0605051626590.5854-100000@iolanthe.rowland.org> + +This patch (as676) fixes a small bug in uhci-hcd's enqueue routine. When +an URB is unlinked or gets an error and the completion handler queues +another URB for the same endpoint, the queue shouldn't be allowed to start +up again until the handler returns. Not even if the new URB is the only +one on its queue. + +Signed-off-by: Alan Stern <stern@rowland.harvard.edu> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/host/uhci-q.c | 24 +++++++++++++++--------- + 1 file changed, 15 insertions(+), 9 deletions(-) + +--- gregkh-2.6.orig/drivers/usb/host/uhci-q.c ++++ gregkh-2.6/drivers/usb/host/uhci-q.c +@@ -1148,8 +1148,9 @@ static int uhci_urb_enqueue(struct usb_h + + /* If the new URB is the first and only one on this QH then either + * the QH is new and idle or else it's unlinked and waiting to +- * become idle, so we can activate it right away. */ +- if (qh->queue.next == &urbp->node) ++ * become idle, so we can activate it right away. But only if the ++ * queue isn't stopped. */ ++ if (qh->queue.next == &urbp->node && !qh->is_stopped) + uhci_activate_qh(uhci, qh); + goto done; + +@@ -1293,27 +1294,32 @@ static void uhci_scan_qh(struct uhci_hcd + if (urb->status == -EINPROGRESS) /* Not dequeued */ + urb->status = status; + else +- status = -ECONNRESET; ++ status = ECONNRESET; /* Not -ECONNRESET */ + spin_unlock(&urb->lock); + + /* Dequeued but completed URBs can't be given back unless + * the QH is stopped or has finished unlinking. */ +- if (status == -ECONNRESET && +- !(qh->is_stopped || QH_FINISHED_UNLINKING(qh))) +- return; ++ if (status == ECONNRESET) { ++ if (QH_FINISHED_UNLINKING(qh)) ++ qh->is_stopped = 1; ++ else if (!qh->is_stopped) ++ return; ++ } + + uhci_giveback_urb(uhci, qh, urb, regs); +- if (qh->is_stopped) ++ if (status < 0) + break; + } + + /* If the QH is neither stopped nor finished unlinking (normal case), + * our work here is done. */ +- restart: +- if (!(qh->is_stopped || QH_FINISHED_UNLINKING(qh))) ++ if (QH_FINISHED_UNLINKING(qh)) ++ qh->is_stopped = 1; ++ else if (!qh->is_stopped) + return; + + /* Otherwise give back each of the dequeued URBs */ ++restart: + list_for_each_entry(urbp, &qh->queue, node) { + urb = urbp->urb; + if (urb->status != -EINPROGRESS) { diff --git a/usb/usb-uhci-store-the-endpoint-type-in-the-qh-structure.patch b/usb/usb-uhci-store-the-endpoint-type-in-the-qh-structure.patch new file mode 100644 index 0000000000000..cc4f4238aa0e1 --- /dev/null +++ b/usb/usb-uhci-store-the-endpoint-type-in-the-qh-structure.patch @@ -0,0 +1,193 @@ +From stern@rowland.harvard.edu Fri May 5 13:27:08 2006 +Date: Fri, 5 May 2006 16:26:58 -0400 (EDT) +From: Alan Stern <stern@rowland.harvard.edu> +To: Greg KH <greg@kroah.com> +Subject: USB: UHCI: store the endpoint type in the QH structure +Message-ID: <Pine.LNX.4.44L0.0605051623430.5854-100000@iolanthe.rowland.org> + +This patch (as675) simplifies uhci-hcd slightly by storing each endpoint's +type in the corresponding Queue Header structure. + +Signed-off-by: Alan Stern <stern@rowland.harvard.edu> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/host/uhci-debug.c | 26 +++++++++++++++++++------- + drivers/usb/host/uhci-hcd.h | 1 + + drivers/usb/host/uhci-q.c | 34 ++++++++++++++++++---------------- + 3 files changed, 38 insertions(+), 23 deletions(-) + +--- gregkh-2.6.orig/drivers/usb/host/uhci-debug.c ++++ gregkh-2.6/drivers/usb/host/uhci-debug.c +@@ -98,6 +98,7 @@ static int uhci_show_urbp(struct urb_pri + char *out = buf; + struct uhci_td *td; + int i, nactive, ninactive; ++ char *ptype; + + if (len < 200) + return 0; +@@ -110,13 +111,14 @@ static int uhci_show_urbp(struct urb_pri + (usb_pipein(urbp->urb->pipe) ? "IN" : "OUT")); + + switch (usb_pipetype(urbp->urb->pipe)) { +- case PIPE_ISOCHRONOUS: out += sprintf(out, "ISO"); break; +- case PIPE_INTERRUPT: out += sprintf(out, "INT"); break; +- case PIPE_BULK: out += sprintf(out, "BLK"); break; +- case PIPE_CONTROL: out += sprintf(out, "CTL"); break; ++ case PIPE_ISOCHRONOUS: ptype = "ISO"; break; ++ case PIPE_INTERRUPT: ptype = "INT"; break; ++ case PIPE_BULK: ptype = "BLK"; break; ++ default: ++ case PIPE_CONTROL: ptype = "CTL"; break; + } + +- out += sprintf(out, "%s", (urbp->fsbr ? " FSBR" : "")); ++ out += sprintf(out, "%s%s", ptype, (urbp->fsbr ? " FSBR" : "")); + + if (urbp->urb->status != -EINPROGRESS) + out += sprintf(out, " Status=%d", urbp->urb->status); +@@ -147,13 +149,23 @@ static int uhci_show_qh(struct uhci_qh * + char *out = buf; + int i, nurbs; + __le32 element = qh_element(qh); ++ char *qtype; + + /* Try to make sure there's enough memory */ + if (len < 80 * 6) + return 0; + +- out += sprintf(out, "%*s[%p] link (%08x) element (%08x)\n", space, "", +- qh, le32_to_cpu(qh->link), le32_to_cpu(element)); ++ switch (qh->type) { ++ case USB_ENDPOINT_XFER_ISOC: qtype = "ISO"; break; ++ case USB_ENDPOINT_XFER_INT: qtype = "INT"; break; ++ case USB_ENDPOINT_XFER_BULK: qtype = "BLK"; break; ++ case USB_ENDPOINT_XFER_CONTROL: qtype = "CTL"; break; ++ default: qtype = "Skel" ; break; ++ } ++ ++ out += sprintf(out, "%*s[%p] %s QH link (%08x) element (%08x)\n", ++ space, "", qh, qtype, ++ le32_to_cpu(qh->link), le32_to_cpu(element)); + + if (element & UHCI_PTR_QH) + out += sprintf(out, "%*s Element points to QH (bug?)\n", space, ""); +--- gregkh-2.6.orig/drivers/usb/host/uhci-hcd.h ++++ gregkh-2.6/drivers/usb/host/uhci-hcd.h +@@ -132,6 +132,7 @@ struct uhci_qh { + + unsigned int unlink_frame; /* When the QH was unlinked */ + int state; /* QH_STATE_xxx; see above */ ++ int type; /* Queue type (control, bulk, etc) */ + + unsigned int initial_toggle:1; /* Endpoint's current toggle value */ + unsigned int needs_fixup:1; /* Must fix the TD toggle values */ +--- gregkh-2.6.orig/drivers/usb/host/uhci-q.c ++++ gregkh-2.6/drivers/usb/host/uhci-q.c +@@ -179,10 +179,12 @@ static struct uhci_qh *uhci_alloc_qh(str + qh->hep = hep; + qh->udev = udev; + hep->hcpriv = qh; ++ qh->type = hep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; + + } else { /* Skeleton QH */ + qh->state = QH_STATE_ACTIVE; + qh->udev = NULL; ++ qh->type = -1; + } + return qh; + } +@@ -217,8 +219,8 @@ static void uhci_save_toggle(struct uhci + qh->element = UHCI_PTR_TERM; + + /* Only bulk and interrupt pipes have to worry about toggles */ +- if (!(usb_pipetype(urb->pipe) == PIPE_BULK || +- usb_pipetype(urb->pipe) == PIPE_INTERRUPT)) ++ if (!(qh->type == USB_ENDPOINT_XFER_BULK || ++ qh->type == USB_ENDPOINT_XFER_INT)) + return; + + /* Find the first active TD; that's the device's toggle state */ +@@ -1099,14 +1101,14 @@ static int uhci_urb_enqueue(struct usb_h + } + urbp->qh = qh; + +- switch (usb_pipetype(urb->pipe)) { +- case PIPE_CONTROL: ++ switch (qh->type) { ++ case USB_ENDPOINT_XFER_CONTROL: + ret = uhci_submit_control(uhci, urb, qh); + break; +- case PIPE_BULK: ++ case USB_ENDPOINT_XFER_BULK: + ret = uhci_submit_bulk(uhci, urb, qh); + break; +- case PIPE_INTERRUPT: ++ case USB_ENDPOINT_XFER_INT: + if (list_empty(&qh->queue)) { + bustime = usb_check_bandwidth(urb->dev, urb); + if (bustime < 0) +@@ -1125,7 +1127,7 @@ static int uhci_urb_enqueue(struct usb_h + ret = uhci_submit_interrupt(uhci, urb, qh); + } + break; +- case PIPE_ISOCHRONOUS: ++ case USB_ENDPOINT_XFER_ISOC: + bustime = usb_check_bandwidth(urb->dev, urb); + if (bustime < 0) { + ret = bustime; +@@ -1175,7 +1177,7 @@ static int uhci_urb_dequeue(struct usb_h + goto done; + + /* Remove Isochronous TDs from the frame list ASAP */ +- if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) ++ if (urbp->qh->type == USB_ENDPOINT_XFER_ISOC) + uhci_unlink_isochronous_tds(uhci, urb); + uhci_unlink_qh(uhci, urbp->qh); + +@@ -1195,7 +1197,7 @@ __acquires(uhci->lock) + struct urb_priv *urbp = (struct urb_priv *) urb->hcpriv; + + /* Isochronous TDs get unlinked directly from the frame list */ +- if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) ++ if (qh->type == USB_ENDPOINT_XFER_ISOC) + uhci_unlink_isochronous_tds(uhci, urb); + + /* If the URB isn't first on its queue, adjust the link pointer +@@ -1224,13 +1226,13 @@ __acquires(uhci->lock) + uhci_dec_fsbr(uhci, urb); /* Safe since it checks */ + uhci_free_urb_priv(uhci, urbp); + +- switch (usb_pipetype(urb->pipe)) { +- case PIPE_ISOCHRONOUS: ++ switch (qh->type) { ++ case USB_ENDPOINT_XFER_ISOC: + /* Release bandwidth for Interrupt or Isoc. transfers */ + if (urb->bandwidth) + usb_release_bandwidth(urb->dev, urb, 1); + break; +- case PIPE_INTERRUPT: ++ case USB_ENDPOINT_XFER_INT: + /* Release bandwidth for Interrupt or Isoc. transfers */ + /* Make sure we don't release if we have a queued URB */ + if (list_empty(&qh->queue) && urb->bandwidth) +@@ -1273,14 +1275,14 @@ static void uhci_scan_qh(struct uhci_hcd + urbp = list_entry(qh->queue.next, struct urb_priv, node); + urb = urbp->urb; + +- switch (usb_pipetype(urb->pipe)) { +- case PIPE_CONTROL: ++ switch (qh->type) { ++ case USB_ENDPOINT_XFER_CONTROL: + status = uhci_result_control(uhci, urb); + break; +- case PIPE_ISOCHRONOUS: ++ case USB_ENDPOINT_XFER_ISOC: + status = uhci_result_isochronous(uhci, urb); + break; +- default: /* PIPE_BULK or PIPE_INTERRUPT */ ++ default: /* USB_ENDPOINT_XFER_BULK or _INT */ + status = uhci_result_common(uhci, urb); + break; + } diff --git a/usb/usb-usb-storage-alauda-fix-transport-info-mismerge.patch b/usb/usb-usb-storage-alauda-fix-transport-info-mismerge.patch new file mode 100644 index 0000000000000..d00d3ec035a6f --- /dev/null +++ b/usb/usb-usb-storage-alauda-fix-transport-info-mismerge.patch @@ -0,0 +1,52 @@ +From dsd@ntlworld.com Mon May 8 17:45:23 2006 +From: Daniel Drake <dsd@gentoo.org> +To: greg@kroah.com +Cc: <mdharm-usb@one-eyed-alien.net> +Subject: USB: usb-storage alauda: Fix transport info mismerge +Message-Id: <20060509004527.C0A5788A90E@zog.reactivated.net> +Date: Tue, 9 May 2006 01:45:27 +0100 (BST) + +Unfortunately it looks like the transport entry for this subdriver was merged +into the protocol section, making this driver unusable :( + +Signed-off-by: Daniel Drake <dsd@gentoo.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/storage/usb.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +--- gregkh-2.6.orig/drivers/usb/storage/usb.c ++++ gregkh-2.6/drivers/usb/storage/usb.c +@@ -593,6 +593,15 @@ static int get_transport(struct us_data + break; + #endif + ++#ifdef CONFIG_USB_STORAGE_ALAUDA ++ case US_PR_ALAUDA: ++ us->transport_name = "Alauda Control/Bulk"; ++ us->transport = alauda_transport; ++ us->transport_reset = usb_stor_Bulk_reset; ++ us->max_lun = 1; ++ break; ++#endif ++ + default: + return -EIO; + } +@@ -648,15 +657,6 @@ static int get_protocol(struct us_data * + break; + #endif + +-#ifdef CONFIG_USB_STORAGE_ALAUDA +- case US_PR_ALAUDA: +- us->transport_name = "Alauda Control/Bulk"; +- us->transport = alauda_transport; +- us->transport_reset = usb_stor_Bulk_reset; +- us->max_lun = 1; +- break; +-#endif +- + default: + return -EIO; + } |