1. 21 8月, 2012 1 次提交
    • G
      gpu/mfd/usb: Fix USB randconfig problems · 8f057d7b
      Guenter Roeck 提交于
      Fix config warning:
      
      warning: ( ... && DRM_USB) selects USB which has unmet direct dependencies
      (USB_SUPPORT && USB_ARCH_HAS_HCD)
      
      and build error:
      ERROR: "usb_speed_string" [drivers/usb/core/usbcore.ko] undefined!
      
      by adding the missing dependency on USB_ARCH_HAS_HCD to DRM_UDL and DRM_USB.
      
      This exposes:
      drivers/video/Kconfig:36:error: recursive dependency detected!
      drivers/video/Kconfig:36:       symbol FB is selected by DRM_KMS_HELPER
      drivers/gpu/drm/Kconfig:28:     symbol DRM_KMS_HELPER is selected by DRM_UDL
      drivers/gpu/drm/udl/Kconfig:1:  symbol DRM_UDL depends on USB_ARCH_HAS_HCD
      drivers/usb/Kconfig:78: symbol USB_ARCH_HAS_HCD depends on USB_ARCH_HAS_OHCI
      drivers/usb/Kconfig:16: symbol USB_ARCH_HAS_OHCI depends on I2C
      drivers/i2c/Kconfig:5:  symbol I2C is selected by FB_DDC
      drivers/video/Kconfig:86:       symbol FB_DDC is selected by FB_CYBER2000_DDC
      drivers/video/Kconfig:385:      symbol FB_CYBER2000_DDC depends on FB_CYBER2000
      drivers/video/Kconfig:373:      symbol FB_CYBER2000 depends on FB
      
      which is due to drivers/usb/Kconfig:
      config USB_ARCH_HAS_OHCI
      	...
      	default y if ARCH_PNX4008 && I2C
      
      Fix by dropping I2C from the above dependency; logic is that this is not a
      platform dependency but a configuration dependency: the _architecture_ still
      supports USB even is I2C is not selected.
      
      This exposes:
      drivers/video/Kconfig:36:error: recursive dependency detected!
      drivers/video/Kconfig:36:       symbol FB is selected by DRM_KMS_HELPER
      drivers/gpu/drm/Kconfig:28:     symbol DRM_KMS_HELPER is selected by DRM_UDL
      drivers/gpu/drm/udl/Kconfig:1:  symbol DRM_UDL depends on USB_ARCH_HAS_HCD
      drivers/usb/Kconfig:78: symbol USB_ARCH_HAS_HCD depends on USB_ARCH_HAS_OHCI
      drivers/usb/Kconfig:17: symbol USB_ARCH_HAS_OHCI depends on MFD_TC6393XB
      drivers/mfd/Kconfig:396:        symbol MFD_TC6393XB depends on GPIOLIB
      drivers/gpio/Kconfig:35:        symbol GPIOLIB is selected by FB_VIA
      drivers/video/Kconfig:1560:     symbol FB_VIA depends on FB
      
      which can be fixed by having MFD_TC6393XB select GPIOLIB instead of depending on
      it.
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8f057d7b
  2. 18 8月, 2012 9 次提交
  3. 17 8月, 2012 1 次提交
  4. 16 8月, 2012 2 次提交
  5. 11 8月, 2012 15 次提交
    • M
      usb: gadget: u_ether: fix kworker 100% CPU issue with still used interfaces in eth_stop · b1b552a6
      Michael Grzeschik 提交于
      This patch fixes an issue introduced by patch:
      
          72c973dd usb: gadget: add usb_endpoint_descriptor to struct usb_ep
      
      Without this patch we see a kworker taking 100% CPU, after this sequence:
      
      - Connect gadget to a windows host
      - load g_ether
      - ifconfig up <ip>; ifconfig down; ifconfig up
      - ping <windows host>
      
      The "ifconfig down" results in calling eth_stop(), which will call
      usb_ep_disable() and, if the carrier is still ok, usb_ep_enable():
      
               usb_ep_disable(link->in_ep);
               usb_ep_disable(link->out_ep);
               if (netif_carrier_ok(net)) {
                       usb_ep_enable(link->in_ep);
                       usb_ep_enable(link->out_ep);
               }
      
      The ep should stay enabled, but will not, as ep_disable set the desc
      pointer to NULL, therefore the subsequent ep_enable will fail. This leads
      to permanent rescheduling of the eth_work() worker as usb_ep_queue()
      (called by the worker) will fail due to the unconfigured endpoint.
      
      We fix this issue by saving the ep descriptors and re-assign them before
      usb_ep_enable().
      
      Cc: Tatyana Brokhman <tlinder@codeaurora.org>
      Signed-off-by: NMichael Grzeschik <m.grzeschik@pengutronix.de>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b1b552a6
    • V
      usb: host: tegra: fix warning messages in ehci_remove · ecc8a0cd
      Venu Byravarasu 提交于
      Existing implementation of tegra_ehci_remove() calls
      usb_put_hcd(hcd) first and then iounmap(hcd->regs).
      
      usb_put_hcd() implementation calls hcd_release()
      which frees up memory allocated for hcd.
      
      As iounmap is trying to unmap hcd->regs, after hcd
      getting freed up, warning messages were observed during
      unload of USB.
      
      Hence fixing it.
      Signed-off-by: NVenu Byravarasu <vbyravarasu@nvidia.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ecc8a0cd
    • S
      usb: host: mips: sead3: Update for EHCI register structure. · cc59c7a9
      Steven J. Hill 提交于
      One line fix after 'struct ehci_regs' definition was changed
      in commit a46af4eb (USB: EHCI: define
      extension registers like normal ones).
      Signed-off-by: NSteven J. Hill <sjhill@mips.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cc59c7a9
    • K
      usb: renesas_usbhs: fixup resume method for autonomy mode · 5b50d3b5
      Kuninori Morimoto 提交于
      If renesas_usbhs is probed as autonomy mode,
      phy reset should be called after power resumed,
      and manual cold-plug should be called with slight delay.
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5b50d3b5
    • K
      usb: renesas_usbhs: mod_host: add missing .bus_suspend/resume · e7ae64c7
      Kuninori Morimoto 提交于
      suspend/resume will failed on renesas_usbhs without this patch.
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e7ae64c7
    • O
      update MAINTAINERS for Oliver Neukum · 61eee9a7
      Oliver Neukum 提交于
      my neukum.name address has run out
      Signed-off-by: NOliver Neukum <oneukum@suse.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      61eee9a7
    • B
      usb: usb_wwan: resume/suspend can be called after port is gone · 032129cb
      Bjørn Mork 提交于
      We cannot unconditionally access any usb-serial port specific
      data from the interface driver.  Both supending and resuming
      may happen after the port has been removed and portdata is
      freed.
      
      Treat ports with no portdata as closed ports to avoid a NULL
      pointer dereference on resume.  No need to kill URBs for
      removed ports on suspend, avoiding the same NULL pointer
      reference there.
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      032129cb
    • B
      usb: serial: prevent suspend/resume from racing against probe/remove · d5fd650c
      Bjørn Mork 提交于
      Some usb-serial drivers may access port data in their suspend/
      resume functions. Such drivers must always verify the validity
      of the data as both suspend and resume can be called both before
      usb_serial_device_probe and after usb_serial_device_remove.
      
      But the port data may be invalidated during port_probe and
      port_remove. This patch prevents the race against suspend and
      resume by disabling suspend while port_probe or port_remove is
      running.
      Suggested-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d5fd650c
    • B
      usb: usb_wwan: replace release and disconnect with a port_remove hook · a1028f0a
      Bjørn Mork 提交于
      Doing port specific cleanup in the .port_remove hook is a
      lot simpler and safer than doing it in the USB driver
      .release or .disconnect methods. The removal of the port
      from the usb-serial bus will happen before the USB driver
      cleanup, so we must be careful about accessing port specific
      driver data from any USB driver functions.
      
      This problem surfaced after the commit
      
       0998d063 device-core: Ensure drvdata = NULL when no driver is bound
      
      which turned the previous unsafe access into a reliable NULL
      pointer dereference.
      
      Fixes the following Oops:
      
      [  243.148471] BUG: unable to handle kernel NULL pointer dereference at           (null)
      [  243.148508] IP: [<ffffffffa0468527>] stop_read_write_urbs+0x37/0x80 [usb_wwan]
      [  243.148556] PGD 79d60067 PUD 79d61067 PMD 0
      [  243.148590] Oops: 0000 [#1] SMP
      [  243.148617] Modules linked in: sr_mod cdrom qmi_wwan usbnet option cdc_wdm usb_wwan usbserial usb_storage uas fuse af_packet ip6table_filter ip6_tables iptable_filter ip_tables x_tables tun edd
      cpufreq_conservative cpufreq_userspace cpufreq_powersave snd_pcm_oss snd_mixer_oss acpi_cpufreq snd_seq mperf snd_seq_device coretemp arc4 sg hp_wmi sparse_keymap uvcvideo videobuf2_core
      videodev videobuf2_vmalloc videobuf2_memops rtl8192ce rtl8192c_common rtlwifi joydev pcspkr microcode mac80211 i2c_i801 lpc_ich r8169 snd_hda_codec_idt cfg80211 snd_hda_intel snd_hda_codec rfkill
      snd_hwdep snd_pcm wmi snd_timer ac snd soundcore snd_page_alloc battery uhci_hcd i915 drm_kms_helper drm i2c_algo_bit ehci_hcd thermal usbcore video usb_common button processor thermal_sys
      [  243.149007] CPU 1
      [  243.149027] Pid: 135, comm: khubd Not tainted 3.5.0-rc7-next-20120720-1-vanilla #1 Hewlett-Packard HP Mini 110-3700                /1584
      [  243.149072] RIP: 0010:[<ffffffffa0468527>]  [<ffffffffa0468527>] stop_read_write_urbs+0x37/0x80 [usb_wwan]
      [  243.149118] RSP: 0018:ffff880037e75b30  EFLAGS: 00010286
      [  243.149133] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff88005912aa28
      [  243.149150] RDX: ffff88005e95f028 RSI: 0000000000000000 RDI: ffff88005f7c1a10
      [  243.149166] RBP: ffff880037e75b60 R08: 0000000000000000 R09: ffffffff812cea90
      [  243.149182] R10: 0000000000000000 R11: 0000000000000001 R12: ffff88006539b440
      [  243.149198] R13: ffff88006539b440 R14: 0000000000000000 R15: 0000000000000000
      [  243.149216] FS:  0000000000000000(0000) GS:ffff88007ee80000(0000) knlGS:0000000000000000
      [  243.149233] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      [  243.149248] CR2: 0000000000000000 CR3: 0000000079fe0000 CR4: 00000000000007e0
      [  243.149264] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [  243.149280] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      [  243.149298] Process khubd (pid: 135, threadinfo ffff880037e74000, task ffff880037d40600)
      [  243.149313] Stack:
      [  243.149323]  ffff880037e75b40 ffff88006539b440 ffff8800799bc830 ffff88005f7c1800
      [  243.149348]  0000000000000001 ffff88006539b448 ffff880037e75b70 ffffffffa04685e9
      [  243.149371]  ffff880037e75bc0 ffffffffa0473765 ffff880037354988 ffff88007b594800
      [  243.149395] Call Trace:
      [  243.149419]  [<ffffffffa04685e9>] usb_wwan_disconnect+0x9/0x10 [usb_wwan]
      [  243.149447]  [<ffffffffa0473765>] usb_serial_disconnect+0xd5/0x120 [usbserial]
      [  243.149511]  [<ffffffffa0046b48>] usb_unbind_interface+0x58/0x1a0 [usbcore]
      [  243.149545]  [<ffffffff8139ebd7>] __device_release_driver+0x77/0xe0
      [  243.149567]  [<ffffffff8139ec67>] device_release_driver+0x27/0x40
      [  243.149587]  [<ffffffff8139e5cf>] bus_remove_device+0xdf/0x150
      [  243.149608]  [<ffffffff8139bc78>] device_del+0x118/0x1a0
      [  243.149661]  [<ffffffffa0044590>] usb_disable_device+0xb0/0x280 [usbcore]
      [  243.149718]  [<ffffffffa003c6fd>] usb_disconnect+0x9d/0x140 [usbcore]
      [  243.149770]  [<ffffffffa003da7d>] hub_port_connect_change+0xad/0x8a0 [usbcore]
      [  243.149825]  [<ffffffffa0043bf5>] ? usb_control_msg+0xe5/0x110 [usbcore]
      [  243.149878]  [<ffffffffa003e6e3>] hub_events+0x473/0x760 [usbcore]
      [  243.149931]  [<ffffffffa003ea05>] hub_thread+0x35/0x1d0 [usbcore]
      [  243.149955]  [<ffffffff81061960>] ? add_wait_queue+0x60/0x60
      [  243.150004]  [<ffffffffa003e9d0>] ? hub_events+0x760/0x760 [usbcore]
      [  243.150026]  [<ffffffff8106133e>] kthread+0x8e/0xa0
      [  243.150047]  [<ffffffff8157ec04>] kernel_thread_helper+0x4/0x10
      [  243.150068]  [<ffffffff810612b0>] ? flush_kthread_work+0x120/0x120
      [  243.150088]  [<ffffffff8157ec00>] ? gs_change+0xb/0xb
      [  243.150101] Code: fd 41 54 53 48 83 ec 08 80 7f 1a 00 74 57 49 89 fc 31 db 90 49 8b 7c 24 20 45 31 f6 48 81 c7 10 02 00 00 e8 bc 64 f3 e0 49 89 c7 <4b> 8b 3c 37 49 83 c6 08 e8 4c a5 bd ff 49 83 fe 20
      75 ed 45 30
      [  243.150257] RIP  [<ffffffffa0468527>] stop_read_write_urbs+0x37/0x80 [usb_wwan]
      [  243.150282]  RSP <ffff880037e75b30>
      [  243.150294] CR2: 0000000000000000
      [  243.177170] ---[ end trace fba433d9015ffb8c ]---
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Reported-by: NThomas Schäfer <tschaefer@t-online.de>
      Suggested-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a1028f0a
    • M
      usb: serial: mos7840: Fixup mos7840_chars_in_buffer() · 5c263b92
      Mark Ferrell 提交于
       * Use the buffer content length as opposed to the total buffer size.  This can
         be a real problem when using the mos7840 as a usb serial-console as all
         kernel output is truncated during boot.
      Signed-off-by: NMark Ferrell <mferrell@uplogix.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5c263b92
    • B
      USB: isp1362-hcd.c: usb message always saved in case of underrun · 4840ae17
      Bruno Morelli 提交于
      The usb message must be saved also in case the USB endpoint is not a
      control endpoint (i.e., "endpoint 0"), otherwise in some circumstances
      we don't have a payload in case of error.
      
      The patch has been created by tracing with usbmon the different error
      messages generated by this driver with respect to the ehci-hcd driver.
      Signed-off-by: NBruno Morelli <bruno@evidence.eu.com>
      Signed-off-by: NClaudio Scordino <claudio@evidence.eu.com>
      Tested-by: NBruno Morelli <bruno@evidence.eu.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4840ae17
    • K
      OMAP: USB : Fix the EHCI enumeration and core retention issue · 872c495d
      Keshava Munegowda 提交于
      This commit 354ab856 titled
      "Fix OMAP EHCI suspend/resume failure (i693)" is causing
      the usb hub and device detection fails in beagle XM
      causeing NFS not functional. This affects the core retention too.
      The same commit logic needs to be revisted adhering to hwmod and
      device tree framework.
      for now, this commit id 354ab856
      titled "Fix OMAP EHCI suspend/resume failure (i693)" reverted.
      
      This patch is validated on BeagleXM with NFS support over
      usb ethernet and USB mass storage and other device detection.
      Signed-off-by: NKeshava Munegowda <keshava_mgowda@ti.com>
      Acked-by: NFelipe Balbi <balbi@ti.com>
      Cc: stable <stable@vger.kernel.org> # 3.5
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      872c495d
    • M
      usb: chipidea: fix and improve dependencies if usb host or gadget support is built as module · 71a5e61b
      Marc Kleine-Budde 提交于
      Since commit "5e0aa49e usb: chipidea: use generic map/unmap routines",
      the udc part of the chipidea driver needs the generic usb gadget helper
      functions. If the chipidea driver with udc support is built into the
      kernel and usb gadget is built a module, the linking of the kernel
      fails with:
      
      drivers/built-in.o: In function `_hardware_dequeue':
      drivers/usb/chipidea/udc.c:527:
          undefined reference to `usb_gadget_unmap_request'
      drivers/usb/chipidea/udc.c:1269:
          undefined reference to `usb_gadget_unmap_request'
      drivers/usb/chipidea/udc.c:1821:
          undefined reference to `usb_del_gadget_udc'
      drivers/usb/chipidea/udc.c:443:
          undefined reference to `usb_gadget_map_request'
      drivers/usb/chipidea/udc.c:1774:
          undefined reference to `usb_add_gadget_udc'
      
      This patch changes the dependencies, so that udc support can only be
      activated if the linux gadget support (USB_GADGET) is builtin or both
      chipidea driver and USB_GADGET are modular. Same dependencies for the
      chipidea host support and the linux host side USB support (USB).
      
      While there, fix the indention of chipidea the help text.
      
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Reviewed-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      71a5e61b
    • F
      USB: support the new interfaces of Huawei Data Card devices in option driver · ee6f827d
      fangxiaozhi 提交于
      In this patch, we add new declarations into option.c to support the new
      interfaces of Huawei Data Card devices. And at the same time, remove the
      redundant declarations from option.c.
      Signed-off-by: Nfangxiaozhi <huananhu@huawei.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ee6f827d
    • O
      USB: ftdi_sio: Add VID/PID for Kondo Serial USB · 7724a1ed
      Ozan Çağlayan 提交于
      This adds VID/PID for Kondo Kagaku Co. Ltd. Serial USB Adapter
      interface:
      http://www.kondo-robot.com/EN/wp/?cat=28
      
      Tested by controlling an RCB3 board using libRCB3.
      Signed-off-by: NOzan Çağlayan <ozancag@gmail.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7724a1ed
  6. 10 8月, 2012 3 次提交
    • G
      Merge tag 'for-usb-linus-2012-08-09' of... · 3557c9ae
      Greg Kroah-Hartman 提交于
      Merge tag 'for-usb-linus-2012-08-09' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-linus
      
      Intel xhci: Work around immediate reboot on shutdown.
      
      Hi Greg,
      
      I'm cleaning out my queue before I leave on vacation tomorrow, so here's
      one more patch for 3.6.  It works around an issue on a couple Intel
      Panther Point desktop systems that cause them to reboot about 10 seconds
      after the user shutdowns the system.
      
      Sarah Sharp
      3557c9ae
    • S
      xhci: Switch PPT ports to EHCI on shutdown. · e95829f4
      Sarah Sharp 提交于
      The Intel desktop boards DH77EB and DH77DF have a hardware issue that
      can be worked around by BIOS.  If the USB ports are switched to xHCI on
      shutdown, the xHCI host will send a spurious interrupt, which will wake
      the system.  Some BIOS will work around this, but not all.
      
      The bug can be avoided if the USB ports are switched back to EHCI on
      shutdown.  The Intel Windows driver switches the ports back to EHCI, so
      change the Linux xHCI driver to do the same.
      
      Unfortunately, we can't tell the two effected boards apart from other
      working motherboards, because the vendors will change the DMI strings
      for the DH77EB and DH77DF boards to their own custom names.  One example
      is Compulab's mini-desktop, the Intense-PC.  Instead, key off the
      Panther Point xHCI host PCI vendor and device ID, and switch the ports
      over for all PPT xHCI hosts.
      
      The only impact this will have on non-effected boards is to add a couple
      hundred milliseconds delay on boot when the BIOS has to switch the ports
      over from EHCI to xHCI.
      
      This patch should be backported to kernels as old as 3.0, that contain
      the commit 69e848c2 "Intel xhci: Support
      EHCI/xHCI port switching."
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Reported-by: NDenis Turischev <denis@compulab.co.il>
      Tested-by: NDenis Turischev <denis@compulab.co.il>
      Cc: stable@vger.kernel.org
      e95829f4
    • G
      Merge tag 'for-usb-linus-2012-08-08' of... · ded737fe
      Greg Kroah-Hartman 提交于
      Merge tag 'for-usb-linus-2012-08-08' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-linus
      
      xHCI bug fixes and host quirks.
      
      Hi Greg,
      
      Here's four patches for 3.6.  Most are marked for stable as well.
      
      The first one makes the xHCI driver load properly on newer Rensas hosts.
      The next two fix issues with the Etron host incorrectly marking short
      transfers as successful, and avoiding log warning spam for hosts that
      make the same mistake.
      
      The last patch fixes a really nasty xHCI driver bug that could cause
      general protection faults when devices stall transfers.
      
      Sarah Sharp
      ded737fe
  7. 09 8月, 2012 1 次提交
    • S
      xhci: Fix bug after deq ptr set to link TRB. · 50d0206f
      Sarah Sharp 提交于
      This patch fixes a particularly nasty bug that was revealed by the ring
      expansion patches.  The bug has been present since the very beginning of
      the xHCI driver history, and could have caused general protection faults
      from bad memory accesses.
      
      The first thing to note is that a Set TR Dequeue Pointer command can
      move the dequeue pointer to a link TRB, if the canceled or stalled
      transfer TD ended just before a link TRB.  The function to increment the
      dequeue pointer, inc_deq, was written before cancellation and stall
      support was added.  It assumed that the dequeue pointer could never
      point to a link TRB.  It would unconditionally increment the dequeue
      pointer at the start of the function, check if the pointer was now on a
      link TRB, and move it to the top of the next segment if so.
      
      This means that if a Set TR Dequeue Point command moved the dequeue
      pointer to a link TRB, a subsequent call to inc_deq() would move the
      pointer off the segment and into la-la-land.  It would then read from
      that memory to determine if it was a link TRB.  Other functions would
      often call inc_deq() until the dequeue pointer matched some other
      pointer, which means this function would quite happily read all of
      system memory before wrapping around to the right pointer value.
      
      Often, there would be another endpoint segment from a different ring
      allocated from the same DMA pool, which would be contiguous to the
      segment inc_deq just stepped off of.  inc_deq would eventually find the
      link TRB in that segment, and blindly move the dequeue pointer back to
      the top of the correct ring segment.
      
      The only reason the original code worked at all is because there was
      only one ring segment.  With the ring expansion patches, the dequeue
      pointer would eventually wrap into place, but the dequeue segment would
      be out-of-sync.  On the second TD after the dequeue pointer was moved to
      a link TRB, trb_in_td() would fail (because the dequeue pointer and
      dequeue segment were out-of-sync), and this message would appear:
      
      ERROR Transfer event TRB DMA ptr not part of current TD
      
      This fixes bugzilla entry 4333 (option-based modem unhappy on USB 3.0
      port: "Transfer event TRB DMA ptr not part of current TD", "rejecting
      I/O to offline device"),
      
      	https://bugzilla.kernel.org/show_bug.cgi?id=43333
      
      and possibly other general protection fault bugs as well.
      
      This patch should be backported to kernels as old as 2.6.31.  A separate
      patch will be created for kernels older than 3.4, since inc_deq was
      modified in 3.4 and this patch will not apply.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Tested-by: NJames Ettle <theholyettlz@googlemail.com>
      Tested-by: NMatthew Hall <mhall@mhcomputing.net>
      Cc: stable@vger.kernel.org
      50d0206f
  8. 08 8月, 2012 4 次提交
    • G
      Merge tag 'fixes-for-v3.6-rc1' of... · 010ccce0
      Greg Kroah-Hartman 提交于
      Merge tag 'fixes-for-v3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus
      
      usb: fixes for v3.6-rc1
      
      Here are three fixes for v3.6-rc1. All on the MUSB driver and
      quite obvious. First there's a Kconfig change which was missed
      earlier, then there is a fix for the usage of the resource name
      and lastly a fix for pm_runtime usage and device initialization.
      
      The last fix is rather critical as it can end up in situations
      where we try to access device's register with clocks disabled,
      which will cause a Data Abort exception (on ARM).
      010ccce0
    • S
      xhci: Rate-limit XHCI_TRUST_TX_LENGTH quirk warning. · 8202ce2e
      Sarah Sharp 提交于
      When we encounter an xHCI host that needs the XHCI_TRUST_TX_LENGTH
      quirk, the xHCI driver ends up spewing messages about the quirk into
      dmesg every time a short packet occurs.  Change the xHCI driver to
      rate-limit such warnings.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Reported-by: NMatthew Hall <mhall@mhcomputing.net>
      Reported-by: NGary E. Miller <gem@rellim.com>
      8202ce2e
    • S
      xhci: Add Etron XHCI_TRUST_TX_LENGTH quirk. · 5cb7df2b
      Sarah Sharp 提交于
      Gary reports that with recent kernels, he notices more xHCI driver
      warnings:
      
      xhci_hcd 0000:03:00.0: WARN Successful completion on short TX: needs XHCI_TRUST_TX_LENGTH quirk?
      
      We think his Etron xHCI host controller may have the same buggy behavior
      as the Fresco Logic xHCI host.  When a short transfer is received, the
      host will mark the transfer as successfully completed when it should be
      marking it with a short completion.
      
      Fix this by turning on the XHCI_TRUST_TX_LENGTH quirk when the Etron
      host is discovered.  Note that Gary has revision 1, but if Etron fixes
      this bug in future revisions, the quirk will have no effect.
      
      This patch should be backported to kernels as old as 2.6.36, that
      contain a backported version of commit
      1530bbc6 "xhci: Add new short TX quirk
      for Fresco Logic host."
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Reported-by: NGary E. Miller <gem@rellim.com>
      Cc: stable@vger.kernel.org
      5cb7df2b
    • S
      xhci: Increase reset timeout for Renesas 720201 host. · 22ceac19
      Sarah Sharp 提交于
      The NEC/Renesas 720201 xHCI host controller does not complete its reset
      within 250 milliseconds.  In fact, it takes about 9 seconds to reset the
      host controller, and 1 second for the host to be ready for doorbell
      rings.  Extend the reset and CNR polling timeout to 10 seconds each.
      
      This patch should be backported to kernels as old as 2.6.31, that
      contain the commit 66d4eadd "USB: xhci:
      BIOS handoff and HW initialization."
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Reported-by: NEdwin Klein Mentink <e.kleinmentink@zonnet.nl>
      Cc: stable@vger.kernel.org
      22ceac19
  9. 03 8月, 2012 4 次提交