diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-03 09:54:41 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-03 09:54:41 -0700 |
| commit | 83801b53e2add123144953d9039b41d9378bce3b (patch) | |
| tree | 225b35026dd89128e59eb494d75a5bb3709db66b /usb.current | |
| parent | 34d977d7eb8d6f9061b4c7cae87093afc29f1a99 (diff) | |
| download | patches-83801b53e2add123144953d9039b41d9378bce3b.tar.gz | |
2.6.34-rc6-git1 - delete a bunch of stuff now in Linus's tree
Diffstat (limited to 'usb.current')
29 files changed, 0 insertions, 1572 deletions
diff --git a/usb.current/musb-blackfin-don-t-fake-blackfin_interrupt-result.patch b/usb.current/musb-blackfin-don-t-fake-blackfin_interrupt-result.patch deleted file mode 100644 index 01f347f0168a0c..00000000000000 --- a/usb.current/musb-blackfin-don-t-fake-blackfin_interrupt-result.patch +++ /dev/null @@ -1,40 +0,0 @@ -From felipe.balbi@nokia.com Fri Apr 23 14:03:54 2010 -From: Sergei Shtylyov <sshtylyov@ru.mvista.com> -Date: Thu, 25 Mar 2010 13:14:25 +0200 -Subject: MUSB: Blackfin: don't fake blackfin_interrupt() result -To: Greg KH <greg@kroah.com> -Message-ID: <1269515673-27980-4-git-send-email-felipe.balbi@nokia.com> - - -From: Sergei Shtylyov <sshtylyov@ru.mvista.com> - -Commit a5073b52833e4df8e16c93dc4cbb7e0c558c74a2 (musb_gadget: fix unhandled -endpoint 0 IRQs) misses this change to blackfin.c: stop faking successful -result of blackfin_interrupt() and emitting a debug message on an unhandled -interrupt. - -Signed-off-by: Sergei Shtylyov <sshtylyov@mvista.com> -Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/musb/blackfin.c | 8 +------- - 1 file changed, 1 insertion(+), 7 deletions(-) - ---- a/drivers/usb/musb/blackfin.c -+++ b/drivers/usb/musb/blackfin.c -@@ -172,13 +172,7 @@ static irqreturn_t blackfin_interrupt(in - - spin_unlock_irqrestore(&musb->lock, flags); - -- /* REVISIT we sometimes get spurious IRQs on g_ep0 -- * not clear why... fall in BF54x too. -- */ -- if (retval != IRQ_HANDLED) -- DBG(5, "spurious?\n"); -- -- return IRQ_HANDLED; -+ return retval; - } - - static void musb_conn_timer_handler(unsigned long _musb) diff --git a/usb.current/musb-davinci-fix-musb_platform_init-error-cleanup-path.patch b/usb.current/musb-davinci-fix-musb_platform_init-error-cleanup-path.patch deleted file mode 100644 index fd1e0677ea80f0..00000000000000 --- a/usb.current/musb-davinci-fix-musb_platform_init-error-cleanup-path.patch +++ /dev/null @@ -1,31 +0,0 @@ -From felipe.balbi@nokia.com Fri Apr 23 14:05:27 2010 -From: Sergei Shtylyov <sshtylyov@ru.mvista.com> -Date: Thu, 25 Mar 2010 13:14:30 +0200 -Subject: MUSB: DaVinci: fix musb_platform_init() error cleanup path -To: Greg KH <greg@kroah.com> -Message-ID: <1269515673-27980-9-git-send-email-felipe.balbi@nokia.com> - - -From: Sergei Shtylyov <sshtylyov@ru.mvista.com> - -This function forgets to call clk_disable() iff reading the USB module version -register returns 0. - -Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/musb/davinci.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/drivers/usb/musb/davinci.c -+++ b/drivers/usb/musb/davinci.c -@@ -444,6 +444,8 @@ int __init musb_platform_init(struct mus - return 0; - - fail: -+ clk_disable(musb->clock); -+ - usb_nop_xceiv_unregister(); - return -ENODEV; - } diff --git a/usb.current/musb-fix-davinci-glue-layer-dependency.patch b/usb.current/musb-fix-davinci-glue-layer-dependency.patch deleted file mode 100644 index eeedad8d5d87ad..00000000000000 --- a/usb.current/musb-fix-davinci-glue-layer-dependency.patch +++ /dev/null @@ -1,45 +0,0 @@ -From felipe.balbi@nokia.com Fri Apr 23 14:03:23 2010 -From: Sergei Shtylyov <sshtylyov@ru.mvista.com> -Date: Thu, 25 Mar 2010 13:14:24 +0200 -Subject: MUSB: fix DaVinci glue layer dependency -To: Greg KH <greg@kroah.com> -Message-ID: <1269515673-27980-3-git-send-email-felipe.balbi@nokia.com> - - -From: Sergei Shtylyov <sshtylyov@ru.mvista.com> - -CONFIG_ARCH_DAVINCI now embraces both the "real" DaVinci and DA8xx/OMAP-L1x -- -on which the DaVinci glue layer won't work. Change the Makefile dependency to -CONFIG_ARCH_DAVINCI_DMx which corresponds to "real" DaVinci. - -Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> -Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/musb/Kconfig | 2 +- - drivers/usb/musb/Makefile | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - ---- a/drivers/usb/musb/Kconfig -+++ b/drivers/usb/musb/Kconfig -@@ -42,7 +42,7 @@ config USB_MUSB_SOC - default y if (BF52x && !BF522 && !BF523) - - comment "DaVinci 35x and 644x USB support" -- depends on USB_MUSB_HDRC && ARCH_DAVINCI -+ depends on USB_MUSB_HDRC && ARCH_DAVINCI_DMx - - comment "OMAP 243x high speed USB support" - depends on USB_MUSB_HDRC && ARCH_OMAP2430 ---- a/drivers/usb/musb/Makefile -+++ b/drivers/usb/musb/Makefile -@@ -6,7 +6,7 @@ musb_hdrc-objs := musb_core.o - - obj-$(CONFIG_USB_MUSB_HDRC) += musb_hdrc.o - --ifeq ($(CONFIG_ARCH_DAVINCI),y) -+ifeq ($(CONFIG_ARCH_DAVINCI_DMx),y) - musb_hdrc-objs += davinci.o - endif - diff --git a/usb.current/musb-fix-power-field-to-hold-all-possible-values.patch b/usb.current/musb-fix-power-field-to-hold-all-possible-values.patch deleted file mode 100644 index 85af6da5e331ff..00000000000000 --- a/usb.current/musb-fix-power-field-to-hold-all-possible-values.patch +++ /dev/null @@ -1,32 +0,0 @@ -From felipe.balbi@nokia.com Fri Apr 23 13:51:10 2010 -From: Ajay Kumar Gupta <ajay.gupta@ti.com> -Date: Thu, 25 Mar 2010 13:14:23 +0200 -Subject: musb: fix power field to hold all possible values -To: Greg KH <greg@kroah.com> -Message-ID: <1269515673-27980-2-git-send-email-felipe.balbi@nokia.com> - - -From: Ajay Kumar Gupta <ajay.gupta@ti.com> - -MUSB can supply upto 500mA such as, AM3517 and OMAP3EVM Rev >=E and thus -the 'power' field has to hold values above 255. - -Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> -Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - arch/arm/plat-omap/include/plat/usb.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/arch/arm/plat-omap/include/plat/usb.h -+++ b/arch/arm/plat-omap/include/plat/usb.h -@@ -46,7 +46,7 @@ struct ehci_hcd_omap_platform_data { - struct omap_musb_board_data { - u8 interface_type; - u8 mode; -- u8 power; -+ u16 power; - }; - - enum musb_interface {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI}; diff --git a/usb.current/musb-omap-don-t-call-clk_put.patch b/usb.current/musb-omap-don-t-call-clk_put.patch deleted file mode 100644 index 775f4a373d1060..00000000000000 --- a/usb.current/musb-omap-don-t-call-clk_put.patch +++ /dev/null @@ -1,32 +0,0 @@ -From felipe.balbi@nokia.com Fri Apr 23 14:05:40 2010 -From: Sergei Shtylyov <sshtylyov@ru.mvista.com> -Date: Thu, 25 Mar 2010 13:14:31 +0200 -Subject: MUSB: OMAP: don't call clk_put() -To: Greg KH <greg@kroah.com> -Message-ID: <1269515673-27980-10-git-send-email-felipe.balbi@nokia.com> - - -From: Sergei Shtylyov <sshtylyov@ru.mvista.com> - -Remove duplicate/unbalanced call to clk_put() from musb_platform_exit() -- -clk_put() gets called from musb_core.c anyway... - -Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> -Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/musb/omap2430.c | 3 --- - 1 file changed, 3 deletions(-) - ---- a/drivers/usb/musb/omap2430.c -+++ b/drivers/usb/musb/omap2430.c -@@ -331,8 +331,5 @@ int musb_platform_exit(struct musb *musb - - musb_platform_suspend(musb); - -- clk_put(musb->clock); -- musb->clock = NULL; -- - return 0; - } diff --git a/usb.current/musb-potential-use-after-free.patch b/usb.current/musb-potential-use-after-free.patch deleted file mode 100644 index 21179ba16fa222..00000000000000 --- a/usb.current/musb-potential-use-after-free.patch +++ /dev/null @@ -1,31 +0,0 @@ -From felipe.balbi@nokia.com Fri Apr 23 14:04:35 2010 -From: Dan Carpenter <error27@gmail.com> -Date: Thu, 25 Mar 2010 13:14:27 +0200 -Subject: musb: potential use after free -To: Greg KH <greg@kroah.com> -Message-ID: <1269515673-27980-6-git-send-email-felipe.balbi@nokia.com> - - -From: Dan Carpenter <error27@gmail.com> - -We assign "urb->hcpriv = qh;" a few lines down. I'm pretty sure we -want it "urb->hcpriv" to be NULL not a freed value. - -Signed-off-by: Dan Carpenter <error27@gmail.com> -Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/musb/musb_host.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/drivers/usb/musb/musb_host.c -+++ b/drivers/usb/musb/musb_host.c -@@ -2042,6 +2042,7 @@ static int musb_urb_enqueue( - * odd, rare, error prone, but legal. - */ - kfree(qh); -+ qh = NULL; - ret = 0; - } else - ret = musb_schedule(musb, qh, diff --git a/usb.current/musb-save-and-restore-missing-bus-control-register.patch b/usb.current/musb-save-and-restore-missing-bus-control-register.patch deleted file mode 100644 index 3f9f8a6625e0f3..00000000000000 --- a/usb.current/musb-save-and-restore-missing-bus-control-register.patch +++ /dev/null @@ -1,51 +0,0 @@ -From felipe.balbi@nokia.com Fri Apr 23 14:04:12 2010 -From: Ajay Kumar Gupta <ajay.gupta@ti.com> -Date: Thu, 25 Mar 2010 13:14:26 +0200 -Subject: musb: save and restore missing bus control register -To: Greg KH <greg@kroah.com> -Message-ID: <1269515673-27980-5-git-send-email-felipe.balbi@nokia.com> - - -From: Ajay Kumar Gupta <ajay.gupta@ti.com> - -Added the missing BUS_CONTROL register in musb -save/restore routines. - -Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> -Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/musb/musb_core.c | 2 ++ - drivers/usb/musb/musb_core.h | 2 +- - 2 files changed, 3 insertions(+), 1 deletion(-) - ---- a/drivers/usb/musb/musb_core.c -+++ b/drivers/usb/musb/musb_core.c -@@ -2176,6 +2176,7 @@ void musb_save_context(struct musb *musb - if (is_host_enabled(musb)) { - musb_context.frame = musb_readw(musb_base, MUSB_FRAME); - musb_context.testmode = musb_readb(musb_base, MUSB_TESTMODE); -+ musb_context.busctl = musb_read_ulpi_buscontrol(musb->mregs); - } - musb_context.power = musb_readb(musb_base, MUSB_POWER); - musb_context.intrtxe = musb_readw(musb_base, MUSB_INTRTXE); -@@ -2247,6 +2248,7 @@ void musb_restore_context(struct musb *m - if (is_host_enabled(musb)) { - musb_writew(musb_base, MUSB_FRAME, musb_context.frame); - musb_writeb(musb_base, MUSB_TESTMODE, musb_context.testmode); -+ musb_write_ulpi_buscontrol(musb->mregs, musb_context.busctl); - } - musb_writeb(musb_base, MUSB_POWER, musb_context.power); - musb_writew(musb_base, MUSB_INTRTXE, musb_context.intrtxe); ---- a/drivers/usb/musb/musb_core.h -+++ b/drivers/usb/musb/musb_core.h -@@ -478,7 +478,7 @@ struct musb_context_registers { - u16 frame; - u8 index, testmode; - -- u8 devctl, misc; -+ u8 devctl, busctl, misc; - - struct musb_csr_regs index_regs[MUSB_C_NUM_EPS]; - }; diff --git a/usb.current/musb_core-don-t-call-musb_platform_exit-twice.patch b/usb.current/musb_core-don-t-call-musb_platform_exit-twice.patch deleted file mode 100644 index dfd8b2379eda0e..00000000000000 --- a/usb.current/musb_core-don-t-call-musb_platform_exit-twice.patch +++ /dev/null @@ -1,94 +0,0 @@ -From felipe.balbi@nokia.com Fri Apr 23 14:06:04 2010 -From: Sergei Shtylyov <sshtylyov@ru.mvista.com> -Date: Thu, 25 Mar 2010 13:14:32 +0200 -Subject: musb_core: don't call musb_platform_exit() twice -To: Greg KH <greg@kroah.com> -Message-ID: <1269515673-27980-11-git-send-email-felipe.balbi@nokia.com> - - -From: Sergei Shtylyov <sshtylyov@ru.mvista.com> - -musb_platform_exit() is called twice from musb_init_controller() iff controller -initialization fails. Move the call (and the DevCtl register writes surrounding -it) from musb_free() to musb_remove(). - -Fix mispalced and now incorrect 'goto's in musb_init_controller(). - -Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> -Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- a/drivers/usb/musb/musb_core.c -+++ b/drivers/usb/musb/musb_core.c -@@ -1851,10 +1851,6 @@ static void musb_free(struct musb *musb) - put_device(musb->xceiv->dev); - #endif - -- musb_writeb(musb->mregs, MUSB_DEVCTL, 0); -- musb_platform_exit(musb); -- musb_writeb(musb->mregs, MUSB_DEVCTL, 0); -- - #ifdef CONFIG_USB_MUSB_HDRC_HCD - usb_put_hcd(musb_to_hcd(musb)); - #else -@@ -2032,8 +2028,6 @@ bad_config: - musb->xceiv->state = OTG_STATE_A_IDLE; - - status = usb_add_hcd(musb_to_hcd(musb), -1, 0); -- if (status) -- goto fail; - - DBG(1, "%s mode, status %d, devctl %02x %c\n", - "HOST", status, -@@ -2048,8 +2042,6 @@ bad_config: - musb->xceiv->state = OTG_STATE_B_IDLE; - - status = musb_gadget_setup(musb); -- if (status) -- goto fail; - - DBG(1, "%s mode, status %d, dev%02x\n", - is_otg_enabled(musb) ? "OTG" : "PERIPHERAL", -@@ -2057,12 +2049,14 @@ bad_config: - musb_readb(musb->mregs, MUSB_DEVCTL)); - - } -+ if (status < 0) -+ goto fail2; - - #ifdef CONFIG_SYSFS - status = sysfs_create_group(&musb->controller->kobj, &musb_attr_group); --#endif - if (status) - goto fail2; -+#endif - - dev_info(dev, "USB %s mode controller at %p using %s, IRQ %d\n", - ({char *s; -@@ -2125,7 +2119,6 @@ static int __init musb_probe(struct platform_device *pdev) - /* clobbered by use_dma=n */ - orig_dma_mask = dev->dma_mask; - #endif -- - status = musb_init_controller(dev, irq, base); - if (status < 0) - iounmap(base); -@@ -2148,6 +2141,10 @@ static int __exit musb_remove(struct platform_device *pdev) - if (musb->board_mode == MUSB_HOST) - usb_remove_hcd(musb_to_hcd(musb)); - #endif -+ musb_writeb(musb->mregs, MUSB_DEVCTL, 0); -+ musb_platform_exit(musb); -+ musb_writeb(musb->mregs, MUSB_DEVCTL, 0); -+ - musb_free(musb); - iounmap(ctrl_base); - device_init_wakeup(&pdev->dev, 0); --- -1.7.0.rc0.33.g7c3932 - --- -To unsubscribe from this list: send the line "unsubscribe linux-usb" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo- - diff --git a/usb.current/musb_core-don-t-prevent-disabling-clock-on-driver-unload.patch b/usb.current/musb_core-don-t-prevent-disabling-clock-on-driver-unload.patch deleted file mode 100644 index 0d2acdcf7292b3..00000000000000 --- a/usb.current/musb_core-don-t-prevent-disabling-clock-on-driver-unload.patch +++ /dev/null @@ -1,35 +0,0 @@ -From felipe.balbi@nokia.com Fri Apr 23 14:05:10 2010 -From: Sergei Shtylyov <sshtylyov@ru.mvista.com> -Date: Thu, 25 Mar 2010 13:14:29 +0200 -Subject: musb_core: don't prevent disabling clock on driver unload -To: Greg KH <greg@kroah.com> -Message-ID: <1269515673-27980-8-git-send-email-felipe.balbi@nokia.com> - - -From: Sergei Shtylyov <sshtylyov@ru.mvista.com> - -Resetting 'musb->clock' to NULL in musb_shutdown() prevents musb_platform_exit() -from properly disabling the clock when unloading the driver -- don't do it. - -Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> -Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/musb/musb_core.c | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - ---- a/drivers/usb/musb/musb_core.c -+++ b/drivers/usb/musb/musb_core.c -@@ -965,10 +965,8 @@ static void musb_shutdown(struct platfor - spin_lock_irqsave(&musb->lock, flags); - musb_platform_disable(musb); - musb_generic_disable(musb); -- if (musb->clock) { -+ if (musb->clock) - clk_put(musb->clock); -- musb->clock = NULL; -- } - spin_unlock_irqrestore(&musb->lock, flags); - - /* FIXME power down */ diff --git a/usb.current/musb_core-don-t-touch-musb-clock-in-musb_free.patch b/usb.current/musb_core-don-t-touch-musb-clock-in-musb_free.patch deleted file mode 100644 index 2de5c5d244c9c2..00000000000000 --- a/usb.current/musb_core-don-t-touch-musb-clock-in-musb_free.patch +++ /dev/null @@ -1,37 +0,0 @@ -From felipe.balbi@nokia.com Fri Apr 23 14:04:50 2010 -From: Sergei Shtylyov <sshtylyov@ru.mvista.com> -Date: Thu, 25 Mar 2010 13:14:28 +0200 -Subject: musb_core: don't touch 'musb->clock' in musb_free() -To: Greg KH <greg@kroah.com> -Message-ID: <1269515673-27980-7-git-send-email-felipe.balbi@nokia.com> - - -From: Sergei Shtylyov <sshtylyov@ru.mvista.com> - -Remove duplicate/unbalanced calls to clk_disable()/clk_put() in musb_free(): - -- clk_disable() is called by musb_platform_exit() just prior to this call; -- clk_put() is called by the callers of musb_free() prior to calling it... - -Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> -Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/musb/musb_core.c | 5 ----- - 1 file changed, 5 deletions(-) - ---- a/drivers/usb/musb/musb_core.c -+++ b/drivers/usb/musb/musb_core.c -@@ -1857,11 +1857,6 @@ static void musb_free(struct musb *musb) - musb_platform_exit(musb); - musb_writeb(musb->mregs, MUSB_DEVCTL, 0); - -- if (musb->clock) { -- clk_disable(musb->clock); -- clk_put(musb->clock); -- } -- - #ifdef CONFIG_USB_MUSB_HDRC_HCD - usb_put_hcd(musb_to_hcd(musb)); - #else diff --git a/usb.current/musb_core-fix-musb_init_controller-error-cleanup-path.patch b/usb.current/musb_core-fix-musb_init_controller-error-cleanup-path.patch deleted file mode 100644 index 4e9bb694ec729e..00000000000000 --- a/usb.current/musb_core-fix-musb_init_controller-error-cleanup-path.patch +++ /dev/null @@ -1,151 +0,0 @@ -From felipe.balbi@nokia.com Fri Apr 23 14:08:25 2010 -From: Sergei Shtylyov <sshtylyov@ru.mvista.com> -Date: Thu, 25 Mar 2010 13:14:33 +0200 -Subject: musb_core: fix musb_init_controller() error cleanup path -To: Greg KH <greg@kroah.com> -Message-ID: <1269515673-27980-12-git-send-email-felipe.balbi@nokia.com> - - -From: Sergei Shtylyov <sshtylyov@ru.mvista.com> - -This function forgets to call usb_remove_hcd() or musb_gadget_cleanup() iff -sysfs_create_group() fails. - -[ felipe.balbi@nokia.com : review the entire error path - not only when we fail hcd or gadget ] - -Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> -Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/musb/musb_core.c | 51 ++++++++++++++++++++++++++++--------------- - 1 file changed, 34 insertions(+), 17 deletions(-) - ---- a/drivers/usb/musb/musb_core.c -+++ b/drivers/usb/musb/musb_core.c -@@ -1878,8 +1878,10 @@ musb_init_controller(struct device *dev, - */ - if (!plat) { - dev_dbg(dev, "no platform_data?\n"); -- return -ENODEV; -+ status = -ENODEV; -+ goto fail0; - } -+ - switch (plat->mode) { - case MUSB_HOST: - #ifdef CONFIG_USB_MUSB_HDRC_HCD -@@ -1901,13 +1903,16 @@ bad_config: - #endif - default: - dev_err(dev, "incompatible Kconfig role setting\n"); -- return -EINVAL; -+ status = -EINVAL; -+ goto fail0; - } - - /* allocate */ - musb = allocate_instance(dev, plat->config, ctrl); -- if (!musb) -- return -ENOMEM; -+ if (!musb) { -+ status = -ENOMEM; -+ goto fail0; -+ } - - spin_lock_init(&musb->lock); - musb->board_mode = plat->mode; -@@ -1925,7 +1930,7 @@ bad_config: - if (IS_ERR(musb->clock)) { - status = PTR_ERR(musb->clock); - musb->clock = NULL; -- goto fail; -+ goto fail1; - } - } - -@@ -1944,12 +1949,12 @@ bad_config: - */ - musb->isr = generic_interrupt; - status = musb_platform_init(musb); -- - if (status < 0) -- goto fail; -+ goto fail2; -+ - if (!musb->isr) { - status = -ENODEV; -- goto fail2; -+ goto fail3; - } - - #ifndef CONFIG_MUSB_PIO_ONLY -@@ -1975,7 +1980,7 @@ bad_config: - ? MUSB_CONTROLLER_MHDRC - : MUSB_CONTROLLER_HDRC, musb); - if (status < 0) -- goto fail2; -+ goto fail3; - - #ifdef CONFIG_USB_MUSB_OTG - setup_timer(&musb->otg_timer, musb_otg_timer_func, (unsigned long) musb); -@@ -1988,7 +1993,7 @@ bad_config: - if (request_irq(nIrq, musb->isr, 0, dev_name(dev), musb)) { - dev_err(dev, "request_irq %d failed!\n", nIrq); - status = -ENODEV; -- goto fail2; -+ goto fail3; - } - musb->nIrq = nIrq; - /* FIXME this handles wakeup irqs wrong */ -@@ -2050,12 +2055,12 @@ bad_config: - - } - if (status < 0) -- goto fail2; -+ goto fail3; - - #ifdef CONFIG_SYSFS - status = sysfs_create_group(&musb->controller->kobj, &musb_attr_group); - if (status) -- goto fail2; -+ goto fail4; - #endif - - dev_info(dev, "USB %s mode controller at %p using %s, IRQ %d\n", -@@ -2072,17 +2077,29 @@ bad_config: - - return 0; - --fail2: -+fail4: -+ if (!is_otg_enabled(musb) && is_host_enabled(musb)) -+ usb_remove_hcd(musb_to_hcd(musb)); -+ else -+ musb_gadget_cleanup(musb); -+ -+fail3: -+ if (musb->irq_wake) -+ device_init_wakeup(dev, 0); - musb_platform_exit(musb); --fail: -- dev_err(musb->controller, -- "musb_init_controller failed with status %d\n", status); - -+fail2: - if (musb->clock) - clk_put(musb->clock); -- device_init_wakeup(dev, 0); -+ -+fail1: -+ dev_err(musb->controller, -+ "musb_init_controller failed with status %d\n", status); -+ - musb_free(musb); - -+fail0: -+ - return status; - - } diff --git a/usb.current/usb-cdc-acm-add-another-device-quirk.patch b/usb.current/usb-cdc-acm-add-another-device-quirk.patch deleted file mode 100644 index 0cb12226e16270..00000000000000 --- a/usb.current/usb-cdc-acm-add-another-device-quirk.patch +++ /dev/null @@ -1,28 +0,0 @@ -From nelson@crynwr.com Mon Apr 26 13:58:57 2010 -From: Russ Nelson <nelson@crynwr.com> -Date: Wed, 21 Apr 2010 23:07:03 -0400 -Subject: USB: cdc-acm: add another device quirk -To: Greg KH <greg@kroah.com> -Message-ID: <19407.48471.369227.783932@desk.crynwr.com> - -The Maretron USB100 needs this quirk in order to work properly. - -Signed-off-by: Russ Nelson <nelson@crynwr.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/class/cdc-acm.c | 3 +++ - 1 file changed, 3 insertions(+) - ---- a/drivers/usb/class/cdc-acm.c -+++ b/drivers/usb/class/cdc-acm.c -@@ -1542,6 +1542,9 @@ static const struct usb_device_id acm_id - { USB_DEVICE(0x1bbb, 0x0003), /* Alcatel OT-I650 */ - .driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */ - }, -+ { USB_DEVICE(0x1576, 0x03b1), /* Maretron USB100 */ -+ .driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */ -+ }, - - /* Nokia S60 phones expose two ACM channels. The first is - * a modem and is picked up by the standard AT-command diff --git a/usb.current/usb-don-t-choose-configs-with-no-interfaces.patch b/usb.current/usb-don-t-choose-configs-with-no-interfaces.patch deleted file mode 100644 index e0c4954e2a3d62..00000000000000 --- a/usb.current/usb-don-t-choose-configs-with-no-interfaces.patch +++ /dev/null @@ -1,36 +0,0 @@ -From stern@rowland.harvard.edu Mon Apr 26 14:00:33 2010 -From: Alan Stern <stern@rowland.harvard.edu> -Date: Tue, 20 Apr 2010 10:40:59 -0400 (EDT) -Subject: USB: don't choose configs with no interfaces -To: Greg KH <greg@kroah.com> -Cc: Andrew Victor <avictor.za@gmail.com> -Message-ID: <Pine.LNX.4.44L0.1004201037590.1837-100000@iolanthe.rowland.org> - - -This patch (as1372) fixes a bug in the routine that chooses the -default configuration to install when a new USB device is detected. -The algorithm is supposed to look for a config whose first interface -is for a non-vendor-specific class. But the way it's currently -written, it will also accept a config with no interfaces at all, which -is not very useful. (Believe it or not, such things do exist.) - -Signed-off-by: Alan Stern <stern@rowland.harvard.edu> -Tested-by: Andrew Victor <avictor.za@gmail.com> -Cc: stable <stable@kernel.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/core/generic.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/usb/core/generic.c -+++ b/drivers/usb/core/generic.c -@@ -120,7 +120,7 @@ int usb_choose_configuration(struct usb_ - * than a vendor-specific driver. */ - else if (udev->descriptor.bDeviceClass != - USB_CLASS_VENDOR_SPEC && -- (!desc || desc->bInterfaceClass != -+ (desc && desc->bInterfaceClass != - USB_CLASS_VENDOR_SPEC)) { - best = c; - break; diff --git a/usb.current/usb-fix-build-on-omaps-if-config_pm_runtime-is-not-set.patch b/usb.current/usb-fix-build-on-omaps-if-config_pm_runtime-is-not-set.patch deleted file mode 100644 index 308ef6a2330e25..00000000000000 --- a/usb.current/usb-fix-build-on-omaps-if-config_pm_runtime-is-not-set.patch +++ /dev/null @@ -1,46 +0,0 @@ -From gadiyar@ti.com Wed Apr 28 12:36:54 2010 -From: Anand Gadiyar <gadiyar@ti.com> -Date: Mon, 29 Mar 2010 16:54:51 +0530 -Subject: USB: fix build on OMAPs if CONFIG_PM_RUNTIME is not set -To: linux-usb@vger.kernel.org, Greg KH <gregkh@suse.de> -Cc: Anand Gadiyar <gadiyar@ti.com>, Michal Marek <mmarek@suse.cz>, Tony Lindgren <tony@atomide.com>, Alan Stern <stern@rowland.harvard.edu> -Message-ID: <1269861891-25841-1-git-send-email-gadiyar@ti.com> - - -With patch as1329 (USB: convert to the runtime PM framework), -we make USB_SUSPEND depend on PM_RUNTIME instead of CONFIG_PM. - -Also, CONFIG_USB_OTG selects CONFIG_USB_SUSPEND. - -If PM_RUNTIME is not enabled, and we try to enable USB_OTG, -we will end up with CONFIG_USB_SUSPEND selected. This is -due to a known bug with the select statement. - -This makes the build break on various OMAP configs (which -have CONFIG_USB_OTG set by default, but do not yet have -CONFIG_PM_RUNTIME enabled). - -Avoid this by changing the logic for CONFIG_USB_OTG from -"select USB_SUSPEND" to "depends on USB_SUSPEND" - -Signed-off-by: Anand Gadiyar <gadiyar@ti.com> -CC: Michal Marek <mmarek@suse.cz> -CC: Tony Lindgren <tony@atomide.com> -CC: Alan Stern <stern@rowland.harvard.edu> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/core/Kconfig | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/usb/core/Kconfig -+++ b/drivers/usb/core/Kconfig -@@ -109,7 +109,7 @@ config USB_SUSPEND - config USB_OTG - bool - depends on USB && EXPERIMENTAL -- select USB_SUSPEND -+ depends on USB_SUSPEND - default n - - diff --git a/usb.current/usb-fix-testing-the-wrong-variable-in-fs_create_by_name.patch b/usb.current/usb-fix-testing-the-wrong-variable-in-fs_create_by_name.patch deleted file mode 100644 index 85cc54bdaf19b8..00000000000000 --- a/usb.current/usb-fix-testing-the-wrong-variable-in-fs_create_by_name.patch +++ /dev/null @@ -1,40 +0,0 @@ -From error27@gmail.com Mon Apr 26 13:58:24 2010 -From: Dan Carpenter <error27@gmail.com> -Date: Thu, 22 Apr 2010 12:00:52 +0200 -Subject: USB: fix testing the wrong variable in fs_create_by_name() -To: Greg Kroah-Hartman <gregkh@suse.de> -Cc: Alessio Igor Bogani <abogani@texware.it>, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org -Message-ID: <20100422100052.GT29647@bicker> -Content-Disposition: inline - - -There is a typo here. We should be testing "*dentry" which was just -assigned instead of "dentry". This could result in dereferencing an -ERR_PTR inside either usbfs_mkdir() or usbfs_create(). - -Signed-off-by: Dan Carpenter <error27@gmail.com> -Cc: stable <stable@kernel.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/core/inode.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/drivers/usb/core/inode.c -+++ b/drivers/usb/core/inode.c -@@ -515,13 +515,13 @@ static int fs_create_by_name (const char - *dentry = NULL; - mutex_lock(&parent->d_inode->i_mutex); - *dentry = lookup_one_len(name, parent, strlen(name)); -- if (!IS_ERR(dentry)) { -+ if (!IS_ERR(*dentry)) { - if ((mode & S_IFMT) == S_IFDIR) - error = usbfs_mkdir (parent->d_inode, *dentry, mode); - else - error = usbfs_create (parent->d_inode, *dentry, mode); - } else -- error = PTR_ERR(dentry); -+ error = PTR_ERR(*dentry); - mutex_unlock(&parent->d_inode->i_mutex); - - return error; diff --git a/usb.current/usb-fix-tusb6010-for-dma-api.patch b/usb.current/usb-fix-tusb6010-for-dma-api.patch deleted file mode 100644 index a9a7f96660108a..00000000000000 --- a/usb.current/usb-fix-tusb6010-for-dma-api.patch +++ /dev/null @@ -1,115 +0,0 @@ -From 0eb7eef01c52f25a7d22c9612ccbd89368941b95 Mon Sep 17 00:00:00 2001 -From: Tony Lindgren <tony@atomide.com> -Date: Fri, 23 Apr 2010 17:41:15 -0700 -Subject: usb: Fix tusb6010 for DMA API - -Commit 18eabe2347ae7a11b3db768695913724166dfb0e introduced -DMA buffer ownership. Fix tusb6010 accordingly. To compile, -also dummy musb_platform_save and restore functions need to -be added. - -Also change the order of musb_read_fifo() to happen after -dma_cache_maint to have the DMA operations completed before -moving the remaining unaligned bytes with PIO. The DMA -access and PIO touch different areas of the FIFO, so this -change only makes the code a bit easier to follow. - -Tested on n810 and g_ether with variable size ping test. -The test seems to fail for some ping sizes, but that seems to -be a different problem. - -Signed-off-by: Tony Lindgren <tony@atomide.com> -Acked-by: Felipe Balbi <felipe.balbi@nokia.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- a/drivers/usb/musb/tusb6010.c -+++ b/drivers/usb/musb/tusb6010.c -@@ -29,6 +29,19 @@ static void tusb_source_power(struct musb *musb, int is_on); - #define TUSB_REV_MAJOR(reg_val) ((reg_val >> 4) & 0xf) - #define TUSB_REV_MINOR(reg_val) (reg_val & 0xf) - -+#ifdef CONFIG_PM -+/* REVISIT: These should be only needed if somebody implements off idle */ -+void musb_platform_save_context(struct musb *musb, -+ struct musb_context_registers *musb_context) -+{ -+} -+ -+void musb_platform_restore_context(struct musb *musb, -+ struct musb_context_registers *musb_context) -+{ -+} -+#endif -+ - /* - * Checks the revision. We need to use the DMA register as 3.0 does not - * have correct versions for TUSB_PRCM_REV or TUSB_INT_CTRL_REV. -diff --git a/drivers/usb/musb/tusb6010_omap.c b/drivers/usb/musb/tusb6010_omap.c -index 5afa070..c061a88 100644 ---- a/drivers/usb/musb/tusb6010_omap.c -+++ b/drivers/usb/musb/tusb6010_omap.c -@@ -39,7 +39,7 @@ struct tusb_omap_dma_ch { - - struct tusb_omap_dma *tusb_dma; - -- void __iomem *dma_addr; -+ dma_addr_t dma_addr; - - u32 len; - u16 packet_sz; -@@ -126,6 +126,7 @@ static void tusb_omap_dma_cb(int lch, u16 ch_status, void *data) - struct tusb_omap_dma_ch *chdat = to_chdat(channel); - struct tusb_omap_dma *tusb_dma = chdat->tusb_dma; - struct musb *musb = chdat->musb; -+ struct device *dev = musb->controller; - struct musb_hw_ep *hw_ep = chdat->hw_ep; - void __iomem *ep_conf = hw_ep->conf; - void __iomem *mbase = musb->mregs; -@@ -173,13 +174,15 @@ static void tusb_omap_dma_cb(int lch, u16 ch_status, void *data) - DBG(3, "Using PIO for remaining %lu bytes\n", pio); - buf = phys_to_virt((u32)chdat->dma_addr) + chdat->transfer_len; - if (chdat->tx) { -- dma_cache_maint(phys_to_virt((u32)chdat->dma_addr), -- chdat->transfer_len, DMA_TO_DEVICE); -+ dma_unmap_single(dev, chdat->dma_addr, -+ chdat->transfer_len, -+ DMA_TO_DEVICE); - musb_write_fifo(hw_ep, pio, buf); - } else { -+ dma_unmap_single(dev, chdat->dma_addr, -+ chdat->transfer_len, -+ DMA_FROM_DEVICE); - musb_read_fifo(hw_ep, pio, buf); -- dma_cache_maint(phys_to_virt((u32)chdat->dma_addr), -- chdat->transfer_len, DMA_FROM_DEVICE); - } - channel->actual_len += pio; - } -@@ -224,6 +227,7 @@ static int tusb_omap_dma_program(struct dma_channel *channel, u16 packet_sz, - struct tusb_omap_dma_ch *chdat = to_chdat(channel); - struct tusb_omap_dma *tusb_dma = chdat->tusb_dma; - struct musb *musb = chdat->musb; -+ struct device *dev = musb->controller; - struct musb_hw_ep *hw_ep = chdat->hw_ep; - void __iomem *mbase = musb->mregs; - void __iomem *ep_conf = hw_ep->conf; -@@ -299,14 +303,16 @@ static int tusb_omap_dma_program(struct dma_channel *channel, u16 packet_sz, - chdat->packet_sz = packet_sz; - chdat->len = len; - channel->actual_len = 0; -- chdat->dma_addr = (void __iomem *)dma_addr; -+ chdat->dma_addr = dma_addr; - channel->status = MUSB_DMA_STATUS_BUSY; - - /* Since we're recycling dma areas, we need to clean or invalidate */ - if (chdat->tx) -- dma_cache_maint(phys_to_virt(dma_addr), len, DMA_TO_DEVICE); -+ dma_map_single(dev, phys_to_virt(dma_addr), len, -+ DMA_TO_DEVICE); - else -- dma_cache_maint(phys_to_virt(dma_addr), len, DMA_FROM_DEVICE); -+ dma_map_single(dev, phys_to_virt(dma_addr), len, -+ DMA_FROM_DEVICE); - - /* Use 16-bit transfer if dma_addr is not 32-bit aligned */ - if ((dma_addr & 0x3) == 0) { diff --git a/usb.current/usb-gadget-s3c-hsotg-add-missing-unlock.patch b/usb.current/usb-gadget-s3c-hsotg-add-missing-unlock.patch deleted file mode 100644 index 5749cba924563f..00000000000000 --- a/usb.current/usb-gadget-s3c-hsotg-add-missing-unlock.patch +++ /dev/null @@ -1,67 +0,0 @@ -From julia@diku.dk Wed Apr 28 12:38:12 2010 -From: Julia Lawall <julia@diku.dk> -Date: Mon, 29 Mar 2010 17:36:44 +0200 (CEST) -Subject: USB: gadget: s3c-hsotg: Add missing unlock -To: David Brownell <dbrownell@users.sourceforge.net>, Greg Kroah-Hartman <gregkh@suse.de>, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org -Message-ID: <Pine.LNX.4.64.1003291736250.21896@ask.diku.dk> - - -From: Julia Lawall <julia@diku.dk> - -In an error handling case the lock is not unlocked. The return is -converted to a goto, to share the unlock at the end of the function. - -A simplified version of the semantic patch that finds this problem is as -follows: (http://coccinelle.lip6.fr/) - -// <smpl> -@r exists@ -expression E1; -identifier f; -@@ - -f (...) { <+... -* spin_lock_irqsave (E1,...); -... when != E1 -* return ...; -...+> } -// </smpl> - -Signed-off-by: Julia Lawall <julia@diku.dk> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/gadget/s3c-hsotg.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - ---- a/drivers/usb/gadget/s3c-hsotg.c -+++ b/drivers/usb/gadget/s3c-hsotg.c -@@ -2145,6 +2145,7 @@ static int s3c_hsotg_ep_enable(struct us - u32 epctrl; - u32 mps; - int dir_in; -+ int ret = 0; - - dev_dbg(hsotg->dev, - "%s: ep %s: a 0x%02x, attr 0x%02x, mps 0x%04x, intr %d\n", -@@ -2196,7 +2197,8 @@ static int s3c_hsotg_ep_enable(struct us - switch (desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) { - case USB_ENDPOINT_XFER_ISOC: - dev_err(hsotg->dev, "no current ISOC support\n"); -- return -EINVAL; -+ ret = -EINVAL; -+ goto out; - - case USB_ENDPOINT_XFER_BULK: - epctrl |= S3C_DxEPCTL_EPType_Bulk; -@@ -2235,8 +2237,9 @@ static int s3c_hsotg_ep_enable(struct us - /* enable the endpoint interrupt */ - s3c_hsotg_ctrl_epint(hsotg, index, dir_in, 1); - -+out: - spin_unlock_irqrestore(&hs_ep->lock, flags); -- return 0; -+ return ret; - } - - static int s3c_hsotg_ep_disable(struct usb_ep *ep) diff --git a/usb.current/usb-ohci-at91-fix-power-management-hanging.patch b/usb.current/usb-ohci-at91-fix-power-management-hanging.patch deleted file mode 100644 index 0d2633c48c5f61..00000000000000 --- a/usb.current/usb-ohci-at91-fix-power-management-hanging.patch +++ /dev/null @@ -1,36 +0,0 @@ -From nicolas.ferre@atmel.com Thu Apr 29 16:28:30 2010 -From: Nicolas Ferre <nicolas.ferre@atmel.com> -Date: Wed, 28 Apr 2010 13:45:40 +0200 -Subject: USB: ohci-at91: fix power management hanging -To: linux-usb@vger.kernel.org, avictor.za@gmail.com, david-b@pacbell.net -Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Patrice Vilchez <patrice.vilchez@atmel.com> -Message-ID: <1272455140-32686-1-git-send-email-nicolas.ferre@atmel.com> - - -From: Patrice Vilchez <patrice.vilchez@atmel.com> - -A hanging has been detected in ohci-at91 while going in suspend to ram. This is -due to asynchronous operations between ohci reset and ohci clocks shutdown. -This patch adds the reading of the control register between the reset of the -ohci and clocks stop. This "flush the writes" idea was taken from ohci-hcd.c -file (ohci_shutdown() function). - -Signed-off-by: Patrice Vilchez <patrice.vilchez@atmel.com> -Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/host/ohci-at91.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/drivers/usb/host/ohci-at91.c -+++ b/drivers/usb/host/ohci-at91.c -@@ -331,6 +331,8 @@ ohci_hcd_at91_drv_suspend(struct platfor - */ - if (at91_suspend_entering_slow_clock()) { - ohci_usb_reset (ohci); -+ /* flush the writes */ -+ (void) ohci_readl (ohci, &ohci->regs->control); - at91_stop_clock(); - } - diff --git a/usb.current/usb-ohci-don-t-look-at-the-root-hub-to-get-the-number-of-ports.patch b/usb.current/usb-ohci-don-t-look-at-the-root-hub-to-get-the-number-of-ports.patch deleted file mode 100644 index 0af05e3523d070..00000000000000 --- a/usb.current/usb-ohci-don-t-look-at-the-root-hub-to-get-the-number-of-ports.patch +++ /dev/null @@ -1,33 +0,0 @@ -From stern@rowland.harvard.edu Mon Apr 26 14:02:12 2010 -From: Alan Stern <stern@rowland.harvard.edu> -Date: Tue, 20 Apr 2010 10:37:57 -0400 (EDT) -Subject: USB: OHCI: don't look at the root hub to get the number of ports -To: Greg KH <greg@kroah.com> -Message-ID: <Pine.LNX.4.44L0.1004201036020.1837-100000@iolanthe.rowland.org> - - -This patch (as1371) fixes a small bug in ohci-hcd. The HCD already -knows how many ports the controller has; there's no need to go looking -at the root hub's usb_device structure to find out. Especially since -the root hub's maxchild value is set correctly only while the root hub -is bound to the hub driver. - -Signed-off-by: Alan Stern <stern@rowland.harvard.edu> -Cc: stable <stable@kernel.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/host/ohci-hub.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/usb/host/ohci-hub.c -+++ b/drivers/usb/host/ohci-hub.c -@@ -697,7 +697,7 @@ static int ohci_hub_control ( - u16 wLength - ) { - struct ohci_hcd *ohci = hcd_to_ohci (hcd); -- int ports = hcd_to_bus (hcd)->root_hub->maxchild; -+ int ports = ohci->num_ports; - u32 temp; - int retval = 0; - diff --git a/usb.current/usb-option-add-id-for-zte-mf-330.patch b/usb.current/usb-option-add-id-for-zte-mf-330.patch deleted file mode 100644 index 8e47ade94a0286..00000000000000 --- a/usb.current/usb-option-add-id-for-zte-mf-330.patch +++ /dev/null @@ -1,40 +0,0 @@ -From linux@dominikbrodowski.net Mon Apr 26 14:04:36 2010 -From: Dominik Brodowski <linux@dominikbrodowski.net> -Date: Wed, 14 Apr 2010 21:36:42 +0200 -Subject: USB: option: add ID for ZTE MF 330 -To: Paweł Drobek <pawel.drobek@gmail.com>, Matthias Urlichs <smurf@smurf.noris.de>, Greg Kroah-Hartman <gregkh@suse.de> -Message-ID: <20100414193642.GL30734@comet.dominikbrodowski.net> - - -Based on the information provided for by Paweł Drobek, add -a second vendor ID and the correct product ID for ZTE MF 330. - -Reported-by: Paweł Drobek <pawel.drobek@gmail.com> -Signed-off: Dominik Brodowski <linux@dominikbrodowski.net> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/serial/option.c | 5 +++++ - 1 file changed, 5 insertions(+) - ---- a/drivers/usb/serial/option.c -+++ b/drivers/usb/serial/option.c -@@ -306,6 +306,10 @@ static int option_resume(struct usb_ser - #define ZTE_PRODUCT_AC8710 0xfff1 - #define ZTE_PRODUCT_AC2726 0xfff5 - -+/* ZTE PRODUCTS -- alternate vendor ID */ -+#define ZTE_VENDOR_ID2 0x1d6b -+#define ZTE_PRODUCT_MF_330 0x0002 -+ - #define BENQ_VENDOR_ID 0x04a5 - #define BENQ_PRODUCT_H10 0x4068 - -@@ -679,6 +683,7 @@ static const struct usb_device_id option - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) }, -+ { USB_DEVICE(ZTE_VENDOR_ID2, ZTE_PRODUCT_MF_330) }, - { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) }, - { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) }, - { USB_DEVICE(ALINK_VENDOR_ID, DLINK_PRODUCT_DWM_652_U5) }, /* Yes, ALINK_VENDOR_ID */ diff --git a/usb.current/usb-oxu210hp-release-spinlock-on-error-path.patch b/usb.current/usb-oxu210hp-release-spinlock-on-error-path.patch deleted file mode 100644 index 59c1f2e5b4620a..00000000000000 --- a/usb.current/usb-oxu210hp-release-spinlock-on-error-path.patch +++ /dev/null @@ -1,38 +0,0 @@ -From error27@gmail.com Wed Apr 28 12:35:39 2010 -From: Dan Carpenter <error27@gmail.com> -Date: Mon, 29 Mar 2010 12:01:27 +0300 -Subject: USB: oxu210hp: release spinlock on error path -To: Greg Kroah-Hartman <gregkh@suse.de> -Cc: Anand Gadiyar <gadiyar@ti.com>, David Brownell <dbrownell@users.sourceforge.net>, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org -Message-ID: <20100329090127.GE5069@bicker> -Content-Disposition: inline - - -Smatch complained about this missing spinlock. - -Signed-off-by: Dan Carpenter <error27@gmail.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/host/oxu210hp-hcd.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - ---- a/drivers/usb/host/oxu210hp-hcd.c -+++ b/drivers/usb/host/oxu210hp-hcd.c -@@ -660,13 +660,13 @@ static struct ehci_qh *oxu_qh_alloc(stru - if (qh->dummy == NULL) { - oxu_dbg(oxu, "no dummy td\n"); - oxu->qh_used[i] = 0; -- -- return NULL; -+ qh = NULL; -+ goto unlock; - } - - oxu->qh_used[i] = 1; - } -- -+unlock: - spin_unlock(&oxu->mem_lock); - - return qh; diff --git a/usb.current/usb-rename-usb_buffer_alloc-and-usb_buffer_free.patch b/usb.current/usb-rename-usb_buffer_alloc-and-usb_buffer_free.patch deleted file mode 100644 index eca5ff1e24e410..00000000000000 --- a/usb.current/usb-rename-usb_buffer_alloc-and-usb_buffer_free.patch +++ /dev/null @@ -1,121 +0,0 @@ -From foo@baz Thu Apr 29 15:09:23 PDT 2010 -Date: Mon, 12 Apr 2010 13:17:25 +0200 -To: Greg KH <greg@kroah.com> -From: Daniel Mack <daniel@caiaq.de> -Subject: USB: rename usb_buffer_alloc() and usb_buffer_free() - -For more clearance what the functions actually do, - - usb_buffer_alloc() is renamed to usb_alloc_coherent() - usb_buffer_free() is renamed to usb_free_coherent() - -They should only be used in code which really needs DMA coherency. - -[added compatibility macros so we can convert things easier - gregkh] - -Signed-off-by: Daniel Mack <daniel@caiaq.de> -Cc: Alan Stern <stern@rowland.harvard.edu> -Cc: Pedro Ribeiro <pedrib@gmail.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/core/usb.c | 20 ++++++++++---------- - include/linux/usb.h | 18 +++++++++++++++--- - 2 files changed, 25 insertions(+), 13 deletions(-) - ---- a/drivers/usb/core/usb.c -+++ b/drivers/usb/core/usb.c -@@ -718,7 +718,7 @@ int __usb_get_extra_descriptor(char *buf - EXPORT_SYMBOL_GPL(__usb_get_extra_descriptor); - - /** -- * usb_buffer_alloc - allocate dma-consistent buffer for URB_NO_xxx_DMA_MAP -+ * usb_alloc_coherent - allocate dma-consistent buffer for URB_NO_xxx_DMA_MAP - * @dev: device the buffer will be used with - * @size: requested buffer size - * @mem_flags: affect whether allocation may block -@@ -737,30 +737,30 @@ EXPORT_SYMBOL_GPL(__usb_get_extra_descri - * architectures where CPU caches are not DMA-coherent. On systems without - * bus-snooping caches, these buffers are uncached. - * -- * When the buffer is no longer used, free it with usb_buffer_free(). -+ * When the buffer is no longer used, free it with usb_free_coherent(). - */ --void *usb_buffer_alloc(struct usb_device *dev, size_t size, gfp_t mem_flags, -- dma_addr_t *dma) -+void *usb_alloc_coherent(struct usb_device *dev, size_t size, gfp_t mem_flags, -+ dma_addr_t *dma) - { - if (!dev || !dev->bus) - return NULL; - return hcd_buffer_alloc(dev->bus, size, mem_flags, dma); - } --EXPORT_SYMBOL_GPL(usb_buffer_alloc); -+EXPORT_SYMBOL_GPL(usb_alloc_coherent); - - /** -- * usb_buffer_free - free memory allocated with usb_buffer_alloc() -+ * usb_free_coherent - free memory allocated with usb_alloc_coherent() - * @dev: device the buffer was used with - * @size: requested buffer size - * @addr: CPU address of buffer - * @dma: DMA address of buffer - * - * This reclaims an I/O buffer, letting it be reused. The memory must have -- * been allocated using usb_buffer_alloc(), and the parameters must match -+ * been allocated using usb_alloc_coherent(), and the parameters must match - * those provided in that allocation request. - */ --void usb_buffer_free(struct usb_device *dev, size_t size, void *addr, -- dma_addr_t dma) -+void usb_free_coherent(struct usb_device *dev, size_t size, void *addr, -+ dma_addr_t dma) - { - if (!dev || !dev->bus) - return; -@@ -768,7 +768,7 @@ void usb_buffer_free(struct usb_device * - return; - hcd_buffer_free(dev->bus, size, addr, dma); - } --EXPORT_SYMBOL_GPL(usb_buffer_free); -+EXPORT_SYMBOL_GPL(usb_free_coherent); - - /** - * usb_buffer_map - create DMA mapping(s) for an urb ---- a/include/linux/usb.h -+++ b/include/linux/usb.h -@@ -1085,7 +1085,7 @@ typedef void (*usb_complete_t)(struct ur - * Alternatively, drivers may pass the URB_NO_xxx_DMA_MAP transfer flags, - * which tell the host controller driver that no such mapping is needed since - * the device driver is DMA-aware. For example, a device driver might -- * allocate a DMA buffer with usb_buffer_alloc() or call usb_buffer_map(). -+ * allocate a DMA buffer with usb_alloc_coherent() or call usb_buffer_map(). - * When these transfer flags are provided, host controller drivers will - * attempt to use the dma addresses found in the transfer_dma and/or - * setup_dma fields rather than determining a dma address themselves. -@@ -1366,11 +1366,23 @@ static inline int usb_urb_dir_out(struct - return (urb->transfer_flags & URB_DIR_MASK) == URB_DIR_OUT; - } - --void *usb_buffer_alloc(struct usb_device *dev, size_t size, -+void *usb_alloc_coherent(struct usb_device *dev, size_t size, - gfp_t mem_flags, dma_addr_t *dma); --void usb_buffer_free(struct usb_device *dev, size_t size, -+void usb_free_coherent(struct usb_device *dev, size_t size, - void *addr, dma_addr_t dma); - -+/* Compatible macros while we switch over */ -+static inline void *usb_buffer_alloc(struct usb_device *dev, size_t size, -+ gfp_t mem_flags, dma_addr_t *dma) -+{ -+ return usb_alloc_coherent(dev, size, mem_flags, dma); -+} -+static inline void usb_buffer_free(struct usb_device *dev, size_t size, -+ void *addr, dma_addr_t dma) -+{ -+ return usb_free_coherent(dev, size, addr, dma); -+} -+ - #if 0 - struct urb *usb_buffer_map(struct urb *urb); - void usb_buffer_dmasync(struct urb *urb); diff --git a/usb.current/usb-serial-option-add-cinterion-device-id.patch b/usb.current/usb-serial-option-add-cinterion-device-id.patch deleted file mode 100644 index e06a85dd4cf6c1..00000000000000 --- a/usb.current/usb-serial-option-add-cinterion-device-id.patch +++ /dev/null @@ -1,34 +0,0 @@ -From foo@baz Tue Apr 27 09:38:51 PDT 2010 -Date: Tue, 27 Apr 2010 09:38:51 -0700 -To: Greg KH <greg@kroah.com> -From: Greg Kroah-Hartman <gregkh@suse.de> -Subject: USB: serial: option: add cinterion device id - -This adds a device id for a Cinterion device. - -Reported-by: John Race <John.Race@roscom.co.uk> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/serial/option.c | 3 +++ - 1 file changed, 3 insertions(+) - ---- a/drivers/usb/serial/option.c -+++ b/drivers/usb/serial/option.c -@@ -378,6 +378,8 @@ static int option_resume(struct usb_ser - #define HAIER_VENDOR_ID 0x201e - #define HAIER_PRODUCT_CE100 0x2009 - -+#define CINTERION_VENDOR_ID 0x0681 -+ - /* some devices interfaces need special handling due to a number of reasons */ - enum option_blacklist_reason { - OPTION_BLACKLIST_NONE = 0, -@@ -723,6 +725,7 @@ static const struct usb_device_id option - { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1011)}, - { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1012)}, - -+ { USB_DEVICE(CINTERION_VENDOR_ID, 0x0047) }, - { } /* Terminating entry */ - }; - MODULE_DEVICE_TABLE(usb, option_ids); diff --git a/usb.current/usb-serial-option-zteac8710-support-with-device-id-0xffff.patch b/usb.current/usb-serial-option-zteac8710-support-with-device-id-0xffff.patch deleted file mode 100644 index 289c8f5d9c5a0e..00000000000000 --- a/usb.current/usb-serial-option-zteac8710-support-with-device-id-0xffff.patch +++ /dev/null @@ -1,34 +0,0 @@ -From maheshkuruganti@gmail.com Mon Apr 26 14:08:10 2010 -From: Mahesh Kuruganti <maheshkuruganti@gmail.com> -Date: Mon, 12 Apr 2010 22:37:02 +0530 -Subject: USB: serial: option: ZTEAC8710 Support with Device ID 0xffff -To: Greg KH <greg@kroah.com> -Message-ID: <h2med984c71004121007s806428a9za0d724362f8cc83e@mail.gmail.com> - -PATCH TO EXTEND SUPPORT TO AC8710 WITH 0xFFFF Product ID. - -Signed-off-by: Mahesh Kuruganti <maheshkuruganti@gmail.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/serial/option.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/drivers/usb/serial/option.c -+++ b/drivers/usb/serial/option.c -@@ -305,6 +305,7 @@ static int option_resume(struct usb_ser - #define ZTE_PRODUCT_CDMA_TECH 0xfffe - #define ZTE_PRODUCT_AC8710 0xfff1 - #define ZTE_PRODUCT_AC2726 0xfff5 -+#define ZTE_PRODUCT_AC8710T 0xffff - - /* ZTE PRODUCTS -- alternate vendor ID */ - #define ZTE_VENDOR_ID2 0x1d6b -@@ -683,6 +684,7 @@ static const struct usb_device_id option - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) }, -+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710T, 0xff, 0xff, 0xff) }, - { USB_DEVICE(ZTE_VENDOR_ID2, ZTE_PRODUCT_MF_330) }, - { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) }, - { USB_DEVICE(DLINK_VENDOR_ID, DLINK_PRODUCT_DWM_652) }, diff --git a/usb.current/usb-serial-pl2303-hybrid-reader-uniform-hcr331.patch b/usb.current/usb-serial-pl2303-hybrid-reader-uniform-hcr331.patch deleted file mode 100644 index 9e610ee3433337..00000000000000 --- a/usb.current/usb-serial-pl2303-hybrid-reader-uniform-hcr331.patch +++ /dev/null @@ -1,43 +0,0 @@ -From s.contini@oltrelinux.com Mon Apr 26 14:05:55 2010 -From: Simone Contini <s.contini@oltrelinux.com> -Date: Mon, 12 Apr 2010 23:25:10 +0200 -Subject: USB: serial: pl2303: Hybrid reader Uniform HCR331 -To: greg@kroah.com -Message-ID: <v2z6fad60871004121425kde1fb1fco8c005d55544bee8b@mail.gmail.com> - - -I tried a magnetic stripe reader -(http://www.kimaldi.com/kimaldi_eng/productos/lectores_de_tarjetas/lectores_tarjeta_chip_y_dni/lector_hibrido_uniform_hcr_331) -and I see that it is interfaced with a PL2303. I wrote a patch to use -your driver which simply adds the product ID for the device and it -seems working fine. - - -From: Simone Contini <s.contini@oltrelinux.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/serial/pl2303.c | 1 + - drivers/usb/serial/pl2303.h | 1 + - 2 files changed, 2 insertions(+) - ---- a/drivers/usb/serial/pl2303.c -+++ b/drivers/usb/serial/pl2303.c -@@ -59,6 +59,7 @@ static const struct usb_device_id id_tab - { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_ALDIGA) }, - { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_MMX) }, - { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_GPRS) }, -+ { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_HCR331) }, - { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) }, - { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) }, - { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) }, ---- a/drivers/usb/serial/pl2303.h -+++ b/drivers/usb/serial/pl2303.h -@@ -20,6 +20,7 @@ - #define PL2303_PRODUCT_ID_ALDIGA 0x0611 - #define PL2303_PRODUCT_ID_MMX 0x0612 - #define PL2303_PRODUCT_ID_GPRS 0x0609 -+#define PL2303_PRODUCT_ID_HCR331 0x331a - - #define ATEN_VENDOR_ID 0x0557 - #define ATEN_VENDOR_ID2 0x0547 diff --git a/usb.current/usb-sl811-hcd-fix-device-disconnect.patch b/usb.current/usb-sl811-hcd-fix-device-disconnect.patch deleted file mode 100644 index 316725b0f7df59..00000000000000 --- a/usb.current/usb-sl811-hcd-fix-device-disconnect.patch +++ /dev/null @@ -1,44 +0,0 @@ -From vapier@gentoo.org Thu Apr 29 16:28:54 2010 -From: Mike Frysinger <vapier@gentoo.org> -Date: Wed, 28 Apr 2010 17:31:36 -0400 -Subject: USB: sl811-hcd: Fix device disconnect -To: linux-usb@vger.kernel.org, Greg Kroah-Hartman <gregkh@suse.de> -Cc: uclinux-dist-devel@blackfin.uclinux.org, Michael Hennerich <michael.hennerich@analog.com> -Message-ID: <1272490296-22583-1-git-send-email-vapier@gentoo.org> - - -From: Michael Hennerich <michael.hennerich@analog.com> - -A while ago I provided a patch that fixed device detection after device -removal (USB: sl811-hcd: Fix device disconnect). -Chris Brissette pointed out that the detection/removal counter method -to distinguish insert or remove my fail under certain conditions. -Latest SL811HS datasheet (Document 38-08008 Rev. *D) indicates that -bit 6 (SL11H_INTMASK_RD) of the Interrupt Status Register together with -bit 5 (SL11H_INTMASK_INSRMV) can be used to determine whether a device -has been inserted or removed. - -Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> -Signed-off-by: Mike Frysinger <vapier@gentoo.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/host/sl811-hcd.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - ---- a/drivers/usb/host/sl811-hcd.c -+++ b/drivers/usb/host/sl811-hcd.c -@@ -720,10 +720,10 @@ retry: - /* port status seems weird until after reset, so - * force the reset and make khubd clean up later. - */ -- if (sl811->stat_insrmv & 1) -- sl811->port1 |= 1 << USB_PORT_FEAT_CONNECTION; -- else -+ if (irqstat & SL11H_INTMASK_RD) - sl811->port1 &= ~(1 << USB_PORT_FEAT_CONNECTION); -+ else -+ sl811->port1 |= 1 << USB_PORT_FEAT_CONNECTION; - - sl811->port1 |= 1 << USB_PORT_FEAT_C_CONNECTION; - diff --git a/usb.current/usb-ti_usb-fix-printk-format-warning.patch b/usb.current/usb-ti_usb-fix-printk-format-warning.patch deleted file mode 100644 index 49c66ad3d6c51b..00000000000000 --- a/usb.current/usb-ti_usb-fix-printk-format-warning.patch +++ /dev/null @@ -1,32 +0,0 @@ -From randy.dunlap@oracle.com Thu Apr 29 13:13:38 2010 -From: Randy Dunlap <randy.dunlap@oracle.com> -Date: Thu, 15 Apr 2010 11:38:56 -0700 -Subject: USB: ti_usb: fix printk format warning -To: Stephen Rothwell <sfr@canb.auug.org.au>, linux-usb@vger.kernel.org, gregkh@suse.de -Message-ID: <20100415113856.45564d4f.randy.dunlap@oracle.com> - - -From: Randy Dunlap <randy.dunlap@oracle.com> - -Fix printk format warning in usbserial/ti_usb: - -drivers/usb/serial/ti_usb_3410_5052.c:1738: warning: format '%d' expects type 'int', but argument 5 has type 'size_t' - -Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/serial/ti_usb_3410_5052.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/usb/serial/ti_usb_3410_5052.c -+++ b/drivers/usb/serial/ti_usb_3410_5052.c -@@ -1735,7 +1735,7 @@ static int ti_download_firmware(struct t - return -ENOENT; - } - if (fw_p->size > TI_FIRMWARE_BUF_SIZE) { -- dev_err(&dev->dev, "%s - firmware too large %d \n", __func__, fw_p->size); -+ dev_err(&dev->dev, "%s - firmware too large %zu\n", __func__, fw_p->size); - return -ENOENT; - } - diff --git a/usb.current/usb-xhci-properly-set-endpoint-context-fields-for-periodic-eps.patch b/usb.current/usb-xhci-properly-set-endpoint-context-fields-for-periodic-eps.patch deleted file mode 100644 index d13fa353a397ff..00000000000000 --- a/usb.current/usb-xhci-properly-set-endpoint-context-fields-for-periodic-eps.patch +++ /dev/null @@ -1,145 +0,0 @@ -From sarah.a.sharp@linux.intel.com Mon Apr 26 14:03:39 2010 -From: Sarah Sharp <sarah.a.sharp@linux.intel.com> -Date: Fri, 16 Apr 2010 08:07:27 -0700 -Subject: USB: xhci: properly set endpoint context fields for periodic eps. -To: Greg KH <gregkh@suse.de> -Cc: <Libin.Yang@amd.com>, <Andiry.Xu@amd.com> -Message-ID: <20100416150727.GA5993@xanatos> -Content-Disposition: inline - - -For periodic endpoints, we must let the xHCI hardware know the maximum -payload an endpoint can transfer in one service interval. The xHCI -specification refers to this as the Maximum Endpoint Service Interval Time -Payload (Max ESIT Payload). This is used by the hardware for bandwidth -management and scheduling of packets. - -For SuperSpeed endpoints, the maximum is calculated by multiplying the max -packet size by the number of bursts and the number of opportunities to -transfer within a service interval (the Mult field of the SuperSpeed -Endpoint companion descriptor). Devices advertise this in the -wBytesPerInterval field of their SuperSpeed Endpoint Companion Descriptor. - -For high speed devices, this is taken by multiplying the max packet size by the -"number of additional transaction opportunities per microframe" (the high -bits of the wMaxPacketSize field in the endpoint descriptor). - -For FS/LS devices, this is just the max packet size. - -The other thing we must set in the endpoint context is the Average TRB -Length. This is supposed to be the average of the total bytes in the -transfer descriptor (TD), divided by the number of transfer request blocks -(TRBs) it takes to describe the TD. This gives the host controller an -indication of whether the driver will be enqueuing a scatter gather list -with many entries comprised of small buffers, or one contiguous buffer. - -It also takes into account the number of extra TRBs you need for every TD. -This includes No-op TRBs and Link TRBs used to link ring segments -together. Some drivers may choose to chain an Event Data TRB on the end -of every TD, thus increasing the average number of TRBs per TD. The Linux -xHCI driver does not use Event Data TRBs. - -In theory, if there was an API to allow drivers to state what their -bandwidth requirements are, we could set this field accurately. For now, -we set it to the same number as the Max ESIT payload. - -The Average TRB Length should also be set for bulk and control endpoints, -but I have no idea how to guess what it should be. - -Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> -Cc: stable <stable@kernel.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - - ---- - drivers/usb/host/xhci-mem.c | 51 ++++++++++++++++++++++++++++++++++++++++++++ - drivers/usb/host/xhci.h | 4 +++ - 2 files changed, 55 insertions(+) - ---- a/drivers/usb/host/xhci-mem.c -+++ b/drivers/usb/host/xhci-mem.c -@@ -625,6 +625,36 @@ static inline u32 xhci_get_endpoint_type - return type; - } - -+/* Return the maximum endpoint service interval time (ESIT) payload. -+ * Basically, this is the maxpacket size, multiplied by the burst size -+ * and mult size. -+ */ -+static inline u32 xhci_get_max_esit_payload(struct xhci_hcd *xhci, -+ struct usb_device *udev, -+ struct usb_host_endpoint *ep) -+{ -+ int max_burst; -+ int max_packet; -+ -+ /* Only applies for interrupt or isochronous endpoints */ -+ if (usb_endpoint_xfer_control(&ep->desc) || -+ usb_endpoint_xfer_bulk(&ep->desc)) -+ return 0; -+ -+ if (udev->speed == USB_SPEED_SUPER) { -+ if (ep->ss_ep_comp) -+ return ep->ss_ep_comp->desc.wBytesPerInterval; -+ xhci_warn(xhci, "WARN no SS endpoint companion descriptor.\n"); -+ /* Assume no bursts, no multiple opportunities to send. */ -+ return ep->desc.wMaxPacketSize; -+ } -+ -+ max_packet = ep->desc.wMaxPacketSize & 0x3ff; -+ max_burst = (ep->desc.wMaxPacketSize & 0x1800) >> 11; -+ /* A 0 in max burst means 1 transfer per ESIT */ -+ return max_packet * (max_burst + 1); -+} -+ - int xhci_endpoint_init(struct xhci_hcd *xhci, - struct xhci_virt_device *virt_dev, - struct usb_device *udev, -@@ -636,6 +666,7 @@ int xhci_endpoint_init(struct xhci_hcd * - struct xhci_ring *ep_ring; - unsigned int max_packet; - unsigned int max_burst; -+ u32 max_esit_payload; - - ep_index = xhci_get_endpoint_index(&ep->desc); - ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, ep_index); -@@ -703,6 +734,26 @@ int xhci_endpoint_init(struct xhci_hcd * - default: - BUG(); - } -+ max_esit_payload = xhci_get_max_esit_payload(xhci, udev, ep); -+ ep_ctx->tx_info = MAX_ESIT_PAYLOAD_FOR_EP(max_esit_payload); -+ -+ /* -+ * XXX no idea how to calculate the average TRB buffer length for bulk -+ * endpoints, as the driver gives us no clue how big each scatter gather -+ * list entry (or buffer) is going to be. -+ * -+ * For isochronous and interrupt endpoints, we set it to the max -+ * available, until we have new API in the USB core to allow drivers to -+ * declare how much bandwidth they actually need. -+ * -+ * Normally, it would be calculated by taking the total of the buffer -+ * lengths in the TD and then dividing by the number of TRBs in a TD, -+ * including link TRBs, No-op TRBs, and Event data TRBs. Since we don't -+ * use Event Data TRBs, and we don't chain in a link TRB on short -+ * transfers, we're basically dividing by 1. -+ */ -+ ep_ctx->tx_info |= AVG_TRB_LENGTH_FOR_EP(max_esit_payload); -+ - /* FIXME Debug endpoint context */ - return 0; - } ---- a/drivers/usb/host/xhci.h -+++ b/drivers/usb/host/xhci.h -@@ -609,6 +609,10 @@ struct xhci_ep_ctx { - #define MAX_PACKET_MASK (0xffff << 16) - #define MAX_PACKET_DECODED(p) (((p) >> 16) & 0xffff) - -+/* tx_info bitmasks */ -+#define AVG_TRB_LENGTH_FOR_EP(p) ((p) & 0xffff) -+#define MAX_ESIT_PAYLOAD_FOR_EP(p) (((p) & 0xffff) << 16) -+ - - /** - * struct xhci_input_control_context diff --git a/usb.current/usb-xhci-properly-set-the-mult-field-of-the-endpoint-context.patch b/usb.current/usb-xhci-properly-set-the-mult-field-of-the-endpoint-context.patch deleted file mode 100644 index 88e95dede16d5e..00000000000000 --- a/usb.current/usb-xhci-properly-set-the-mult-field-of-the-endpoint-context.patch +++ /dev/null @@ -1,61 +0,0 @@ -From sarah.a.sharp@linux.intel.com Mon Apr 26 14:02:36 2010 -From: Sarah Sharp <sarah.a.sharp@linux.intel.com> -Date: Fri, 16 Apr 2010 08:07:04 -0700 -Subject: USB: xhci: properly set the "Mult" field of the endpoint context. -To: Greg KH <gregkh@suse.de> -Cc: <Libin.Yang@amd.com>, <Andiry.Xu@amd.com> -Message-ID: <20100416150704.GA5986@xanatos> -Content-Disposition: inline - - -A SuperSpeed interrupt or isochronous endpoint can define the number of -"burst transactions" it can handle in a service interval. This is -indicated by the "Mult" bits in the bmAttributes of the SuperSpeed -Endpoint Companion Descriptor. For example, if it has a max packet size -of 1024, a max burst of 11, and a mult of 3, the host may send 33 -1024-byte packets in one service interval. - -We must tell the xHCI host controller the number of multiple service -opportunities (mults) the device can handle when the endpoint is -installed. We do that by setting the Mult field of the Endpoint Context -before a configure endpoint command is sent down. The Mult field is -invalid for control or bulk SuperSpeed endpoints. - -Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> -Cc: stable <stable@kernel.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/host/xhci-mem.c | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - ---- a/drivers/usb/host/xhci-mem.c -+++ b/drivers/usb/host/xhci-mem.c -@@ -582,6 +582,19 @@ static inline unsigned int xhci_get_endp - return EP_INTERVAL(interval); - } - -+/* The "Mult" field in the endpoint context is only set for SuperSpeed devices. -+ * High speed endpoint descriptors can define "the number of additional -+ * transaction opportunities per microframe", but that goes in the Max Burst -+ * endpoint context field. -+ */ -+static inline u32 xhci_get_endpoint_mult(struct usb_device *udev, -+ struct usb_host_endpoint *ep) -+{ -+ if (udev->speed != USB_SPEED_SUPER || !ep->ss_ep_comp) -+ return 0; -+ return ep->ss_ep_comp->desc.bmAttributes; -+} -+ - static inline u32 xhci_get_endpoint_type(struct usb_device *udev, - struct usb_host_endpoint *ep) - { -@@ -644,6 +657,7 @@ int xhci_endpoint_init(struct xhci_hcd * - ep_ctx->deq = ep_ring->first_seg->dma | ep_ring->cycle_state; - - ep_ctx->ep_info = xhci_get_endpoint_interval(udev, ep); -+ ep_ctx->ep_info |= EP_MULT(xhci_get_endpoint_mult(udev, ep)); - - /* FIXME dig Mult and streams info out of ep companion desc */ - |
