11 Aug, 2010

13 commits

  • The Logitech Harmony 700 series needs an extra delay during
    initialization. This patch adds a USB quirk which enables such a delay
    and adds the device to the quirks list.

    Signed-off-by: Phil Dibowitz
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Phil Dibowitz
     
  • 1) Introduce ulpi specific flags for control of the ulpi phy
    2) Extend the generic ulpi driver with support for Function and
    Interface control of upli phy
    3) Update the platforms using the generic ulpi driver with new ulpi
    flags
    4) Remove the otg control flags not in use

    Signed-off-by: Igor Grinberg
    Signed-off-by: Mike Rapoport
    Signed-off-by: Greg Kroah-Hartman

    Igor Grinberg
     
  • Fixes below compilation warning from ulpi.h

    include/linux/usb/ulpi.h:145:
    warning: 'struct otg_io_access_ops' declared inside parameter list
    include/linux/usb/ulpi.h:145:
    warning: its scope is only this definition or declaration,
    which is probably not what you want

    Signed-off-by: Ajay Kumar Gupta
    Signed-off-by: Greg Kroah-Hartman

    Ajay Kumar Gupta
     
  • This patch (as1395) adds code to hcd_pci_suspend() for handling wakeup
    races. This is another general race pattern, similar to the "open
    vs. unregister" race we're all familiar with. Here, the race is
    between suspending a device and receiving a wakeup request from one of
    the device's suspended children.

    In particular, if a root-hub wakeup is requested at about the same
    time as the corresponding USB controller is suspended, and if the
    controller is enabled for wakeup, then the controller should either
    fail to suspend or else wake right back up again.

    During system sleep this won't happen very much, especially since host
    controllers generally aren't enabled for wakeup during sleep. However
    it is definitely an issue for runtime PM. Something like this will be
    needed to prevent the controller from autosuspending while waiting for
    a root-hub resume to take place. (That is, in fact, the common case,
    for which there is an extra test.)

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • This patch (as1385) adds a "do_wakeup" parameter to the pci_suspend
    method used by PCI-based host controller drivers. ehci-hcd in
    particular needs to know whether or not to enable wakeup when
    suspending a controller. Although that information is currently
    available through device_may_wakeup(), when support is added for
    runtime suspend this will no longer be true.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • This patch (as1393) converts several of the single-bit fields in
    struct usb_hcd to atomic flags. This is for safety's sake; not all
    CPUs can update bitfield values atomically, and these flags are used
    in multiple contexts.

    The flag fields that are set only during registration or removal can
    remain as they are, since non-atomic accesses at those times will not
    cause any problems.

    (Strictly speaking, the authorized_default flag should become atomic
    as well. I didn't bother with it because it gets changed only via
    sysfs. It can be done later, if anyone wants.)

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • Added a disconnect() callback to composite devices which
    is called by composite glue when its disconnect callback
    is called by gadget.

    Signed-off-by: Michal Nazarewicz
    Signed-off-by: Kyungmin Park
    Acked-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Michal Nazarewicz
     
  • usb_string_ids_tab() and usb_string_ids_n() functions added to
    the composite framework. The first accepts an array of
    usb_string object and for each registeres a string id and the
    second registeres a given number of ids and returns the first.

    This may simplify string ids registration since gadgets and
    composite functions won't have to call usb_string_id() several
    times and each time check for errer status -- all this will be
    done with a single call.

    Signed-off-by: Michal Nazarewicz
    Signed-off-by: Kyungmin Park
    Signed-off-by: Greg Kroah-Hartman

    Michal Nazarewicz
     
  • FunctionFS had a bit unique name for function used to add it
    to USB configuration. Renamed as to match naming convention
    of other functions.

    Signed-off-by: Michal Nazarewicz
    Signed-off-by: Kyungmin Park
    Signed-off-by: Greg Kroah-Hartman

    Michal Nazarewicz
     
  • With this patch, the LPM capable EHCI host controller can put device
    into L1 sleep state which is a mode that can enter/exit quickly, and
    reduce power consumption.

    Signed-off-by: Jacob Pan
    Signed-off-by: Alek Du
    Signed-off-by: Greg Kroah-Hartman

    Alek Du
     
  • EHCI 1.1 addendum introduced several energy efficiency extensions for
    EHCI USB host controllers:
    1. LPM (link power management)
    2. Per-port change
    3. Shorter periodic frame list
    4. Hardware prefetching

    This patch is intended to define the HW bits and debug interface for
    EHCI 1.1 addendum. The LPM and Per-port change patches will be sent out
    after this patch.

    Signed-off-by: Jacob Pan
    Signed-off-by: Alek Du
    Signed-off-by: Greg Kroah-Hartman

    Alek Du
     
  • otg_io_write() function does not follow the declaration of
    struct otg_io_access_ops.

    Signed-off-by: Igor Grinberg
    Signed-off-by: Greg Kroah-Hartman

    Igor Grinberg
     
  • This patch (as1390) fixes a problem that crops up when a UHCI host
    controller is unbound from uhci-hcd while there are still some active
    URBs. The URBs have to be unlinked when the root hub is unregistered,
    and uhci-hcd relies upon root-hub status polls as part of its
    unlinking procedure. But usb_hcd_poll_rh_status() won't make those
    status calls if hcd->rh_registered is clear, and the flag is cleared
    _before_ the unregistration takes place.

    Since hcd->rh_registered is used for other things and needs to be
    cleared early, the solution is to add a new flag (rh_pollable) and use
    it instead. It gets cleared _after_ the root hub is unregistered.

    Now that the status polls don't end too soon, we have to make sure
    they also don't occur too late -- after the root hub's usb_device
    structure or the HCD's private structures are deallocated. Therefore
    the patch adds usb_get_device() and usb_put_device() calls to protect
    the root hub structure, and it adds an extra del_timer_sync() to
    prevent the root-hub timer from causing an unexpected status poll.

    This additional complexity would not be needed if the HCD framework
    had provided separate stop() and release() callbacks instead of just
    stop(). This lack could be fixed at some future time (although it
    would require changes to every host controller driver); when that
    happens this patch won't be needed any more.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     

