08 Mar, 2010

2 commits

  • In the future, we are going to be changing the lock type for struct
    device (once we get the lockdep infrastructure properly worked out) To
    make that changeover easier, and to possibly burry the lock in a
    different part of struct device, let's create some functions to lock and
    unlock a device so that no out-of-core code needs to be changed in the
    future.

    This patch creates the device_lock/unlock/trylock() functions, and
    converts all in-tree users to them.

    Cc: Thomas Gleixner
    Cc: Jean Delvare
    Cc: Dave Young
    Cc: Ming Lei
    Cc: Jiri Kosina
    Cc: Phil Carmody
    Cc: Arjan van de Ven
    Cc: Cornelia Huck
    Cc: Rafael J. Wysocki
    Cc: Pavel Machek
    Cc: Len Brown
    Cc: Magnus Damm
    Cc: Alan Stern
    Cc: Randy Dunlap
    Cc: Stefan Richter
    Cc: David Brownell
    Cc: Vegard Nossum
    Cc: Jesse Barnes
    Cc: Alex Chiang
    Cc: Kenji Kaneshige
    Cc: Andrew Morton
    Cc: Andrew Patterson
    Cc: Yu Zhao
    Cc: Dominik Brodowski
    Cc: Samuel Ortiz
    Cc: Wolfram Sang
    Cc: CHENG Renquan
    Cc: Oliver Neukum
    Cc: Frans Pop
    Cc: David Vrabel
    Cc: Kay Sievers
    Cc: Sarah Sharp
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • The recent rework of /proc/bus/usb/devices polling support made
    this structure unused so let's remove it.

    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Linus Torvalds

    Dmitry Torokhov
     

07 Mar, 2010

