13 Jul, 2007

40 commits

  • This patch (as915b) combines the public routine usb_port_suspend() and
    the private routine __usb_port_suspend() into a single function.

    By removing the explicit mention of otg_port in the call to
    __usb_port_suspend(), we prevent a possible error in which the system
    tries to perform HNP on the wrong port when a non-targeted device is
    plugged into a non-OTG port.

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

    Alan Stern
     
  • This patch fixes a silicon bug in some NEC OHCI chips. The bug appears
    at random times and is very, very difficult to reproduce. Without the
    following patch, Linux would shut the chip and its associated devices
    down. In Apple PowerBooks this leads to an unusable keyboard and mouse
    (SSH still working). The idea of restarting the chip is taken from
    public Darwin code.

    Signed-off-by: Michael Hanselmann
    Cc: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Michael Hanselmann
     
  • Disable file_storage USB_CONFIG_ATT_WAKEUP as it requires
    user interaction during Chapter 9 tests.

    Signed-off-by: Tony Lindgren
    Acked-by: Alan Stern
    Acked-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Tony Lindgren
     
  • This patch fixes the endianness select for transfer buffers in EHCI
    controllers that have Transaction Translator built in the hub. Also I
    cleaned it up to make rid of magic numbers.

    Signed-off-by: Vladimir Barinov
    Cc:
    Signed-off-by: Greg Kroah-Hartman

    Vladimir Barinov
     
  • Some further cleanup after Oliver's patch to update the tty
    buffering. The input buffer is not used at all anymore, so
    I removed it.

    Signed-off-by: Al Borchers
    Signed-off-by: Greg Kroah-Hartman

    Al Borchers
     
  • this is an update of the whiteheat driver. It fixes:

    - switch from spinlocks to mutexes to prevent sleeping with a spinlock held
    - locking to stop races with disconnect
    - error handling for commands that time out

    Signed-off-by: Oliver Neukum
    Signed-off-by: Greg Kroah-Hartman

    Oliver Neukum
     
  • This patch set introduces usb_anchor and uses it to implement all modern
    APIs in the skeleton driver.

    - proper error reporting in the skeleton driver
    - implementation of flush()

    Signed-off-by: Oliver Neukum
    Signed-off-by: Greg Kroah-Hartman

    Oliver Neukum
     
  • - introduction of usb_anchor and its methods

    Signed-off-by: Oliver Neukum
    Signed-off-by: Greg Kroah-Hartman

    Oliver Neukum
     
  • Patch is to prevent the OTG host of doing 3 times enumeration of
    device when the Host suspends for HNP. The error code used in
    this case is ENOTSUPP.

    Signed-off-by: Vikram Pandita
    Acked-by: Alan Stern
    Acked-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Vikram Pandita
     
  • Fix a few serial gadget issues reported by the latest "sparse":
    some functions should have been defined as static, not just
    declared that way.

    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     
  • in order to be able to switch back to 'flow-control none'
    after having activated 'flow-control rts/cts', I made
    a small change to 'pl2303.c'.

    Signed-off-by: Greg Kroah-Hartman

    t.sefzick
     
  • the generic driver also had its own buffering.

    Signed-off-by: Oliver Neukum

    Oliver Neukum
     
  • this fixes the flushing trouble due to its own buffering for this driver.

    Signed-off-by: Oliver Neukum
    Cc: Al Borchers
    Signed-off-by: Greg Kroah-Hartman

    Oliver Neukum
     
  • the new tty buffering code allows usb drivers to stop private buffering.
    In fact we must do so to allow flushing to work correctly. This does so
    for the visor driver.

    Signed-off-by: Oliver Neukum
    Signed-off-by: Greg Kroah-Hartman

    Oliver Neukum
     
  • Make sure gadgetfs userspace interface is properly exported:

    - Move to ;
    - Export it using Kbuild;
    - Add an #include guard;
    - Correct some internal documentation;
    - Update struct layout so it's the same on 32/64 bit kernels.

    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     
  • Substitute USB instances of __attribute__ ((unused)) functions with the
    newly introduced __maybe_unused.

    Signed-off-by: David Rientjes
    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    David Rientjes
     
  • For MPC831x support, change the ehci-fsl driver to preserve
    bits set in platform code. Add a common CONFIG_USB_EHCI_FSL
    to indicate presence of Freescale EHCI SOC. Add FSL_USB2_DR_OTG
    operating mode support, thus both host and device can work for the
    mini-ab receptacle. Note: this doesn't enable OTG protocol
    support.

    Signed-off-by: Li Yang
    Cc: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Li Yang
     
  • Now select the big-endian configuration options
    CONFIG_USB_EHCI_BIG_ENDIAN_MMIO and CONFIG_USB_EHCI_BIG_ENDIAN_DESC in
    the usb host Kconfig file and not in the platform Kconfig files.

    Signed-off-by: Stefan Roese
    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Stefan Roese
     
  • This patch adds support for the AMCC 440EPx EHCI controller whose
    in-memory data structures and the registers are represented in big-
    endian format.

    Signed-off-by: Stefan Roese
    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Stefan Roese
     
  • The new FT232RL allows setting and getting the value of the latency
    timer, like on the FT232BM. However, the driver will not create the
    sysfs entries for the RL without this one-line patch.

    I have tested it on two systems with successful results.

    From: Stepan Moskovchenko
    Signed-off-by: Greg Kroah-Hartman

    Stepan Moskovchenko
     
  • This patch (as911) replaces some C++-style commented-out debugging
    lines in driver.c with a new "verbose debugging" macro. It makes the
    code look cleaner, and it's easier to turn the debugging on or off.

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

    Alan Stern
     
  • This patch (as908) adds central protection in usbcore for the
    prototypical race between opening and unregistering a char device.
    The spinlock used to protect the minor-numbers array is replaced with
    an rwsem, which can remain locked across a call to a driver's open()
    method. This guarantees that open() and deregister() will be mutually
    exclusive.

    The private locks currently used in several individual drivers for
    this purpose are no longer necessary, and the patch removes them. The
    following USB drivers are affected: usblcd, idmouse, auerswald,
    legousbtower, sisusbvga/sisusb, ldusb, adutux, iowarrior, and
    usb-skeleton.

    As a side effect of this change, usb_deregister_dev() must not be
    called while holding a lock that is acquired by open(). Unfortunately
    a number of drivers do this, but luckily the solution is simple: call
    usb_deregister_dev() before acquiring the lock.

    In addition to these changes (and their consequent code
    simplifications), the patch fixes a use-after-free bug in adutux and a
    race between open() and release() in iowarrior.

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

    Alan Stern
     
  • Okay, found it. The root cause here was a missing CONFIG_USB_SUSPEND=y,
    which means the hci_usb device never got marked as USB_STATE_SUSPENDED,
    which then caused the loop to go on forever.

    The system works fine now with CONFIG_USB_SUSPEND=y in the .config.

    Here's the patch to prevent future lockups for this or other causes.
    I no longer need it, but it does still seem a good idea.

    Signed-off-by: Mark Lord
    Signed-off-by: Greg Kroah-Hartman

    Mark Lord
     
  • Recently, the USB device matching code stopped matching generic interface
    matches against devices with vendor-specific device class values.

    Some drivers now need to explicitly match USB device ID's (in addition to
    generic interface info) to retain the same behaviour as before. This new macro,
    suggested by Alan Stern, makes the explicit device/interface matching a little
    simpler for those users.

    Signed-off-by: Daniel Drake
    Signed-off-by: Greg Kroah-Hartman

    Daniel Drake
     
  • Remove some dead CONFIG_ symbols, and document the status of a few others.
    The "gadget_chips.h" references are by and large to drivers which exist
    but haven't yet been submitted for merging to the main 2.6 tree.

    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     
  • Improvements and fixes to the MCT U232 USB/serial interface driver.
    Implement RTS/CTS hardware flow control. Implement HUPCL. Bring
    handling of DTR and RTS into conformance with other Linux serial
    port drivers - assert both signals when opening device, even if
    "crtscts" is not currently selected.

    Signed-off-by: Dave Platt
    Signed-off-by: Greg Kroah-Hartman

    Dave Platt
     
  • This patch modifies the USB regular 250ms timer to be "perfectly aligned" to
    the second and quarters thereof. This change is there to make sure that if
    you have multiple USB ports, the timers for all these ports will fire at the
    same time rather than all spread out. All spread out wakes the CPU up from
    power saving idle a lot more than needed...

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Greg Kroah-Hartman

    Arjan van de Ven
     
  • This patch adds support for the most recent Digi EdgePort USB serial
    devices.

    Signed-off-by: Martin K. Petersen
    Signed-off-by: Mike Swift
    Signed-off-by: Jeremy McBane
    Signed-off-by: Greg Kroah-Hartman

    Martin K. Petersen
     
  • This patch (as898) changes the port reset code in the hub driver. If
    a connect change occurs, it is reported the same way as a disconnect
    (which of course is what it really is).

    It also changes usb_reset_device(), to prevent the routine from futilely
    retrying the reset after a disconnect has occurred.

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

    Alan Stern
     
  • This patch (as895) fixes up a loose end in the port-handover code for
    the USB-Persist facility. A special case occurs when a high-speed
    device is attached to a port which the user has designated to run at
    full-speed only; the port must be disabled before the handover can
    take place.

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

    Alan Stern
     
  • This patch (as888) adds a new USB device quirk for devices which are
    unable to resume correctly. By using the new code added for the
    USB-persist facility, it is a simple matter to reset these devices
    instead of resuming them. To get things kicked off, a quirk entry is
    added for the Philips PSC805.

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

    Alan Stern
     
  • This patch (as887) changes the way ehci-hcd and ohci-hcd handle a loss
    of VBUS power during suspend. In order for the USB-persist facility
    to work correctly, it is necessary for low- and full-speed devices
    attached to a high-speed port to be handed back to the companion
    controller during resume processing.

    This entails three changes: adding code to ehci-hcd to perform the
    handover, removing code from ohci-hcd to turn off ports during
    root-hub reinit, and adding code to ohci-hcd to turn on ports during
    PCI controller resume. (Other bus glue resume methods for platforms
    supporting high-speed controllers would need a similar change, if any
    existed.)

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

    Alan Stern
     
  • This patch (as886) adds the controversial USB-persist facility,
    allowing USB devices to persist across a power loss during system
    suspend.

    The facility is controlled by a new Kconfig option (with appropriate
    warnings about the potential dangers); when the option is off the
    behavior will remain the same as it is now. But when the option is
    on, people will be able to use suspend-to-disk and keep their USB
    filesystems intact -- something particularly valuable for small
    machines where the root filesystem is on a USB device!

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

    Alan Stern
     
  • Add a class which allows for an easier integration with udev.

    This code was originally written by Paolo Abeni, and arrived to my tree
    as a part of big patch to add binary API on December 18. As I understand,
    Paolo always meant the class to be a part of the whole thing. This is his
    udev rule to go along with the patch:

    KERNEL=="usbmon[0-9]*", NAME="usbmon%n", MODE="0440",OWNER="root",GROUP="bin"

    Signed-off-by: Pete Zaitcev
    Signed-off-by: Greg Kroah-Hartman

    Pete Zaitcev
     
  • Last week I've been searching for a driver for the CA-42 cable (see usb
    below) that fitted my kernel 2.6.20. I only found an abandoned version for a
    driver on your website that indeed worked on 2.6.18 but wouldn't even
    compile with a more recent 2.6.20 kernel.

    I fiddled 2 evenings with the kernel code and have patched it up now to work
    with the modifications in the 2.6.20 kernel. The patch is attached hereafter
    and it works fine (at least for me :-) ).

    Bus 2 Device 13: ID 0ea0:6858 Ours Technology, Inc.

    I had to fiddle a little with the settings in .gnokiirc but that also
    occurred with the older 2.6.18 kernel. Nevertheless, on one system with this
    cable and my Nokia 6070 I had best results with :

    model = 6510
    connection = dku5

    while on an other system with the same kernel, cable and phone it only worked
    with :

    model = AT
    connection = serial
    serial_write_usleep = 1

    From: Kees Lemmens
    Cc:
    Cc:
    Signed-off-by: Greg Kroah-Hartman

    Kees Lemmens
     
  • Remove atomic operations on the reference counter for EHCI queue heads.
    On various platforms (including ppc7448), atomic operations are unusable
    with dma-coherent memory.

    Signed-off-by: Steven J. Hill
    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     
  • Make a "menuconfig" out of the Kconfig objects "menu, ..., endmenu", so that
    the user can disable all the options in that menu at once instead of having to
    disable each option separately.

    Signed-off-by: Jan Engelhardt
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Jan Engelhardt
     
  • This revised patch (as893c) improves the method used by the hub driver
    to release its private data structure. The current code is non-robust,
    relying on a memory region not getting reused by another driver after
    it has been freed. The patch adds a reference count to the structure,
    resolving the question of when to release it.

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

    Alan Stern
     
  • This patch (as892) removes the "locktree" routine from the hub driver.
    It currently is used in only one place, by a single kernel thread;
    hence it isn't doing any good.

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

    Alan Stern
     
  • This revised patch (as891b) removes two unnecessary references to
    intf->dev.power.power_state from usb-storage, and replaces a reference
    to root_hub->dev.power.power_state with a check of hcd->state. This
    is in preparation for the removal of dev.power.power_state, which is
    already deprecated.

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

    Alan Stern