08 Aug, 2010

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (214 commits)
    ALSA: hda - Add pin-fix for HP dc5750
    ALSA: als4000: Fix potentially invalid DMA mode setup
    ALSA: als4000: enable burst mode
    ALSA: hda - Fix initial capsrc selection in patch_alc269()
    ASoC: TWL4030: Capture route runtime DAPM ordering fix
    ALSA: hda - Add PC-beep whitelist for an Intel board
    ALSA: hda - More relax for pending period handling
    ALSA: hda - Define AC_FMT_* constants
    ALSA: hda - Fix beep frequency on IDT 92HD73xx and 92HD71Bxx codecs
    ALSA: hda - Add support for HDMI HBR passthrough
    ALSA: hda - Set Stream Type in Stream Format according to AES0
    ALSA: hda - Fix Thinkpad X300 so SPDIF is not exposed
    ALSA: hda - FIX to not expose SPDIF on Thinkpad X301, since it does not have the ability to use SPDIF
    ASoC: wm9081: fix resource reclaim in wm9081_register error path
    ASoC: wm8978: fix a memory leak if a wm8978_register fail
    ASoC: wm8974: fix a memory leak if another WM8974 is registered
    ASoC: wm8961: fix resource reclaim in wm8961_register error path
    ASoC: wm8955: fix resource reclaim in wm8955_register error path
    ASoC: wm8940: fix a memory leak if wm8940_register return error
    ASoC: wm8904: fix resource reclaim in wm8904_register error path
    ...

    Linus Torvalds
     

03 Aug, 2010

2 commits


23 Jun, 2010

2 commits


01 Jun, 2010

4 commits


30 May, 2010

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (26 commits)
    ALSA: snd-usb-caiaq: Bump version number to 1.3.21
    ALSA: Revert "ALSA: snd-usb-caiaq: Set default input mode of A4DJ"
    ALSA: snd-usb-caiaq: Simplify single case to an 'if'
    ALSA: snd-usb-caiaq: Restore 'Control vinyl' input mode on A4DJ
    ALSA: hda: Use LPIB for a Shuttle device
    ALSA: hda: Add support for another Lenovo ThinkPad Edge in conexant codec
    ALSA: hda: Use LPIB for Sony VPCS11V9E
    ALSA: usb-audio: fix feature unit parser for UAC2
    ALSA: asihpi - Minor code cleanup
    ALSA: asihpi - Add support for new ASI8800 family
    ALSA: asihpi - Fix bug preventing outstream_write preload from happening
    ALSA: asihpi - Fix imbalanced lock path in hw_message
    ALSA: asihpi - Remove support for old ASI8800 family
    ALSA: asihpi - Add hd radio blend functions
    ALSA: asihpi - Remove unused io map functions
    ALSA: usb-audio: add support for UAC2 pitch control
    ALSA: usb-audio: parse UAC2 endpoint descriptors correctly
    ALSA: usb-audio: fix return values
    ALSA: usb-audio: parse more format descriptors with structs
    sound: Add missing spin_unlock
    ...

    Linus Torvalds
     

