08 Jan, 2009

40 commits

  • Many newer Option mobile broadband devices initially provide a
    usb-storage "driver CD" device that's pretty useless on Linux since
    any software on it most likely wouldn't be compatible with your
    kernel or distro anyway. Thus, by default just kill the driver
    CD device by sending the SCSI 'rezero' command, but allow override
    of the default behavior via usb-storage module parameter so users
    can keep the ZeroCD device if they really want to. Inspired by
    the Sierra TruInstall patch.

    Signed-off-by: Dan Williams
    Acked-by: Marcel Holtmann
    Cc: Peter Henn
    Cc: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Dan Williams
     
  • It is enough to protect accesses to reject field of urb
    by marking it as atomic_t,also it is the only reason of
    existence of usb_reject_lock,so remove the lock to make
    code more clean.

    Signed-off-by: Ming Lei
    Acked-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Ming Lei
     
  • This patch (as1185) makes usbcore take advantage of the bus
    notifications sent out by the driver core. Now we can create all our
    device and interface attribute files before the device or interface
    uevent is broadcast.

    A side effect is that we no longer create the endpoint "pseudo"
    devices at the same time as a device or interface is registered -- it
    seems like a bad idea to try registering an endpoint before the
    registration of its parent is complete. So the routines for creating
    and removing endpoint devices have been split out and renamed, and
    they are called explicitly when needed. A new bitflag is used for
    keeping track of whether or not the interface's endpoint devices have
    been created, since (just as with the interface attributes) they vary
    with the altsetting and hence can be changed at random times.

    Signed-off-by: Alan Stern
    Cc: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • USB: make printk messages more searchable

    Make USB printk messages long and straightforward. One of these
    decorated USB error messages cost me non-trivial efforts to locate.

    Signed-off-by: Wu Fengguang
    Signed-off-by: Greg Kroah-Hartman

    Wu Fengguang
     
  • Signed-off-by: Bryan Wu
    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Bryan Wu
     
  • Don't redefine the functions in musb driver

    Signed-off-by: Bryan Wu
    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Bryan Wu
     
  • Signed-off-by: Bryan Wu
    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Bryan Wu
     
  • Some config registers are not avaiable in Blackfin, we have to comment them out.

    v1-v2:
    - remove Blackfin specific header file
    - add Blackfin register version to musb_regs.h header file

    Signed-off-by: Bryan Wu
    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Bryan Wu
     
  • - DMA registers in Blackfin have different layout
    - DMA interrupt flags need to be cleared by software

    Signed-off-by: Bryan Wu
    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Bryan Wu
     
  • add Blackfin version low level register accessing helper functions

    Signed-off-by: Bryan Wu
    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Bryan Wu
     
  • Make sure we program the correct values in only when necessary.

    Signed-off-by: Robin Getz
    Signed-off-by: Bryan Wu
    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Robin Getz
     
  • - replace MUSB_FIFOSIZE register to MUSB_TXCOUNT, cause no MUSB_FIFOSIZE
    register on Blackfin
    - use #ifdef to replace #if defined()

    Signed-off-by: Bryan Wu
    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Bryan Wu
     
  • Signed-off-by: Bryan Wu
    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Bryan Wu
     
  • The DPCM subdriver is a little peculiar, in that it's meant to support
    devices where LUN 0 is Compact Flash and uses the CB transport whereas
    LUN 1 is SmartMedia and uses the SDDR09 transport. Thus DPCM isn't
    really a transport in itself; it's more like a demultiplexer.

    Much of the DPCM code is part of the SDDR09 subdriver already, and the
    remaining part is fairly small. This patch (as1182) moves that extra
    piece into sddr09.c, thereby eliminating dpcm.c. Also eliminated is
    the Kconfig entry for DPCM support; it is now listed as part of the
    SDDR09 entry.

    In order to make sure that the semantics are the same as before, each
    unusual_devs entry for DPCM is now present twice: once with DPCM
    support if SDDR09 is configured (as before), and once with the
    SINGLE_LUN flag and CB support otherwise.

    Signed-off-by: Alan Stern
    CC: Matthew Dharm
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • This should speed up the option driver's upload speed quite a bit. It has been tested by a number of different people on different devices with success.

    Cc: Roland Wolters
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Some of the usb-serial drivers are starting to use urb->status in ways
    they should not be doing. This fixes up some of them to prevent that.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Contains fixes so probe on x86 PCI runs, apparently I'm first to try
    this. Several fixes to memory access to probe host scratch register.
    Previously would bug check on chip_addr var used uninitialized.
    Scratch reg write failed in one instance due to 16-bit initial access
    mode, so added "& 0x0000ffff" to the readl as fix.
    Includes some general cleanup - remove global vars, organize memory map
    resource use.

    Signed-off-by: Karl Bongers
    Signed-off-by: Sebastian Andrzej Siewior
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Karl Bongers
     
  • this driver can't handle (of course) any brdige class devices. So we
    now are just active on one specific bridge which should be only the
    isp1761 chip behind a PLX bridge.

    Signed-off-by: Sebastian Andrzej Siewior
    Tested-by: Karl Bongers
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Sebastian Andrzej Siewior
     
  • In some obscure scenarios e.g. passing a 0-byte backing file
    storage, wait_for_completion() would wait forever in fsg_cleanup().

    Prevent it by completing the thread in fsg_bind() error path.

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

    Felipe Balbi
     
  • Sparse asked whether these could be static.

    Signed-off-by: Roel Kluin
    Signed-off-by: Greg Kroah-Hartman

    Roel Kluin
     
  • This patch (as1177) modifies the USB core suspend and resume
    routines. The resume functions now will take a pm_message_t argument,
    so they will know what sort of resume is occurring. The new argument
    is also passed to the port suspend/resume and bus suspend/resume
    routines (although they don't use it for anything but debugging).

    In addition, special pm_message_t values are used for user-initiated,
    device-initiated (i.e., remote wakeup), and automatic suspend/resume.
    By testing these values, drivers can tell whether or not a particular
    suspend was an autosuspend. Unfortunately, they can't do the same for
    resumes -- not until the pm_message_t argument is also passed to the
    drivers' resume methods. That will require a bigger change.

    IMO, the whole Power Management framework should have been set up this
    way in the first place.

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

    Alan Stern
     
  • This patch (as1178) uses the new round_jiffies_up_relative() routine
    for setting the autosuspend delayed_work timer. It's appropriate
    since we don't care too much about the exact length of the delay, but
    we don't want it to be too short (rounded down).

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

    Alan Stern
     
  • Move otg_get/set/put_transceiver() from omap specific code
    to common otg.c so other upcoming drivers can share them.

    [ dbrownell@users.sourceforge.net: move to drivers/usb/otg, dox ]

    Signed-off-by: Tony Lindgren
    Signed-off-by: Felipe Balbi
    Signed-off-by: Philipp Zabel
    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Tony Lindgren
     
  • As Russell King points out, calling put_device(otg_transceiver->dev)
    directly in driver cleanup paths makes assumptions about otg_transceiver
    internals.

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

    Philipp Zabel
     
  • gpio_vbus provides simple GPIO VBUS sensing for peripheral
    controllers with an internal transceiver.
    Optionally, a second GPIO can be used to control D+ pullup.

    It also interfaces with the regulator framework to limit charging
    currents when powered via USB. gpio_vbus requests the regulator
    supplying "vbus_draw" and can enable/disable it or limit its
    current depending on USB state.

    [dbrownell@users.sourceforge.net: use drivers/otg, cleanups ]

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

    Philipp Zabel
     
  • This moves the isp1301-omap driver from the drivers/i2c/chips
    directory (which will be shrinking) into a new drivers/usb/otg
    directory (which will grow, with more drivers and utilities).

    Note that OTG infrastructure needs to be initialized before
    either host or peripheral side USB support, and may be needed
    before for pure host or pure peripheral configurations.

    Signed-off-by: David Brownell
    Acked-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     
  • Change the gpio code in the s3c2410_udc to use the
    generic gpio calls instead of the s3c24xx specific
    gpio functions.

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

    Ben Dooks
     
  • Some code in the pxa25x_udc driver wrongly expects the value
    of is_vbus_present() to be 0/1, not zero/nonzero ... cope.
    Issue noted by Jaya Kumar

    This bug has been around since July 2007, and has a simple
    workaround: unplug the Linux gadget, then re-plug it.

    Signed-off-by: David Brownell
    Cc: Jaya Kumar
    Signed-off-by: Greg Kroah-Hartman

    David Brownell
     
  • Without it, in platforms that don't provide irq_chip.set_wake(),
    like omap, musb will WARN() on driver removal.

    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Felipe Balbi
     
  • Trivial patch adding musb's git tree to MAINTAINERS file.

    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Felipe Balbi
     
  • Random host-side MUSB updates, mostly relating to better diagnostics:

    + Improve diagnostics on host side:
    - tx flush fifo:
    * Avoid hundreds of duplicate TX FIFONOTEMPTY messages
    * make "Can't flush TX fifo" a warning, and say which endpoint
    - giveback:
    * use correct status code
    * show completion function name not just URB pointer
    - Fix annoying "1 bytes" (should be "1 byte")

    + Be more consistent about failing init of unusable fifo_mode

    It's not clear why that "can't flush TX fifo" message appears, though
    it might relate to disconnection; I see it not infrequently

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

    David Brownell
     
  • Minor locking fix for musb_hdrc on OMAP3 and OMAP2430:
    don't read DEVCTL without holding the spinlock, since
    an IRQ could come in and corrupt things.

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

    David Brownell
     
  • - update includes after asm/arch --> mach headers move
    - adds musb_platform_set_mode() stub

    Signed-off-by: Kevin Hilman
    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Kevin Hilman
     
  • Fix three omissions in the "mode" sysfs attribute support:
    (a) inability to report errors;
    (b) no DaVinci support ... just report an error;
    (c) for omap2430, accepting unsupportable values

    The 2430 stuff is still odd....

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

    David Brownell
     
  • MIPS USB IP core family device controller
    Currently it only supports IP part number CI13412.

    [dbrownell@users.sourceforge.net: minor comment tweaks]

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

    David Lopo
     
  • Since num is unsigned, it would seem better to use simple_strtoul that
    simple_strtol.

    A simplified version of the semantic patch that makes this change is as
    follows: (http://www.emn.fr/x-info/coccinelle/)

    //
    @r2@
    long e;
    position p;
    @@

    e = simple_strtol@p(...)

    @@
    position p != r2.p;
    type T;
    T e;
    @@

    e =
    - simple_strtol@p
    + simple_strtoul
    (...)
    //

    Signed-off-by: Julia Lawall
    Acked-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Julia Lawall
     
  • Impact: cleanup

    Found this when I changed args to __module_param_call. We now have
    core_param for exactly this, but Greg assures me "nousb" is used as a
    module parameter, so we need the #ifdef MODULE.

    Signed-off-by: Rusty Russell
    Cc: Pete Zaitcev
    Signed-off-by: Greg Kroah-Hartman

    Rusty Russell
     
  • This patch (as1175) makes usb-storage set a SCSI device's
    request-queue bounce limit such that all buffers will be located in
    addressable memory (i.e., not in high memory) if the host controller's
    dma_mask is NULL. This is necessary when the host controller doesn't
    support DMA: If a buffer is in high memory then the both the virtual
    and DMA addresses produced by the scatter-gather library will be NULL,
    preventing the HCD from accessing the buffer's data.

    In particular, the isp1760 driver needs this when used on a system
    with more than 1 GB of memory.

    Signed-off-by: Alan Stern
    CC: Matthew Dharm
    Acked-by: Jens Axboe
    Tested-by: Thomas Hommel
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • This patch (as1174) merges usb-storage's QIC-157 and ATAPI protocol
    routines. Since the two functions are identical, there's no reason to
    keep them separate.

    Signed-off-by: Alan Stern
    Cc: Matthew Dharm
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • This patch (as1173) merges usb-storage's CB and CBI transports into a
    single routine. So much of their code is common, it's silly to keep
    them separate.

    Signed-off-by: Alan Stern
    CC: Matthew Dharm
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern