1. 20 May, 2010 15 commits
    • Jason Wessel's avatar
      usb-serial: Use tty_port version console instead of usb_serial_port · bd5afa9e
      Jason Wessel authored
      Replace all instances of using the console variable in struct
      usb_serial_port with the struct tty_port version.
      
      CC: Alan Cox <alan@linux.intel.com>
      CC: Alan Stern <stern@rowland.harvard.edu>
      CC: Oliver Neukum <oliver@neukum.org>
      CC: Andrew Morton <akpm@linux-foundation.org>
      CC: linux-usb@vger.kernel.org
      CC: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      bd5afa9e
    • Manuel Lauss's avatar
      USB: ehci-au1xxx does not need EHCI IO watchdog · 9757de38
      Manuel Lauss authored
      I've been running variations of this patch for well over a year now;
      my usual zoo of test devices didn't trigger any ill effects even
      under heavy load.  As a nice sideeffect idle-wakeups are reduced
      from 20/s to about 2/s (EHCI hub with mouse and kbd).
      Signed-off-by: default avatarManuel Lauss <manuel.lauss@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      9757de38
    • Alan Stern's avatar
      USB: remove uses of URB_NO_SETUP_DMA_MAP · 0ede76fc
      Alan Stern authored
      This patch (as1350) removes all usages of coherent buffers for USB
      control-request setup-packet buffers.  There's no good reason to
      reserve coherent memory for these things; control requests are hardly
      ever used in large quantity (the major exception is firmware
      transfers, and they aren't time-critical).  Furthermore, only seven
      drivers used it.  We might as well always use streaming DMA mappings
      for setup-packet buffers, and remove some extra complexity from
      usbcore.
      
      The DMA-mapping portion of hcd.c is currently in flux.  A separate
      patch will be submitted to remove support for URB_NO_SETUP_DMA_MAP
      after everything else settles down.  The removal should go smoothly,
      as by then nobody will be using it.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      0ede76fc
    • Alan Stern's avatar
      USB: straighten out port feature vs. port status usage · 749da5f8
      Alan Stern authored
      This patch (as1349b) clears up the confusion in many USB host
      controller drivers between port features and port statuses.  In mosty
      cases it's true that the status bit is in the position given by the
      corresponding feature value, but that's not always true and it's not
      guaranteed in the USB spec.
      
      There's no functional change, just replacing expressions of the form
      (1 << USB_PORT_FEAT_x) with USB_PORT_STAT_x, which has the same value.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      749da5f8
    • Alan Stern's avatar
      USB: remove bogus USB_PORT_FEAT_*_SPEED symbols · 288ead45
      Alan Stern authored
      This patch (as1348) removes the bogus
      USB_PORT_FEAT_{HIGHSPEED,SUPERSPEED} symbols from ch11.h.  No such
      features are defined by the USB spec.  (There is a PORT_LOWSPEED
      feature, but the spec doesn't mention it except to say that host
      software should never use it.)  The speed indicators are port
      statuses, not port features.
      
      As a temporary workaround for the xhci-hcd driver, a fictional
      USB_PORT_STAT_SUPER_SPEED symbol is added.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      CC: Sarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      288ead45
    • Huang Weiyi's avatar
      USB: remove duplicated #include · 45f30e0b
      Huang Weiyi authored
      Remove duplicated #include('s) in
        drivers/usb/core/hcd.c
      Signed-off-by: default avatarHuang Weiyi <weiyi.huang@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      45f30e0b
    • Ian Munsie's avatar
      USB: Remove large struct from the stack in USB storage isd200 driver · 0df4d8ef
      Ian Munsie authored
      The compiler throws the following warning when compiling for a PowerPC 64
      bit machine:
      
      drivers/usb/storage/isd200.c:580: warning: the frame size of 2208 bytes is larger than 2048 bytes
      
      There is a struct scsi_device which is placed on the stack and is
      largely responsible for such wastage. The struct is just a dummy struct
      filled with NULLs and set as the scsi_cmnd->device to make the
      usb_stor_Bulk_transport function happy.
      
      This patch makes the struct static, so that it is never placed onto the
      stack and silences the compiler warning.
      Signed-off-by: default avatarIan Munsie <imunsie@au.ibm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      0df4d8ef
    • Randy Dunlap's avatar
      USB: cdc-acm: make bitfields unsigned · fa4dc364
      Randy Dunlap authored
      Fix usb/class sparse warnings:
      
      drivers/usb/class/cdc-acm.h:128:34: error: dubious one-bit signed bitfield
      drivers/usb/class/cdc-acm.h:129:24: error: dubious one-bit signed bitfield
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      fa4dc364
    • Alessio Igor Bogani's avatar
      USB: sisusbvga: Remove the BKL from ioctl · 41f2c6e8
      Alessio Igor Bogani authored
      Seems to me that BKL is not needed here because necessary locking is already
      provided by mutex sisusb->lock.
      
      Also change the returned value to long.
      Signed-off-by: default avatarAlessio Igor Bogani <abogani@texware.it>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      41f2c6e8
    • Eric Lescouet's avatar
      USB: split hub.h into ch11.h and merge-in hcd.h · d20db4b4
      Eric Lescouet authored
      Base on inputs from Alan Stern, split the hub.h header into:
      - new ch11.h header (most of it) containing constants and
        structures from chapter 11 of the USB 2.0 spec.
      - a small remaining part being merged into hcd.h.
      Signed-of-by: default avatarEric Lescouet <eric@lescouet.org>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d20db4b4
    • Eric Lescouet's avatar
      USB: make hub.h public (drivers dependency) · d65d7e7e
      Eric Lescouet authored
      The usbcore headers: hcd.h and hub.h are shared between usbcore,
      HCDs and a couple of other drivers (e.g. USBIP modules).
      So, it makes sense to move them into a more public location and
      to cleanup dependency of those modules on kernel internal headers.
      This patch moves hub.h from drivers/usb/core into include/linux/usb/
      Signed-of-by: default avatarEric Lescouet <eric@lescouet.org>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d65d7e7e
    • Eric Lescouet's avatar
      USB: make hcd.h public (drivers dependency) · 27729aad
      Eric Lescouet authored
      The usbcore headers: hcd.h and hub.h are shared between usbcore,
      HCDs and a couple of other drivers (e.g. USBIP modules).
      So, it makes sense to move them into a more public location and
      to cleanup dependency of those modules on kernel internal headers.
      This patch moves hcd.h from drivers/usb/core into include/linux/usb/
      Signed-of-by: default avatarEric Lescouet <eric@lescouet.org>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      27729aad
    • Sarah Sharp's avatar
      USB: xhci: Fix check for room on the ring. · 44ebd037
      Sarah Sharp authored
      The length of the scatter gather list a driver can enqueue is limited by
      the bus' sg_tablesize to 62 entries.  Each entry will be described by at
      least one transfer request block (TRB).  If the entry's buffer crosses a
      64KB boundary, then that entry will have to be described by two or more
      TRBs.  So even if the USB device driver respects sg_tablesize, the whole
      scatter list may take more than 62 TRBs to describe, and won't fit on
      the ring.
      
      Don't assume that an empty ring means there is enough room on the
      transfer ring.  The old code would unconditionally queue this too-large
      transfer, and over write the beginning of the transfer.  This would mean
      the cycle bit was unchanged in those overwritten transfers, causing the
      hardware to think it didn't own the TRBs, and the host would seem to
      hang.
      
      Now drivers may see submit_urb() fail with -ENOMEM if the transfers are
      too big to fit on the ring.
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      44ebd037
    • Sarah Sharp's avatar
      USB: xhci: Limit bus sg_tablesize to 62 TRBs. · bc88d2eb
      Sarah Sharp authored
      When a scatter-gather list is enqueued to the xHCI driver, it translates
      each entry into a transfer request block (TRB).  Only 63 TRBs can be
      used per ring segment, and there must be one additional TRB reserved to
      make sure the hardware does not think the ring is empty (so the enqueue
      pointer doesn't equal the dequeue pointer).  Limit the bus sg_tablesize
      to 62 TRBs.
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      bc88d2eb
    • Sarah Sharp's avatar
      USB: xhci: Fix issue with set interface after stall. · 1624ae1c
      Sarah Sharp authored
      When the USB core installs a new interface, it unconditionally clears the
      halts on all the endpoints on the new interface.  Usually the xHCI host
      needs to know when an endpoint is reset, so it can change its internal
      endpoint state.  In this case, it doesn't care, because the endpoints were
      never halted in the first place.
      
      To avoid issuing a redundant Reset Endpoint command, the xHCI driver looks
      at xhci_virt_ep->stopped_td to determine if the endpoint was actually
      halted.  However, the functions that handle the stall never set that
      variable to NULL after it dealt with the stall.  So if an endpoint stalled
      and a Reset Endpoint command completed, and then the class driver tried to
      install a new alternate setting, the xHCI driver would access the old
      xhci_virt_ep->stopped_td pointer.  A similar problem occurs if the
      endpoint has been stopped to cancel a transfer.
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      1624ae1c
  2. 16 May, 2010 6 commits
  3. 15 May, 2010 17 commits
  4. 14 May, 2010 2 commits