27 May, 2010

1 commit


21 May, 2010

16 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (229 commits)
    USB: remove unused usb_buffer_alloc and usb_buffer_free macros
    usb: musb: update gfp/slab.h includes
    USB: ftdi_sio: fix legacy SIO-device header
    USB: kl5usb105: reimplement using generic framework
    USB: kl5usb105: minor clean ups
    USB: kl5usb105: fix memory leak
    USB: io_ti: use kfifo to implement write buffering
    USB: io_ti: remove unsused private counter
    USB: ti_usb: use kfifo to implement write buffering
    USB: ir-usb: fix incorrect write-buffer length
    USB: aircable: fix incorrect write-buffer length
    USB: safe_serial: straighten out read processing
    USB: safe_serial: reimplement read using generic framework
    USB: safe_serial: reimplement write using generic framework
    usb-storage: always print quirks
    USB: usb-storage: trivial debug improvements
    USB: oti6858: use port write fifo
    USB: oti6858: use kfifo to implement write buffering
    USB: cypress_m8: use kfifo to implement write buffering
    USB: cypress_m8: remove unused drain define
    ...

    Fix up conflicts (due to usb_buffer_alloc/free renaming) in
    drivers/input/tablet/acecad.c
    drivers/input/tablet/kbtab.c
    drivers/input/tablet/wacom_sys.c
    drivers/media/video/gspca/gspca.c
    sound/usb/usbaudio.c

    Linus Torvalds
     
  • Lots of minor formatting cleanups in includes/usb/ to make checkpatch
    happier.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • The FunctionFS is a USB composite function that can be used
    with the composite framework to create an USB gadget.

    >From kernel point of view it is just a composite function with
    some unique behaviour. It may be added to an USB
    configuration only after the user space driver has registered
    by writing descriptors and strings (the user space program has
    to provide the same information that kernel level composite
    functions provide when they are added to the configuration).

    >From user space point of view it is a file system which when
    mounted provide an "ep0" file. User space driver need to
    write descriptors and strings to that file. It does not need
    to worry about endpoints, interfaces or strings numbers but
    simply provide descriptors such as if the function was the
    only one (endpoints and strings numbers starting from one and
    interface numbers starting from core). The FunctionFS changes
    numbers of those as needed also handling situation when
    numbers differ in different configurations.

    When descriptors and strings are written "ep#" files appear
    (one for each declared endpoint) which handle communication on
    a single endpoint. Again, FunctionFS takes care of the real
    numbers and changing of the configuration (which means that
    "ep1" file may be really mapped to (say) endpoint 3 (and when
    configuration changes to (say) endpoint 2)). "ep0" is used
    for receiving events and handling setup requests.

    When all files are closed the function disables itself.

    Signed-off-by: Michal Nazarewicz
    Cc: Kyungmin Park
    Cc: Marek Szyprowski
    Signed-off-by: Greg Kroah-Hartman

    Michal Nazarewicz
     
  • Remove multi-urb write from the generic driver and simplify the
    prepare_write_buffer prototype:

    int (*prepare_write_buffer)(struct usb_serial_port *port,
    void *dest, size_t size);

    The default implementation simply fills dest with data from port write
    fifo but drivers can override it if they need to process the outgoing
    data (e.g. add headers).

    Turn ftdi_sio into a generic fifo-based driver, which lowers CPU usage
    significantly for small writes while retaining maximum throughput.

    Signed-off-by: Johan Hovold
    Signed-off-by: Greg Kroah-Hartman

    Johan Hovold
     
  • Reimplement fifo-based writes in the generic driver using a multiple
    pre-allocated urb scheme.

    In contrast to multi-urb writes, no allocations (of urbs or buffers) are
    made during run-time and there is less pressure on the host stack
    queues as currently only two urbs are used (implementation is generic
    and can handle more than two urbs as well, though).

    Initial tests using ftdi_sio show that the implementation achieves the
    same (maximum) throughput at high baudrates as multi-urb writes. The CPU
    usage is much lower than for multi-urb writes for small write requests
    and only slightly higher for large (e.g. 2k) requests (due to extra copy
    via fifo?).

    Also outperforms multi-urb writes for small write requests on an
    embedded arm-9 system, where multi-urb writes are CPU-bound at high
    baudrates (perf reveals that a lot of time is spent in the host stack
    enqueue function -- could perhaps be a bug as well).

    Keeping the original write_urb, buffer and flag for now as there are
    other drivers depending on them.

    Signed-off-by: Johan Hovold
    Signed-off-by: Greg Kroah-Hartman

    Johan Hovold
     
  • The Pipe Usage descriptor is needed for USB Attached SCSI

    Signed-off-by: Matthew Wilcox
    Signed-off-by: Greg Kroah-Hartman

    Matthew Wilcox
     
  • This patch (as1374) cleans up a few loose ends in the
    include/linux/usb/ch11.h header file and exports it to userspace.

    Signed-off-by: Alan Stern
    Cc: Eric Lescouet
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • This patch adds a sysfs entry (/sys/devices/platform/_UDC_/gadget/suspended) to
    show the suspend state of an USB composite gadget.

    Signed-off-by: Fabien Chouteau
    Signed-off-by: Greg Kroah-Hartman

    Fabien Chouteau
     
  • Signed-off-by: Yauheni Kaliuta
    Signed-off-by: Greg Kroah-Hartman

    Yauheni Kaliuta
     
  • Signed-off-by: Yauheni Kaliuta
    Signed-off-by: Greg Kroah-Hartman

    Yauheni Kaliuta
     
  • Bulk endpoint streams were added in the USB 3.0 specification. Streams
    allow a device driver to overload a bulk endpoint so that multiple
    transfers can be queued at once.

    The device then decides which transfer it wants to work on first, and can
    queue part of a transfer before it switches to a new stream. All this
    switching is invisible to the device driver, which just gets a completion
    for the URB. Drivers that use streams must be able to handle URBs
    completing in a different order than they were submitted to the endpoint.

    This requires adding new API to set up xHCI data structures to support
    multiple queues ("stream rings") per endpoint. Drivers will allocate a
    number of stream IDs before enqueueing URBs to the bulk endpoints of the
    device, and free the stream IDs in their disconnect function. See
    Documentation/usb/bulk-streams.txt for details.

    The new mass storage device class, USB Attached SCSI Protocol (UASP), uses
    these streams API.

    Signed-off-by: Sarah Sharp
    Signed-off-by: Greg Kroah-Hartman

    Sarah Sharp
     
  • Allow the xHCI drivers (and any new USB 3.0 drivers) to parse the
    SuperSpeed endpoint companion descriptor to find the maximum number of
    bulk endpoint streams the endpoint supports. This is used to calculate
    the maximum total number of streams the driver can allocate.

    Signed-off-by: Sarah Sharp
    Signed-off-by: Greg Kroah-Hartman

    Sarah Sharp
     
  • Definitions for registers defined by ULPI specification v1.1.

    Signed-off-by: Heikki Krogerus
    Signed-off-by: Greg Kroah-Hartman

    Heikki Krogerus
     
  • g_hid is a USB gadget driver implementing the Human Interface Device class
    specification. The driver handles basic HID protocol handling in the
    kernel, and allows userspace to read/write HID reports trough /dev/hidgX
    character devices.

    Signed-off-by: Fabien Chouteau
    Signed-off-by: Peter Korsgaard
    Signed-off-by: Greg Kroah-Hartman

    Fabien Chouteau
     
  • Generalise write buffer preparation.

    This allows for drivers to manipulate (e.g. add headers) to bulk out
    data before it is sent.

    This adds a new function pointer to usb_serial_driver:

    int (*prepare_write_buffer)(struct usb_serial_port *port,
    void **dest, size_t size, const void *src, size_t count);

    The function is generic and can be used with either kfifo-based or
    multi-urb writes:

    If *dest is NULL the implementation should allocate dest.
    If src is NULL the implementation should use the port write fifo.

    If not set, a generic implementation is used which simply uses memcpy or
    kfifo_out.

    Signed-off-by: Johan Hovold
    Signed-off-by: Greg Kroah-Hartman

    Johan Hovold
     
  • Use dynamic transfer buffer sizes since it is more efficient to let the
    host controller do the partitioning to fit endpoint size. This way we
    also do not use more than one urb per write request.

    Replace max_in_flight_urbs with multi_urb_write flag in struct
    usb_serial_driver to enable multi-urb writes.

    Use MAX_TX_URBS=40 and a max buffer size of PAGE_SIZE to prevent DoS
    attacks.

    Signed-off-by: Johan Hovold
    Signed-off-by: Greg Kroah-Hartman

    Johan Hovold