1. 01 12月, 2010 5 次提交
  2. 22 11月, 2010 4 次提交
    • A
      usb: musb: do not use dma for control transfers · 07a8cdd2
      Anand Gadiyar 提交于
      The Inventra DMA engine used with the MUSB controller in many
      SoCs cannot use DMA for control transfers on EP0, but can use
      DMA for all other transfers.
      
      The USB core maps urbs for DMA if hcd->self.uses_dma is true.
      (hcd->self.uses_dma is true for MUSB as well).
      
      Split the uses_dma flag into two - one that says if the
      controller needs to use PIO for control transfers, and
      another which says if the controller uses DMA (for all
      other transfers).
      
      Also, populate this flag for all MUSB by default.
      
      (Tested on OMAP3 and OMAP4 boards, with EHCI and MUSB HCDs
      simultaneously in use).
      Signed-off-by: NMaulik Mankad <x0082077@ti.com>
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NAnand Gadiyar <gadiyar@ti.com>
      Cc: Oliver Neukum <oliver@neukum.org>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Praveena NADAHALLY <praveen.nadahally@stericsson.com>
      Cc: Ajay Kumar Gupta <ajay.gupta@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      07a8cdd2
    • A
      usb: musb: gadget: fix compilation warning · bb324b08
      Ajay Kumar Gupta 提交于
      Fixes below compilation warning when musb driver is compiled for
      PIO mode:
      
      drivers/usb/musb/musb_gadget.c: In function 'musb_g_rx':
      drivers/usb/musb/musb_gadget.c:840:
      		warning: label 'exit' defined but not used
      Signed-off-by: NAjay Kumar Gupta <ajay.gupta@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      bb324b08
    • M
      usb: musb: clear RXCSR_AUTOCLEAR before PIO read · e75df371
      Ming Lei 提交于
      If RXCSR_AUTOCLEAR flag is not cleard before PIO reading, one packet
      may be recieved by musb fifo, but no chance to notify
      software, so cause packet loss, follows the detailed process:
      
      	- PIO read one packet
      	- musb fifo auto clear the MUSB_RXCSR_RXPKTRDY
      	- musb continue to recieve the next packet, and MUSB_RXCSR_RXPKTRDY
      	is set
      	- software clear the MUSB_RXCSR_RXPKTRDY, so there is no chance for
      	musb to notify software that the 2nd recieved packet.
      
      The patch does fix the g_ether issue below:
      
      	- use fifo_mode 3 to enable double buffer
      	- 'ping -s 1024 IP_OF_BEAGLE_XM'
      	- one usb packet of 512 byte is lost, so ping failed,
      	which can be observed by wireshark
      
      note:
      	Beagle xm takes musb rtl1.8 and may fallback to pio mode
      	for unaligned buffer.
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      e75df371
    • H
      usb: musb: unmap dma buffer when switching to PIO · 92d2711f
      Hema Kalliguddi 提交于
      Buffer is mapped to dma when dma channel is
      allocated. If, for some reason, dma channel
      programming fails, musb code will fallback
      to PIO mode to transfer that request. In
      that case, we need to unmap the buffer
      back to CPU.
      
      MUSB RTL1.8 and above cannot handle buffers
      which are not 32bit aligned. That happens to
      every request sent by g_ether gadget
      driver. Since the buffer sent was unaligned,
      we need to fallback to PIO.
      
      Because of that, g_ether was failing due
      to missing buffer unmapping.
      
      With this patch and [1] g_ether works fine
      with all MUSB revisions.
      
      Verified with OMAP3630 board, which has
      MUSB RTL1.8 using g_ether and g_zero.
      
      [1] http://www.spinics.net/lists/linux-usb/msg38400.htmlSigned-off-by: NHema HK <hemahk@ti.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      92d2711f
  3. 20 11月, 2010 3 次提交
    • S
      xhci: Don't let the USB core disable SuperSpeed ports. · 6dd0a3a7
      Sarah Sharp 提交于
      Disabling SuperSpeed ports is a Very Bad Thing (TM).  It disables
      SuperSpeed terminations, which means that devices will never connect at
      SuperSpeed on that port.  For USB 2.0/1.1 ports, disabling the port meant
      that the USB core could always get a connect status change later.  That's
      not true with USB 3.0 ports.
      
      Do not let the USB core disable SuperSpeed ports.  We can't rely on the
      device speed in the port status registers, since that isn't valid until
      there's a USB device connected to the port.  Instead, we use the port
      speed array that's created from the Extended Capabilities registers.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Tested-by: NDon Zickus <dzickus@redhat.com>
      Cc: stable@kernel.org
      6dd0a3a7
    • S
      xhci: Setup array of USB 2.0 and USB 3.0 ports. · da6699ce
      Sarah Sharp 提交于
      An xHCI host controller contains USB 2.0 and USB 3.0 ports, which can
      occur in any order in the PORTSC registers.  We cannot read the port speed
      bits in the PORTSC registers at init time to determine the port speed,
      since those bits are only valid when a USB device is plugged into the
      port.
      
      Instead, we read the "Supported Protocol Capability" registers in the xHC
      Extended Capabilities space.  Those describe the protocol, port offset in
      the PORTSC registers, and port count.  We use those registers to create
      two arrays of pointers to the PORTSC registers, one for USB 3.0 ports, and
      another for USB 2.0 ports.  A third array keeps track of the port protocol
      major revision, and is indexed with the internal xHCI port number.
      
      This commit is a bit big, but it should be queued for stable because the "Don't
      let the USB core disable SuperSpeed ports" patch depends on it.  There is no
      other way to determine which ports are SuperSpeed ports without this patch.
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Tested-by: NDon Zickus <dzickus@redhat.com>
      Cc: stable@kernel.org
      da6699ce
    • P
      xhci: Fix reset-device and configure-endpoint commands · 7a3783ef
      Paul Zimmerman 提交于
      We have been having problems with the USB-IF Gold Tree tests when plugging
      and unplugging devices from the tree. I have seen that the reset-device
      and configure-endpoint commands, which are invoked from
      xhci_discover_or_reset_device() and xhci_configure_endpoint(), will sometimes
      time out.
      
      After much debugging, I determined that the commands themselves do not actually
      time out, but rather their completion events do not get delivered to the right
      place.
      
      This happens when the command ring has just wrapped around, and it's enqueue
      pointer is left pointing to the link TRB. xhci_discover_or_reset_device() and
      xhci_configure_endpoint() use the enqueue pointer directly as their command
      TRB pointer, without checking whether it's pointing to the link TRB.
      
      When the completion event arrives, if the command TRB is pointing to the link
      TRB, the check against the command ring dequeue pointer in
      handle_cmd_in_cmd_wait_list() fails, so the completion inside the command does
      not get signaled.
      
      The patch below fixes the timeout problem for me.
      
      This should be queued for the 2.6.35 and 2.6.36 stable trees.
      Signed-off-by: NPaul Zimmerman <paulz@synopsys.com>
      Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable@kernel.org
      7a3783ef
  4. 18 11月, 2010 1 次提交
  5. 17 11月, 2010 5 次提交
    • A
      USB: EHCI: fix obscure race in ehci_endpoint_disable · 02e2c51b
      Alan Stern 提交于
      This patch (as1435) fixes an obscure and unlikely race in ehci-hcd.
      When an async URB is unlinked, the corresponding QH is removed from
      the async list.  If the QH's endpoint is then disabled while the URB
      is being given back, ehci_endpoint_disable() won't find the QH on the
      async list, causing it to believe that the QH has been lost.  This
      will lead to a memory leak at best and quite possibly to an oops.
      
      The solution is to trust usbcore not to lose track of endpoints.  If
      the QH isn't on the async list then it doesn't need to be taken off
      the list, but the driver should still wait for the QH to become IDLE
      before disabling it.
      
      In theory this fixes Bugzilla #20182.  In fact the race is so rare
      that it's not possible to tell whether the bug is still present.
      However, adding delays and making other changes to force the race
      seems to show that the patch works.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Reported-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      CC: David Brownell <david-b@pacbell.net>
      CC: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      02e2c51b
    • J
      USB: gadget: AT91: fix typo in atmel_usba_udc driver · b4880951
      Josh Wu 提交于
      compile fix for bug introduced by 969affff)
      Signed-off-by: NJosh Wu <josh.wu@atmel.com>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b4880951
    • A
      USB: isp1362-hcd - fix section mismatch warning · f52022b5
      Axel Lin 提交于
      Fix section mismatch warning by using "__devinit" annotation for isp1362_probe.
      
      WARNING: drivers/usb/host/isp1362-hcd.o(.data+0x0): Section mismatch in reference from the variable isp1362_driver to the function .init.text:isp1362_probe()
      The variable isp1362_driver references
      the function __init isp1362_probe()
      If the reference is valid then annotate the
      variable with __init* or __refdata (see linux/init.h) or name the variable:
      *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
      Signed-off-by: NAxel Lin <axel.lin@gmail.com>
      Acked-by: NMike Frysinger <vapier@gentoo.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      f52022b5
    • A
      USB: EHCI: AMD periodic frame list table quirk · 3d091a6f
      Andiry Xu 提交于
      On AMD SB700/SB800/Hudson-2/3 platforms, USB EHCI controller may read/write
      to memory space not allocated to USB controller if there is longer than
      normal latency on DMA read encountered. In this condition the exposure will
      be encountered only if the driver has following format of Periodic Frame
      List link pointer structure:
      
      For any idle periodic schedule, the Frame List link pointers that have the
      T-bit set to 1 intending to terminate the use of frame list link pointer
      as a physical memory pointer.
      
      Idle periodic schedule Frame List Link pointer shoule be in the following
      format to avoid the issue:
      
      Frame list link pointer should be always contains a valid pointer to a
      inactive QHead with T-bit set to 0.
      Signed-off-by: NAndiry Xu <andiry.xu@amd.com>
      Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      3d091a6f
    • J
      SCSI host lock push-down · f281233d
      Jeff Garzik 提交于
      Move the mid-layer's ->queuecommand() invocation from being locked
      with the host lock to being unlocked to facilitate speeding up the
      critical path for drivers who don't need this lock taken anyway.
      
      The patch below presents a simple SCSI host lock push-down as an
      equivalent transformation.  No locking or other behavior should change
      with this patch.  All existing bugs and locking orders are preserved.
      
      Additionally, add one parameter to queuecommand,
      	struct Scsi_Host *
      and remove one parameter from queuecommand,
      	void (*done)(struct scsi_cmnd *)
      
      Scsi_Host* is a convenient pointer that most host drivers need anyway,
      and 'done' is redundant to struct scsi_cmnd->scsi_done.
      
      Minimal code disturbance was attempted with this change.  Most drivers
      needed only two one-line modifications for their host lock push-down.
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      Acked-by: NJames Bottomley <James.Bottomley@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f281233d
  6. 16 11月, 2010 9 次提交
  7. 12 11月, 2010 4 次提交
  8. 11 11月, 2010 9 次提交