diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2005-11-15 15:56:51 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-11-15 15:56:51 -0800 |
commit | b1c8db5fb77b15c7179b8f8ef0730a6aa51fecee (patch) | |
tree | 73761e71aec2e36f688f1463ac89dc713f855d55 /usb | |
parent | cae7bf988b354fd938934fdfc15fe23e72869d2c (diff) | |
download | patches-b1c8db5fb77b15c7179b8f8ef0730a6aa51fecee.tar.gz |
more usb patches
Diffstat (limited to 'usb')
-rw-r--r-- | usb/add-pxa27x-ohci-pm-functions.patch (renamed from usb/usb-pxa27x-update-02.patch) | 43 | ||||
-rw-r--r-- | usb/pxa27x-ohci-separate-platform-code-from-main-driver.patch (renamed from usb/usb-pxa27x-update-01.patch) | 100 | ||||
-rw-r--r-- | usb/usb-adapt-microtek-driver-to-new-scsi-features.patch | 141 | ||||
-rw-r--r-- | usb/usb-cdc-acm-ring-queue.patch | 49 | ||||
-rw-r--r-- | usb/usb-pl2303-adds-new-ids.patch (renamed from usb/usb-pl2303-adds-new-ids..patch) | 0 | ||||
-rw-r--r-- | usb/usb-storage-fix-detection-of-kodak-flash-readers-in-shuttle_usbat-driver.patch | 33 |
6 files changed, 284 insertions, 82 deletions
diff --git a/usb/usb-pxa27x-update-02.patch b/usb/add-pxa27x-ohci-pm-functions.patch index ed7313b01f334..a75bb96d02839 100644 --- a/usb/usb-pxa27x-update-02.patch +++ b/usb/add-pxa27x-ohci-pm-functions.patch @@ -1,60 +1,65 @@ -From rpurdie@rpsys.net Sun Oct 30 09:51:40 2005 -Subject: USB: Add pxa27x OHCI PM functions +From rpurdie@rpsys.net Sat Nov 12 06:24:45 2005 +Subject: [usb patch 2/2] Add pxa27x OHCI PM functions From: Richard Purdie <rpurdie@rpsys.net> -To: Greg KH <gregkh@suse.de> -Date: Sun, 30 Oct 2005 16:33:52 +0000 -Message-Id: <1130690033.8248.125.camel@localhost.localdomain> +To: Greg KH <greg@kroah.com> +Date: Sat, 12 Nov 2005 14:22:14 +0000 +Message-Id: <1131805334.7597.18.camel@localhost.localdomain> Add power management functions for the pxa27x USB OHCI host controller. This is a totally rewritten version of the patch by Nicolas Pitre and Todd Poynor which accounts for recent USB changes. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> +Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - drivers/usb/host/ohci-pxa27x.c | 28 ++++++++++++++++++++++++---- - 1 file changed, 24 insertions(+), 4 deletions(-) +--- + drivers/usb/host/ohci-pxa27x.c | 33 +++++++++++++++++++++++++++------ + 1 file changed, 27 insertions(+), 6 deletions(-) ---- gregkh-2.6.orig/drivers/usb/host/ohci-pxa27x.c 2005-11-12 14:09:13.000000000 -0800 -+++ gregkh-2.6/drivers/usb/host/ohci-pxa27x.c 2005-11-12 14:11:24.000000000 -0800 -@@ -316,28 +316,48 @@ +--- gregkh-2.6.orig/drivers/usb/host/ohci-pxa27x.c ++++ gregkh-2.6/drivers/usb/host/ohci-pxa27x.c +@@ -312,28 +312,49 @@ static int ohci_hcd_pxa27x_drv_remove(st return 0; } +-static int ohci_hcd_pxa27x_drv_suspend(struct platform_device *dev, pm_message_t state) +#ifdef CONFIG_PM - static int ohci_hcd_pxa27x_drv_suspend(struct platform_device *dev, pm_message_t state) ++static int ohci_hcd_pxa27x_drv_suspend(struct platform_device *pdev, pm_message_t state) { -// struct usb_hcd *hcd = platform_get_drvdata(dev); - printk("%s: not implemented yet\n", __FUNCTION__); -+ struct ohci_hcd *ohci = hcd_to_ohci(dev_get_drvdata(dev)); ++ struct ohci_hcd *ohci = platform_get_drvdata(pdev); + + if (time_before(jiffies, ohci->next_statechange)) + msleep(5); + ohci->next_statechange = jiffies; + -+ pxa27x_stop_hc(dev); ++ pxa27x_stop_hc(&pdev->dev); + ohci_to_hcd(ohci)->state = HC_STATE_SUSPENDED; -+ dev->power.power_state = PMSG_SUSPEND; ++ pdev->dev.power.power_state = PMSG_SUSPEND; return 0; } - static int ohci_hcd_pxa27x_drv_resume(struct platform_device *dev) +-static int ohci_hcd_pxa27x_drv_resume(struct platform_device *dev) ++static int ohci_hcd_pxa27x_drv_resume(struct platform_device *pdev) { -// struct usb_hcd *hcd = platform_get_drvdata(dev); - printk("%s: not implemented yet\n", __FUNCTION__); -+ struct ohci_hcd *ohci = hcd_to_ohci(dev_get_drvdata(dev)); ++ struct ohci_hcd *ohci = platform_get_drvdata(pdev); + int status; + + if (time_before(jiffies, ohci->next_statechange)) + msleep(5); + ohci->next_statechange = jiffies; + -+ if ((status = pxa27x_start_hc(dev)) < 0) ++ if ((status = pxa27x_start_hc(&pdev->dev)) < 0) + return status; ++ ++ pdev->dev.power.power_state = PMSG_ON; ++ usb_hcd_resume_root_hub(platform_get_drvdata(pdev)); -+ dev->power.power_state = PMSG_ON; -+ usb_hcd_resume_root_hub(dev_get_drvdata(dev)); return 0; } +#endif diff --git a/usb/usb-pxa27x-update-01.patch b/usb/pxa27x-ohci-separate-platform-code-from-main-driver.patch index a6e4a6c38443e..a8a9f91f8bbdc 100644 --- a/usb/usb-pxa27x-update-01.patch +++ b/usb/pxa27x-ohci-separate-platform-code-from-main-driver.patch @@ -1,10 +1,10 @@ -From rpurdie@rpsys.net Sun Oct 30 09:51:39 2005 -Subject: USB: pxa27x OHCI - Separate platform code from main driver +From rpurdie@rpsys.net Sat Nov 12 06:24:32 2005 From: Richard Purdie <rpurdie@rpsys.net> -To: dbrownell@users.sourceforge.net, Greg KH <gregkh@suse.de> -Cc: Todd Poynor <tpoynor@mvista.com>, <nico@cam.org> -Date: Sun, 30 Oct 2005 16:23:46 +0000 -Message-Id: <1130689426.8248.118.camel@localhost.localdomain> +Subject: [usb patch 1/2] pxa27x OHCI - Separate platform code from main driver +To: Greg KH <greg@kroah.com> +Date: Sat, 12 Nov 2005 14:22:11 +0000 +Message-Id: <1131805332.7597.17.camel@localhost.localdomain> + To allow multiple platforms to use the PXA27x OHCI driver, the platform code needs to be moved into the board specific files in @@ -20,14 +20,15 @@ Signed-off-by: Nicolas Pitre <nico@cam.org> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - arch/arm/mach-pxa/mainstone.c | 21 ++++++++++ - arch/arm/mach-pxa/pxa27x.c | 6 +++ - drivers/usb/host/ohci-pxa27x.c | 77 +++++++++++++++++++++------------------- - include/asm-arm/arch-pxa/ohci.h | 18 +++++++++ - 4 files changed, 86 insertions(+), 36 deletions(-) +--- + arch/arm/mach-pxa/mainstone.c | 21 +++++++++ + arch/arm/mach-pxa/pxa27x.c | 6 ++ + drivers/usb/host/ohci-pxa27x.c | 85 ++++++++++++++++++++-------------------- + include/asm-arm/arch-pxa/ohci.h | 18 ++++++++ + 4 files changed, 88 insertions(+), 42 deletions(-) ---- gregkh-2.6.orig/drivers/usb/host/ohci-pxa27x.c 2005-11-11 22:48:28.000000000 -0800 -+++ gregkh-2.6/drivers/usb/host/ohci-pxa27x.c 2005-11-12 14:08:00.000000000 -0800 +--- gregkh-2.6.orig/drivers/usb/host/ohci-pxa27x.c ++++ gregkh-2.6/drivers/usb/host/ohci-pxa27x.c @@ -26,18 +26,12 @@ #include <asm/mach-types.h> #include <asm/hardware.h> @@ -48,7 +49,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* PMM_NPS_MODE -- PMM Non-power switching mode Ports are powered continuously. -@@ -50,8 +44,6 @@ +@@ -50,8 +44,6 @@ static int pxa27x_ohci_pmm_state; */ static int pxa27x_ohci_select_pmm( int mode ) { @@ -57,7 +58,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> switch ( mode ) { case PMM_NPS_MODE: UHCRHDA |= RH_A_NPS; -@@ -71,7 +63,6 @@ +@@ -71,7 +63,6 @@ static int pxa27x_ohci_select_pmm( int m "Invalid mode %d, set to non-power switch mode.\n", mode ); @@ -65,7 +66,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> UHCRHDA |= RH_A_NPS; } -@@ -82,8 +73,13 @@ +@@ -82,8 +73,13 @@ extern int usb_disabled(void); /*-------------------------------------------------------------------------*/ @@ -80,7 +81,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> pxa_set_cken(CKEN10_USBHOST, 1); UHCHR |= UHCHR_FHR; -@@ -94,21 +90,11 @@ +@@ -94,21 +90,11 @@ static void pxa27x_start_hc(struct platf while (UHCHR & UHCHR_FSBIR) cpu_relax(); @@ -106,7 +107,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> UHCHR &= ~UHCHR_SSE; -@@ -117,10 +103,19 @@ +@@ -117,10 +103,19 @@ static void pxa27x_start_hc(struct platf /* Clear any OTG Pin Hold */ if (PSSR & PSSR_OTGPH) PSSR |= PSSR_OTGPH; @@ -127,22 +128,21 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> UHCHR |= UHCHR_FHR; udelay(11); UHCHR &= ~UHCHR_FHR; -@@ -147,22 +142,28 @@ +@@ -147,22 +142,27 @@ static void pxa27x_stop_hc(struct platfo * through the hotplug entry's driver_data. * */ -int usb_hcd_pxa27x_probe (const struct hc_driver *driver, - struct platform_device *dev) -+int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct device *dev) ++int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device *pdev) { int retval; struct usb_hcd *hcd; + struct pxaohci_platform_data *inf; -+ struct platform_device *pdev = to_platform_device(dev); ++ ++ inf = pdev->dev.platform_data; - if (dev->resource[1].flags != IORESOURCE_IRQ) { -+ inf = dev->platform_data; -+ + if (!inf) + return -ENODEV; + @@ -152,7 +152,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } - hcd = usb_create_hcd (driver, &dev->dev, "pxa27x"); -+ hcd = usb_create_hcd (driver, dev, "pxa27x"); ++ hcd = usb_create_hcd (driver, &pdev->dev, "pxa27x"); if (!hcd) return -ENOMEM; - hcd->rsrc_start = dev->resource[0].start; @@ -162,12 +162,12 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { pr_debug("request_mem_region failed"); -@@ -177,18 +178,22 @@ +@@ -177,18 +177,22 @@ int usb_hcd_pxa27x_probe (const struct h goto err2; } - pxa27x_start_hc(dev); -+ if ((retval = pxa27x_start_hc(dev)) < 0) { ++ if ((retval = pxa27x_start_hc(&pdev->dev)) < 0) { + pr_debug("pxa27x_start_hc failed"); + goto err3; + } @@ -183,22 +183,44 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (retval == 0) return retval; - pxa27x_stop_hc(dev); +- pxa27x_stop_hc(dev); ++ pxa27x_stop_hc(&pdev->dev); + err3: iounmap(hcd->regs); err2: release_mem_region(hcd->rsrc_start, hcd->rsrc_len); -@@ -211,7 +216,7 @@ +@@ -211,10 +215,10 @@ int usb_hcd_pxa27x_probe (const struct h * context, normally "rmmod", "apmd", or something similar. * */ -void usb_hcd_pxa27x_remove (struct usb_hcd *hcd, struct platform_device *dev) -+void usb_hcd_pxa27x_remove (struct usb_hcd *hcd, struct device *dev) ++void usb_hcd_pxa27x_remove (struct usb_hcd *hcd, struct platform_device *pdev) { usb_remove_hcd(hcd); - pxa27x_stop_hc(dev); ---- gregkh-2.6.orig/arch/arm/mach-pxa/pxa27x.c 2005-11-11 22:48:03.000000000 -0800 -+++ gregkh-2.6/arch/arm/mach-pxa/pxa27x.c 2005-11-12 14:08:00.000000000 -0800 +- pxa27x_stop_hc(dev); ++ pxa27x_stop_hc(&pdev->dev); + iounmap(hcd->regs); + release_mem_region(hcd->rsrc_start, hcd->rsrc_len); + usb_put_hcd(hcd); +@@ -292,15 +296,12 @@ static const struct hc_driver ohci_pxa27 + + static int ohci_hcd_pxa27x_drv_probe(struct platform_device *pdev) + { +- int ret; +- + pr_debug ("In ohci_hcd_pxa27x_drv_probe"); + + if (usb_disabled()) + return -ENODEV; + +- ret = usb_hcd_pxa27x_probe(&ohci_pxa27x_hc_driver, pdev); +- return ret; ++ return usb_hcd_pxa27x_probe(&ohci_pxa27x_hc_driver, pdev); + } + + static int ohci_hcd_pxa27x_drv_remove(struct platform_device *pdev) +--- gregkh-2.6.orig/arch/arm/mach-pxa/pxa27x.c ++++ gregkh-2.6/arch/arm/mach-pxa/pxa27x.c @@ -21,6 +21,7 @@ #include <asm/hardware.h> #include <asm/irq.h> @@ -207,7 +229,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> #include "generic.h" -@@ -194,6 +195,11 @@ +@@ -194,6 +195,11 @@ static struct platform_device ohci_devic .resource = pxa27x_ohci_resources, }; @@ -219,8 +241,8 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> static struct platform_device *devices[] __initdata = { &ohci_device, }; ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gregkh-2.6/include/asm-arm/arch-pxa/ohci.h 2005-11-12 14:08:00.000000000 -0800 +--- /dev/null ++++ gregkh-2.6/include/asm-arm/arch-pxa/ohci.h @@ -0,0 +1,18 @@ +#ifndef ASMARM_ARCH_OHCI_H +#define ASMARM_ARCH_OHCI_H @@ -240,8 +262,8 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +extern void pxa_set_ohci_info(struct pxaohci_platform_data *info); + +#endif ---- gregkh-2.6.orig/arch/arm/mach-pxa/mainstone.c 2005-11-11 22:48:03.000000000 -0800 -+++ gregkh-2.6/arch/arm/mach-pxa/mainstone.c 2005-11-12 14:08:00.000000000 -0800 +--- gregkh-2.6.orig/arch/arm/mach-pxa/mainstone.c ++++ gregkh-2.6/arch/arm/mach-pxa/mainstone.c @@ -43,6 +43,7 @@ #include <asm/arch/pxafb.h> #include <asm/arch/mmc.h> @@ -250,7 +272,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> #include "generic.h" -@@ -393,6 +394,25 @@ +@@ -393,6 +394,25 @@ static struct platform_device *platform_ &mst_flash_device[1], }; @@ -276,7 +298,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> static void __init mainstone_init(void) { int SW7 = 0; /* FIXME: get from SCR (Mst doc section 3.2.1.1) */ -@@ -424,6 +444,7 @@ +@@ -424,6 +444,7 @@ static void __init mainstone_init(void) pxa_set_mci_info(&mainstone_mci_platform_data); pxa_set_ficp_info(&mainstone_ficp_platform_data); diff --git a/usb/usb-adapt-microtek-driver-to-new-scsi-features.patch b/usb/usb-adapt-microtek-driver-to-new-scsi-features.patch new file mode 100644 index 0000000000000..90ee487664993 --- /dev/null +++ b/usb/usb-adapt-microtek-driver-to-new-scsi-features.patch @@ -0,0 +1,141 @@ +From oliver@neukum.org Sun Nov 13 05:15:44 2005 +From: Oliver Neukum <oliver@neukum.org> +To: greg@kroah.com, linux-usb-devel@lists.sourceforge.net +Subject: USB: Adapt microtek driver to new scsi features +Date: Sun, 13 Nov 2005 14:12:44 +0100 +Content-Disposition: inline +Message-Id: <200511131412.45156.oliver@neukum.org> + +the scsi layer now uses very short sg lists. This breaks the microtek +driver. Here is a patch fixes this and some other issues. + +Signed-off-by: Oliver Neukum <oliver@neukum.name> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/image/microtek.c | 35 +++++++++++++++++++++++++++-------- + drivers/usb/image/microtek.h | 2 +- + 2 files changed, 28 insertions(+), 9 deletions(-) + +--- gregkh-2.6.orig/drivers/usb/image/microtek.c ++++ gregkh-2.6/drivers/usb/image/microtek.c +@@ -327,6 +327,18 @@ static inline void mts_urb_abort(struct + usb_kill_urb( desc->urb ); + } + ++static int mts_slave_alloc (struct scsi_device *s) ++{ ++ s->inquiry_len = 0x24; ++ return 0; ++} ++ ++static int mts_slave_configure (struct scsi_device *s) ++{ ++ blk_queue_dma_alignment(s->request_queue, (512 - 1)); ++ return 0; ++} ++ + static int mts_scsi_abort (Scsi_Cmnd *srb) + { + struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]); +@@ -411,7 +423,7 @@ static void mts_transfer_done( struct ur + MTS_INT_INIT(); + + context->srb->result &= MTS_SCSI_ERR_MASK; +- context->srb->result |= (unsigned)context->status<<1; ++ context->srb->result |= (unsigned)(*context->scsi_status)<<1; + + mts_transfer_cleanup(transfer); + +@@ -427,7 +439,7 @@ static void mts_get_status( struct urb * + mts_int_submit_urb(transfer, + usb_rcvbulkpipe(context->instance->usb_dev, + context->instance->ep_response), +- &context->status, ++ context->scsi_status, + 1, + mts_transfer_done ); + } +@@ -481,7 +493,7 @@ static void mts_command_done( struct urb + context->data_pipe, + context->data, + context->data_length, +- context->srb->use_sg ? mts_do_sg : mts_data_done); ++ context->srb->use_sg > 1 ? mts_do_sg : mts_data_done); + } else { + mts_get_status(transfer); + } +@@ -627,7 +639,6 @@ int mts_scsi_queuecommand( Scsi_Cmnd *sr + callback(srb); + + } +- + out: + return err; + } +@@ -645,6 +656,9 @@ static struct scsi_host_template mts_scs + .cmd_per_lun = 1, + .use_clustering = 1, + .emulated = 1, ++ .slave_alloc = mts_slave_alloc, ++ .slave_configure = mts_slave_configure, ++ .max_sectors= 256, /* 128 K */ + }; + + struct vendor_product +@@ -771,8 +785,8 @@ static int mts_usb_probe(struct usb_inte + MTS_WARNING( "couldn't find an output bulk endpoint. Bailing out.\n" ); + return -ENODEV; + } +- +- ++ ++ + new_desc = kzalloc(sizeof(struct mts_desc), GFP_KERNEL); + if (!new_desc) + goto out; +@@ -781,6 +795,10 @@ static int mts_usb_probe(struct usb_inte + if (!new_desc->urb) + goto out_kfree; + ++ new_desc->context.scsi_status = kmalloc(1, GFP_KERNEL); ++ if (!new_desc->context.scsi_status) ++ goto out_kfree2; ++ + new_desc->usb_dev = dev; + new_desc->usb_intf = intf; + init_MUTEX(&new_desc->lock); +@@ -817,6 +835,8 @@ static int mts_usb_probe(struct usb_inte + usb_set_intfdata(intf, new_desc); + return 0; + ++ out_kfree2: ++ kfree(new_desc->context.scsi_status); + out_free_urb: + usb_free_urb(new_desc->urb); + out_kfree: +@@ -836,6 +856,7 @@ static void mts_usb_disconnect (struct u + + scsi_host_put(desc->host); + usb_free_urb(desc->urb); ++ kfree(desc->context.scsi_status); + kfree(desc); + } + +@@ -856,5 +877,3 @@ module_exit(microtek_drv_exit); + MODULE_AUTHOR( DRIVER_AUTHOR ); + MODULE_DESCRIPTION( DRIVER_DESC ); + MODULE_LICENSE("GPL"); +- +- +--- gregkh-2.6.orig/drivers/usb/image/microtek.h ++++ gregkh-2.6/drivers/usb/image/microtek.h +@@ -22,7 +22,7 @@ struct mts_transfer_context + int data_pipe; + int fragment; + +- u8 status; /* status returned from ep_response after command completion */ ++ u8 *scsi_status; /* status returned from ep_response after command completion */ + }; + + diff --git a/usb/usb-cdc-acm-ring-queue.patch b/usb/usb-cdc-acm-ring-queue.patch index 6f942a80ee1d8..a83513b632363 100644 --- a/usb/usb-cdc-acm-ring-queue.patch +++ b/usb/usb-cdc-acm-ring-queue.patch @@ -19,8 +19,9 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> drivers/usb/class/cdc-acm.h | 33 +++++- 2 files changed, 185 insertions(+), 77 deletions(-) ---- gregkh-2.6.orig/drivers/usb/class/cdc-acm.c 2005-11-02 11:37:10.000000000 -0800 -+++ gregkh-2.6/drivers/usb/class/cdc-acm.c 2005-11-02 12:04:22.000000000 -0800 +--- +--- gregkh-2.6.orig/drivers/usb/class/cdc-acm.c ++++ gregkh-2.6/drivers/usb/class/cdc-acm.c @@ -6,6 +6,7 @@ * Copyright (c) 1999 Johannes Erdfelt <johannes@erdfelt.com> * Copyright (c) 2000 Vojtech Pavlik <vojtech@suse.cz> @@ -55,7 +56,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> #define DRIVER_DESC "USB Abstract Control Model driver for USB modems and ISDN adapters" static struct usb_driver acm_driver; -@@ -284,7 +287,9 @@ +@@ -284,7 +287,9 @@ exit: /* data interface returns incoming bytes, or we got unthrottled */ static void acm_read_bulk(struct urb *urb, struct pt_regs *regs) { @@ -66,7 +67,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> dbg("Entering acm_read_bulk with status %d\n", urb->status); if (!ACM_READY(acm)) -@@ -293,49 +298,109 @@ +@@ -293,49 +298,109 @@ static void acm_read_bulk(struct urb *ur if (urb->status) dev_dbg(&acm->data->dev, "bulk rx status %d\n", urb->status); @@ -201,7 +202,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } /* data interface wrote those outgoing bytes */ -@@ -369,6 +434,7 @@ +@@ -369,6 +434,7 @@ static int acm_tty_open(struct tty_struc { struct acm *acm; int rv = -EINVAL; @@ -209,7 +210,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> dbg("Entering acm_tty_open.\n"); down(&open_sem); -@@ -382,7 +448,9 @@ +@@ -382,7 +448,9 @@ static int acm_tty_open(struct tty_struc tty->driver_data = acm; acm->tty = tty; @@ -220,7 +221,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (acm->used++) { goto done; -@@ -394,18 +462,20 @@ +@@ -394,18 +462,20 @@ static int acm_tty_open(struct tty_struc goto bail_out; } @@ -250,7 +251,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> done: err_out: -@@ -413,8 +483,6 @@ +@@ -413,8 +483,6 @@ err_out: return rv; full_bailout: @@ -259,7 +260,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> usb_kill_urb(acm->ctrlurb); bail_out: acm->used--; -@@ -424,18 +492,22 @@ +@@ -424,18 +492,22 @@ bail_out: static void acm_tty_unregister(struct acm *acm) { @@ -283,7 +284,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (!acm || !acm->used) return; -@@ -446,7 +518,8 @@ +@@ -446,7 +518,8 @@ static void acm_tty_close(struct tty_str acm_set_control(acm, acm->ctrlout = 0); usb_kill_urb(acm->ctrlurb); usb_kill_urb(acm->writeurb); @@ -293,7 +294,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } else acm_tty_unregister(acm); } -@@ -528,10 +601,7 @@ +@@ -528,10 +601,7 @@ static void acm_tty_unthrottle(struct tt spin_lock_bh(&acm->throttle_lock); acm->throttle = 0; spin_unlock_bh(&acm->throttle_lock); @@ -305,7 +306,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } static void acm_tty_break_ctl(struct tty_struct *tty, int state) -@@ -694,6 +764,7 @@ +@@ -694,6 +764,7 @@ static int acm_probe (struct usb_interfa int call_interface_num = -1; int data_interface_num; unsigned long quirks; @@ -313,7 +314,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* handle quirks deadly to normal probing*/ quirks = (unsigned long)id->driver_info; -@@ -833,7 +904,7 @@ +@@ -833,7 +904,7 @@ skip_normal_probe: } ctrlsize = le16_to_cpu(epctrl->wMaxPacketSize); @@ -322,7 +323,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> acm->writesize = le16_to_cpu(epwrite->wMaxPacketSize); acm->control = control_interface; acm->data = data_interface; -@@ -842,12 +913,14 @@ +@@ -842,12 +913,14 @@ skip_normal_probe: acm->ctrl_caps = ac_management_function; acm->ctrlsize = ctrlsize; acm->readsize = readsize; @@ -339,7 +340,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> buf = usb_buffer_alloc(usb_dev, ctrlsize, GFP_KERNEL, &acm->ctrl_dma); if (!buf) { -@@ -856,13 +929,6 @@ +@@ -856,13 +929,6 @@ skip_normal_probe: } acm->ctrl_buffer = buf; @@ -353,7 +354,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (acm_write_buffers_alloc(acm) < 0) { dev_dbg(&intf->dev, "out of memory (write buffer alloc)\n"); goto alloc_fail4; -@@ -873,10 +939,25 @@ +@@ -873,10 +939,25 @@ skip_normal_probe: dev_dbg(&intf->dev, "out of memory (ctrlurb kmalloc)\n"); goto alloc_fail5; } @@ -383,7 +384,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } acm->writeurb = usb_alloc_urb(0, GFP_KERNEL); if (!acm->writeurb) { -@@ -889,15 +970,9 @@ +@@ -889,15 +970,9 @@ skip_normal_probe: acm->ctrlurb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; acm->ctrlurb->transfer_dma = acm->ctrl_dma; @@ -399,7 +400,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> dev_info(&intf->dev, "ttyACM%d: USB ACM device\n", minor); -@@ -917,14 +992,14 @@ +@@ -917,14 +992,14 @@ skip_normal_probe: return 0; alloc_fail7: @@ -418,7 +419,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> usb_buffer_free(usb_dev, ctrlsize, acm->ctrl_buffer, acm->ctrl_dma); alloc_fail2: kfree(acm); -@@ -936,6 +1011,7 @@ +@@ -936,6 +1011,7 @@ static void acm_disconnect(struct usb_in { struct acm *acm = usb_get_intfdata (intf); struct usb_device *usb_dev = interface_to_usbdev(intf); @@ -426,7 +427,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (!acm || !acm->dev) { dbg("disconnect on nonexisting interface"); -@@ -946,15 +1022,24 @@ +@@ -946,15 +1022,24 @@ static void acm_disconnect(struct usb_in acm->dev = NULL; usb_set_intfdata (intf, NULL); @@ -453,8 +454,8 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> usb_driver_release_interface(&acm_driver, acm->data); ---- gregkh-2.6.orig/drivers/usb/class/cdc-acm.h 2005-08-28 16:41:01.000000000 -0700 -+++ gregkh-2.6/drivers/usb/class/cdc-acm.h 2005-11-02 12:04:22.000000000 -0800 +--- gregkh-2.6.orig/drivers/usb/class/cdc-acm.h ++++ gregkh-2.6/drivers/usb/class/cdc-acm.h @@ -59,6 +59,9 @@ * when processing onlcr, so we only need 2 buffers. */ @@ -465,7 +466,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> struct acm_wb { unsigned char *buf; dma_addr_t dmah; -@@ -66,22 +69,43 @@ +@@ -66,22 +69,43 @@ struct acm_wb { int use; }; @@ -513,7 +514,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> spinlock_t throttle_lock; /* synchronize throtteling and read callback */ unsigned int ctrlin; /* input control lines (DCD, DSR, RI, break, overruns) */ unsigned int ctrlout; /* output control lines (DTR, RTS) */ -@@ -91,7 +115,6 @@ +@@ -91,7 +115,6 @@ struct acm { unsigned int minor; /* acm minor number */ unsigned char throttle; /* throttled by tty layer */ unsigned char clocal; /* termios CLOCAL */ diff --git a/usb/usb-pl2303-adds-new-ids..patch b/usb/usb-pl2303-adds-new-ids.patch index 5f808dba657bb..5f808dba657bb 100644 --- a/usb/usb-pl2303-adds-new-ids..patch +++ b/usb/usb-pl2303-adds-new-ids.patch diff --git a/usb/usb-storage-fix-detection-of-kodak-flash-readers-in-shuttle_usbat-driver.patch b/usb/usb-storage-fix-detection-of-kodak-flash-readers-in-shuttle_usbat-driver.patch new file mode 100644 index 0000000000000..2f04b85264329 --- /dev/null +++ b/usb/usb-storage-fix-detection-of-kodak-flash-readers-in-shuttle_usbat-driver.patch @@ -0,0 +1,33 @@ +From dsd@gentoo.org Sat Nov 12 09:54:01 2005 +Message-ID: <43762BCA.7070909@gentoo.org> +Date: Sat, 12 Nov 2005 17:52:10 +0000 +From: Daniel Drake <dsd@gentoo.org> +To: Greg KH <greg@kroah.com> +CC: USB Storage list <usb-storage@lists.one-eyed-alien.net>, Matthew Dharm <mdharm-usb@one-eyed-alien.net>, <pfavr@how.dk> +Subject: [PATCH] usb-storage: Fix detection of kodak flash readers in shuttle_usbat driver + +Peter Favrholdt reported that his Kodak flash device was getting +detected as a CDROM, and he helped me track this down to the fact that +the device takes a long time (approx 440ms!) to reset. + +This patch increases the delay to 500ms, which solves the problem. + +Signed-off-by: Daniel Drake <dsd@gentoo.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + + +--- + drivers/usb/storage/shuttle_usbat.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- gregkh-2.6.orig/drivers/usb/storage/shuttle_usbat.c ++++ gregkh-2.6/drivers/usb/storage/shuttle_usbat.c +@@ -853,7 +853,7 @@ static int usbat_identify_device(struct + rc = usbat_device_reset(us); + if (rc != USB_STOR_TRANSPORT_GOOD) + return rc; +- msleep(25); ++ msleep(500); + + /* + * In attempt to distinguish between HP CDRW's and Flash readers, we now |