1 commit

  • The caller of usbfs_conn_disc_event() in some cases (but not always)
    already holds usbfs_mutex, so trying to protect the event counter with
    that lock causes nasty deadlocks.

    The problem was introduced by commit 554f76962d ("USB: Remove BKL from
    poll()") when the BLK protection was turned into using the mutex instead.

    So fix this by using an atomic variable instead. And while we're at it,
    get rid of the atrocious naming of said variable and the waitqueue it is
    associated with.

    This also cleans up the unnecessary locking in the poll routine, since
    the whole point of how the pollwait table works is that you can just add
    yourself to the waiting list, and then check the condition you're
    waiting for afterwards - avoiding all races.

    It also gets rid of the unnecessary dynamic allocation of the device
    status that just contained a single word. We should use f_version for
    this, as Dmitry Torokhov points out. That simplifies everything
    further.

    Reported-and-tested-by: Jeff Chua
    Acked-by: Greg Kroah-Hartman
    Acked-by: Alan Stern
    Cc: Oliver Neukum
    Cc: Dmitry Torokhov
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

05 Mar, 2010

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (52 commits)
    init: Open /dev/console from rootfs
    mqueue: fix typo "failues" -> "failures"
    mqueue: only set error codes if they are really necessary
    mqueue: simplify do_open() error handling
    mqueue: apply mathematics distributivity on mq_bytes calculation
    mqueue: remove unneeded info->messages initialization
    mqueue: fix mq_open() file descriptor leak on user-space processes
    fix race in d_splice_alias()
    set S_DEAD on unlink() and non-directory rename() victims
    vfs: add NOFOLLOW flag to umount(2)
    get rid of ->mnt_parent in tomoyo/realpath
    hppfs can use existing proc_mnt, no need for do_kern_mount() in there
    Mirror MS_KERNMOUNT in ->mnt_flags
    get rid of useless vfsmount_lock use in put_mnt_ns()
    Take vfsmount_lock to fs/internal.h
    get rid of insanity with namespace roots in tomoyo
    take check for new events in namespace (guts of mounts_poll()) to namespace.c
    Don't mess with generic_permission() under ->d_lock in hpfs
    sanitize const/signedness for udf
    nilfs: sanitize const/signedness in dealing with ->d_name.name
    ...

    Fix up fairly trivial (famous last words...) conflicts in
    drivers/infiniband/core/uverbs_main.c and security/tomoyo/realpath.c

    Linus Torvalds
     

04 Mar, 2010

3 commits

  • No one is calling this anymore as everyone has switched to
    invalidate_mapping_pages long time ago. Also update a few
    references to it in comments. nfs has two more, but I can't
    easily figure what they are actually referring to, so I left
    them as-is.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (220 commits)
    USB: backlight, appledisplay: fix incomplete registration failure handling
    USB: pl2303: remove unnecessary reset of usb_device in urbs
    USB: ftdi_sio: remove obsolete check in unthrottle
    USB: ftdi_sio: remove unused tx_bytes counter
    USB: qcaux: driver for auxiliary serial ports on Qualcomm devices
    USB: pl2303: initial TIOCGSERIAL support
    USB: option: add Longcheer/Longsung vendor ID
    USB: fix I2C API usage in ohci-pnx4008.
    USB: usbmon: mask seconds properly in text API
    USB: sisusbvga: no unnecessary GFP_ATOMIC
    USB: storage: onetouch: unnecessary GFP_ATOMIC
    USB: serial: ftdi: add CONTEC vendor and product id
    USB: remove references to port->port.count from the serial drivers
    USB: tty: Prune uses of tty_request_room in the USB layer
    USB: tty: Add a function to insert a string of characters with the same flag
    USB: don't read past config->interface[] if usb_control_msg() fails in usb_reset_configuration()
    USB: tty: kill request_room for USB ACM class
    USB: tty: sort out the request_room handling for whiteheat
    USB: storage: fix misplaced parenthesis
    USB: vstusb.c: removal of driver for Vernier Software & Technology, Inc., devices and spectrometers
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (36 commits)
    jsm: fixing error if the driver fails to load
    jsm: removing the uart structure and filename on error
    tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call
    tty: Keep the default buffering to sub-page units
    tty: Fix up char drivers request_room usage
    tty: Fix the ldisc hangup race
    serial: timberdale: Remove dependancies
    nozomi: Tidy up the PCI table
    nozomi: Fix mutex handling
    nozomi: Add tty_port usage
    sdio_uart: Use kfifo instead of the messy circ stuff
    serial: bcm63xx_uart: allow more than one uart to be registered.
    serial: bcm63xx_uart: don't use kfree() on non kmalloced area.
    serial: bfin_5xx: pull in linux/io.h for ioremap prototypes
    serial: bfin_5xx: kgdboc should accept gdb break only when it is active
    serial: bfin_5xx: need to disable DMA TX interrupt too
    serial: bfin_5xx: remove useless gpio handling with hard flow control
    Char: synclink, remove unnecessary checks
    tty: declare MODULE_FIRMWARE in various drivers
    ip2: Add module parameter.
    ...

    Linus Torvalds
     

03 Mar, 2010

33 commits

  • On error while registering backlight, return it to caller instead of
    returning 0.
    Mark struct backlight_ops as const.

    Signed-off-by: Bruno Prémont
    Signed-off-by: Greg Kroah-Hartman

    Bruno Prémont
     
  • URBs are initialised at probe and do not change.

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

    Johan Hovold
     
  • No need to check ASYNCB_INITIALIZED anymore as commit
    e1108a63e10d344284011cccc06328b2cd3e5da3 (usb_serial: Use the shutdown()
    operation) make sure that there is no longer any call to unthrottle
    after device specific close (in which the read urb is killed).

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

    Johan Hovold
     
  • Remove counter that is never exported.

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

    Johan Hovold
     
  • qcaux: add driver for QCDM-capable ports on various devices

    Many Qualcomm-based devices provide a CDC-ACM port which accepts
    normal AT commands and PPP connections. But they only provide one
    which makes status or signal strength requests impossible while
    PPP is active. They also provide secondary USB interfaces that
    talk the Qualcomm Diagnostic Monitor (QCDM) protocol which can be
    used for status and strength. Make those QCDM ports accessible.

    Signed-off-by: Dan Williams
    Signed-off-by: Greg Kroah-Hartman

    Dan Williams
     
  • I've got a trivial patch for the pl2303 driver, that's what I needed to
    make the wacom serial tablet driver work properly. It uses the
    TIOCGSERIAL ioctl to determine if it's talking to a serial device or
    not, which I gather is rather common, but the pl2303 driver didn't
    implement that ioctl.

    Here's a patch, I'm not sure it's absolutely correct, I mostly looked at
    other similar usbserial drivers to see what I must do, but it works for
    me.

    Signed-off-by: John Tsiombikas
    Signed-off-by: Greg Kroah-Hartman

    John Tsiombikas
     
  • Longcheer is a Chinese company that manufactures the devices which a
    bunch of different companies like Alcatel, 4G Systems, and Mobidata
    rebrand. While I can't find Longcheer's USB ID registered anywhere,
    it's pretty clear the ID is theirs.

    Signed-off-by: Dan Williams
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Dan Williams
     
  • i2c_board_info doesn't contain a member called name. i2c_register_client
    call does not exist.

    Signed-off-by: Luotao Fu
    Acked-by: Jean Delvare
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Luotao Fu
     
  • The code does not implement the comment, so timestamps for long traces
    become confusing instead of wrapping neatly as expected. This was actually
    observed. Fortunately for API being in debugfs, we can just fix this instead
    of staying bug-for-bug compatible. Double fortunately, the stable binary
    API is not affected.

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

    Pete Zaitcev
     
  • If a driver can wait on an event, it can also use GFP_KERNEL.

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

    Oliver Neukum
     
  • No need to use GFP_ATOMIC to allocate buffers.

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

    Oliver Neukum
     
  • This is a patch to ftdi_sio_ids.h and ftdi_sio.c that adds
    identifiers for CONTEC USB serial converter. I tested it
    with the device COM-1(USB)H

    Signed-off-by: Daniel Sangorrin
    Cc: Andreas Mohr
    Signed-off-by: Greg Kroah-Hartman

    Daniel Sangorrin
     
  • This patch (as1344) removes references to port->port.count from the
    USB serial drivers. Now that serial ports are properly reference
    counted, port.count checking is unnecessary and incorrect. Drivers
    should assume that the port is in use from the time the open method
    runs until the close method is called.

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

    Alan Stern
     
  • We have lots of callers that do not need to do this in the first place.
    Remove the calls as they both cost CPU and for big buffers can mess up the
    multi-page allocation avoidance.

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

    Alan Cox
     
  • While looping over the interfaces, if usb_hcd_alloc_bandwidth() fails it calls
    hcd->driver->reset_bandwidth(), so there was no need to reinstate the interface
    again.

    If no break occurred, the index equals config->desc.bNumInterfaces. A
    subsequent usb_control_msg() failure resulted in a read from
    config->interface[config->desc.bNumInterfaces] at label reset_old_alts.

    In either case the last interface should be skipped.

    Signed-off-by: Roel Kluin
    Acked-by: Alan Stern
    Acked-by: Sarah Sharp
    Signed-off-by: Greg Kroah-Hartman

    Roel Kluin
     
  • Signed-off-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Alan Cox
     
  • This driver has its own (surplus) backup queue system which wants removing
    from the receive overflow logic.

    Do this at the same time as removing the request_room logic

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

    Alan Cox
     
  • Due to a misplaced parenthesis the usbat_write_block() return value was not
    stored, but a boolean. USB_STOR_TRANSPORT_NO_SENSE and USB_STOR_TRANSPORT_ERROR
    were returned as USB_STOR_TRANSPORT_FAILED.

    Signed-off-by: Roel Kluin
    Cc: Joe Perches
    Cc: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Roel Kluin
     
  • This patch removes the vstusb driver and support from the Linux tree.
    This driver provided support for Vernier Software & Technology devices
    and spectrometers (Ocean Optics). This driver is being replaced by a
    user space - libusb - implementation.

    Signed-off-by: Jim Collar
    Signed-off-by: Greg Kroah-Hartman

    Dennis O'Brien
     
  • This patch (as1346) changes the idProduct value for USB-3.0 root hubs
    from 0x0002 (which we already use for USB-2.0 root hubs) to 0x0003.

    Signed-off-by: Alan Stern
    Acked-by: Sarah Sharp
    CC: stable
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • This patch (as1347) makes some adjustments to the way usb-storage
    handles the request-queue parameters.

    USB host controllers are able to handle arbitrarily long
    scatter-gather lists, since they are limited only by main memory and
    not by the controller hardware. Hence the sg_tablesize field in the
    host template can be increased to the maximum value.

    Drivers like usb-storage aren't supposed to touch the queue's
    max_sectors parameter; instead they are supposed to use the
    max_hw_sectors value. Accordingly, the patch replaces calls of
    queue_max_sectors() with calls of queue_max_hw_sectors(). Oddly
    enough, the blk_queue_max_sectors() routine is nevertheless still
    appropriate.

    The existing code imposes a limit of SCSI_DEFAULT_MAX_SECTORS (1024)
    on the values accepted by the max_sectors attribute file. There's no
    reason not to accept larger values, so the limit is removed. (It
    would be nice to change the file's name to max_hw_sectors, but the old
    name is already a well-established API.)

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

    Alan Stern
     
  • Texas Instruments DA8xx/OMAP-L1x OHCI glue layer.

    This OHCI implementation is not without quirks: there's only one physical port
    despite the root hub reporting two; the port's power control and over-current
    status bits are not connected to any pins, however, at least on the DA830 EVM
    board, those signals are connected via GPIO, thus the provision was made for
    overriding the OHCI port power and over-current bits at the board level...

    Signed-off-by: Mikhail Cherkashin
    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Greg Kroah-Hartman

    Sergei Shtylyov
     
  • DPLL5 programming was moved out of this file before submission.
    Update the TODO list in the comments to reflect this

    Signed-off-by: Anand Gadiyar
    Signed-off-by: Greg Kroah-Hartman

    Anand Gadiyar
     
  • The current driver reduces the interrupt threshold to 1 microframe.
    This was an accidental change and is not really required.
    The default of 8 microframes will do just fine. So change it back.

    Signed-off-by: Anand Gadiyar
    Signed-off-by: Greg Kroah-Hartman

    Anand Gadiyar
     
  • Kill these compile warnings:
    CC [M] drivers/usb/host/ehci-hcd.o
    drivers/usb/host/ehci-dbg.c:45: warning: 'dbg_hcs_params' defined but not used
    drivers/usb/host/ehci-dbg.c:89: warning: 'dbg_hcc_params' defined but not used

    Signed-off-by: Anand Gadiyar
    Signed-off-by: Greg Kroah-Hartman

    Anand Gadiyar
     
  • A crash has been reported with sierra driver on disconnect with
    Ubuntu/Lucid distribution based on kernel-2.6.32.
    The cause of the crash was determined as "NULL tty pointer was being
    referenced" and the NULL pointer was passed by sierra_indat_callback().

    This patch modifies sierra_indat_callback() function to check for NULL
    tty structure pointer. This modification prevents a crash from happening
    when the device is disconnected.

    This patch fixes the bug reported in Launchpad:
    https://bugs.launchpad.net/ubuntu/+source/linux/+bug/511157

    Signed-off-by: Elina Pasheva
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Elina Pasheva
     
  • This patch adds a new function to the sierra.c driver, sierra_reset_resume().
    This new function completes the suite of Dynamic Power Management commands
    in the sierra.c driver.

    Signed-off-by: Elina Pasheva
    Signed-off-by: Greg Kroah-Hartman

    drivers/usb/serial/sierra.c | 30 ++++++++++++++++++++----------
    1 file changed, 20 insertions(+), 10 deletions(-)

    Elina Pasheva
     
  • According "5.3.6 Capability Parameters (HCCPARAMS)" of xHCI rev0.96 spec,
    value of xECP register indicates a relative offset, in 32-bit words,
    from Base to the beginning of the first extended capability.
    The wrong calculation will cause BIOS handoff fail (not handoff from BIOS)
    in some platform with BIOS USB legacy sup support.

    Signed-off-by: Edward Shao
    Cc: Sarah Sharp
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Edward Shao
     
  • This patch (as1332) removes an unneeded and annoying debugging message
    announcing all USB uevent constructions.

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

    Alan Stern
     
  • We are now refcounted and all the port.count checking is no longer valid
    and in fact produces false warnings.

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

    Alan Cox
     
  • As reported in
    http://bugzilla.kernel.org/show_bug.cgi?id=10980

    Signed-off-by: Alan Cox
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Alan Cox
     
  • Reduces string space a bit
    Neaten a macro redefine of dbg

    Signed-off-by: Joe Perches
    Signed-off-by: Greg Kroah-Hartman

    Joe Perches
     
  • #define dbg adds the newline, messages shouldn't.
    Converted dbg("%s", "some string") to dbg("some string")

    Signed-off-by: Joe Perches
    Signed-off-by: Greg Kroah-Hartman

    Joe Perches