GitHub/mt8127/android_kernel_alcatel_ttab.git
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke...
Linus Torvalds [Wed, 3 Mar 2010 16:53:49 +0000 (08:53 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ryusuke/nilfs2

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2:
  nilfs2: add reader's lock for cno in nilfs_ioctl_sync
  nilfs2: delete unnecessary condition in load_segment_summary
  nilfs2: move iterator to write log into segment buffer
  nilfs2: get rid of s_dirt flag use
  nilfs2: get rid of nilfs_segctor_req struct
  nilfs2: delete unnecessary condition in nilfs_dat_translate
  nilfs2: fix potential hang in nilfs_error on errors=remount-ro
  nilfs2: use mnt_want_write in ioctls where write access is needed
  nilfs2: issue discard request after cleaning segments

14 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec...
Linus Torvalds [Wed, 3 Mar 2010 16:53:17 +0000 (08:53 -0800)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jlbec/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2: (36 commits)
  Ocfs2: Move ocfs2 ioctl definitions from ocfs2_fs.h to newly added ocfs2_ioctl.h
  ocfs2: send SIGXFSZ if new filesize exceeds limit -v2
  ocfs2/userdlm: Add tracing in userdlm
  ocfs2: Use a separate masklog for AST and BASTs
  dlm: allow dlm do recovery during shutdown
  ocfs2: Only bug out in direct io write for reflinked extent.
  ocfs2: fix warning in ocfs2_file_aio_write()
  ocfs2_dlmfs: Enable the use of user cluster stacks.
  ocfs2_dlmfs: Use the stackglue.
  ocfs2_dlmfs: Don't honor truncate.  The size of a dlmfs file is LVB_LEN
  ocfs2: Pass the locking protocol into ocfs2_cluster_connect().
  ocfs2: Remove the ast pointers from ocfs2_stack_plugins
  ocfs2: Hang the locking proto on the cluster conn and use it in asts.
  ocfs2: Attach the connection to the lksb
  ocfs2: Pass lksbs back from stackglue ast/bast functions.
  ocfs2_dlmfs: Move to its own directory
  ocfs2_dlmfs: Use poll() to signify BASTs.
  ocfs2_dlmfs: Add capabilities parameter.
  ocfs2: Handle errors while setting external xattr values.
  ocfs2: Set inline xattr entries with ocfs2_xa_set()
  ...

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Wed, 3 Mar 2010 16:48:58 +0000 (08:48 -0800)]
Merge git://git./linux/kernel/git/gregkh/usb-2.6

* 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
  ...

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
Linus Torvalds [Wed, 3 Mar 2010 16:47:22 +0000 (08:47 -0800)]
Merge git://git./linux/kernel/git/gregkh/tty-2.6

* 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.
  ...

14 years agoMerge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 3 Mar 2010 16:15:37 +0000 (08:15 -0800)]
Merge branch 'x86-apic-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (25 commits)
  x86: Fix out of order of gsi
  x86: apic: Fix mismerge, add arch_probe_nr_irqs() again
  x86, irq: Keep chip_data in create_irq_nr and destroy_irq
  xen: Remove unnecessary arch specific xen irq functions.
  smp: Use nr_cpus= to set nr_cpu_ids early
  x86, irq: Remove arch_probe_nr_irqs
  sparseirq: Use radix_tree instead of ptrs array
  sparseirq: Change irq_desc_ptrs to static
  init: Move radix_tree_init() early
  irq: Remove unnecessary bootmem code
  x86: Add iMac9,1 to pci_reboot_dmi_table
  x86: Convert i8259_lock to raw_spinlock
  x86: Convert nmi_lock to raw_spinlock
  x86: Convert ioapic_lock and vector_lock to raw_spinlock
  x86: Avoid race condition in pci_enable_msix()
  x86: Fix SCI on IOAPIC != 0
  x86, ia32_aout: do not kill argument mapping
  x86, irq: Move __setup_vector_irq() before the first irq enable in cpu online path
  x86, irq: Update the vector domain for legacy irqs handled by io-apic
  x86, irq: Don't block IRQ0_VECTOR..IRQ15_VECTOR's on all cpu's
  ...

14 years agoMerge branch 'x86-bootmem-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 3 Mar 2010 16:15:05 +0000 (08:15 -0800)]
Merge branch 'x86-bootmem-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-bootmem-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (30 commits)
  early_res: Need to save the allocation name in drop_range_partial()
  sparsemem: Fix compilation on PowerPC
  early_res: Add free_early_partial()
  x86: Fix non-bootmem compilation on PowerPC
  core: Move early_res from arch/x86 to kernel/
  x86: Add find_fw_memmap_area
  Move round_up/down to kernel.h
  x86: Make 32bit support NO_BOOTMEM
  early_res: Enhance check_and_double_early_res
  x86: Move back find_e820_area to e820.c
  x86: Add find_early_area_size
  x86: Separate early_res related code from e820.c
  x86: Move bios page reserve early to head32/64.c
  sparsemem: Put mem map for one node together.
  sparsemem: Put usemap for one node together
  x86: Make 64 bit use early_res instead of bootmem before slab
  x86: Only call dma32_reserve_bootmem 64bit !CONFIG_NUMA
  x86: Make early_node_mem get mem > 4 GB if possible
  x86: Dynamically increase early_res array size
  x86: Introduce max_early_res and early_res_count
  ...

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Wed, 3 Mar 2010 16:08:44 +0000 (08:08 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: (23 commits)
  firewire: ohci: extend initialization log message
  firewire: ohci: fix IR/IT context mask mixup
  firewire: ohci: add module parameter to activate quirk fixes
  firewire: ohci: use an ID table for quirks detection
  firewire: ohci: reorder struct fw_ohci for better cache efficiency
  firewire: ohci: remove unused dualbuffer IR code
  firewire: core: combine a bit of repeated code
  firewire: core: change type of a data buffer
  firewire: cdev: increment ABI version number
  firewire: cdev: add more flexible cycle timer ioctl
  firewire: core: rename an internal function
  firewire: core: fix an information leak
  firewire: core: increase stack size of config ROM reader
  firewire: core: don't fail device creation in case of too large config ROM blocks
  firewire: core: fix "giving up on config rom" with Panasonic AG-DV2500
  firewire: remove incomplete Bus_Time CSR support
  firewire: get_cycle_timer optimization and cleanup
  firewire: ohci: enable cycle timer fix on ALi and NEC controllers
  firewire: ohci: work around cycle timer bugs on VIA controllers
  firewire: make PCI device id constant
  ...

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi...
Linus Torvalds [Wed, 3 Mar 2010 16:08:21 +0000 (08:08 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mszeredi/fuse

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
  fuse: fix large stack use
  fuse: cleanup in fuse_notify_inval_...()

14 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platf...
Linus Torvalds [Wed, 3 Mar 2010 15:41:24 +0000 (07:41 -0800)]
Merge branch 'for_linus' of git://git./linux/kernel/git/mjg59/platform-drivers-x86

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86: (45 commits)
  compal-laptop: Make it depend on CONFIG_RFKILL
  classmate-laptop: Added some keys present in other devices
  MAINTAINERS: Add git tree to x86 Platform Drivers
  asus-acpi: remove duplicate comparison of asus_model strings
  toshiba-acpi: fix multimedia keys on some machines
  dell-laptop: Fix errors on failure and exit paths
  dell-laptop: Fix build error by making buffer_mutex static
  asus-laptop: fix style problems reported by checkpath.pl
  asus-laptop: use device_create_file() instead of platform_group
  asus-laptop: clean led code
  asus-laptop: add gps rfkill
  asus-laptop: set initial lcd state
  asus-laptop: leds, remove dead code and fix asus_led_exit()/asus_led_init()
  asus-laptop: add backlight changes notifications
  asus-laptop: add bluetooth keys found on M9V
  asus-laptop: switch to sparse keymap library
  asus-laptop: rename wireless_status to wlan_status to avoid confusion
  asus-laptop: add error check for write_acpi_int calls
  asus-laptop: stop using ASUS_HANDLE and use relative methods instead
  asus-laptop: rename function talking directly to acpi with asus_xxx scheme
  ...

14 years agoMerge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvar...
Linus Torvalds [Wed, 3 Mar 2010 15:34:47 +0000 (07:34 -0800)]
Merge branch 'i2c-for-linus' of git://git./linux/kernel/git/jdelvare/staging

* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  i2c: Document the message size limit
  i2c-algo-pca: Drop duplicate variable
  i2c: Hook up runtime PM support
  i2c-parport-light: Add SMBus alert support
  i2c-parport: Add SMBus alert support
  i2c: Separate Kconfig option for i2c-smbus
  i2c: Add SMBus alert support
  i2c-parport: Give powered devices some time to settle
  i2c-tiny-usb: Fix a comment on bus frequency
  i2c-i801: Add Intel Cougar Point device IDs
  i2c: Make PCI device ids constant

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu
Linus Torvalds [Wed, 3 Mar 2010 15:34:18 +0000 (07:34 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tj/percpu

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
  percpu: add __percpu sparse annotations to what's left
  percpu: add __percpu sparse annotations to fs
  percpu: add __percpu sparse annotations to core kernel subsystems
  local_t: Remove leftover local.h
  this_cpu: Remove pageset_notifier
  this_cpu: Page allocator conversion
  percpu, x86: Generic inc / dec percpu instructions
  local_t: Move local.h include to ringbuffer.c and ring_buffer_benchmark.c
  module: Use this_cpu_xx to dynamically allocate counters
  local_t: Remove cpu_local_xx macros
  percpu: refactor the code in pcpu_[de]populate_chunk()
  percpu: remove compile warnings caused by __verify_pcpu_ptr()
  percpu: make accessors check for percpu pointer in sparse
  percpu: add __percpu for sparse.
  percpu: make access macros universal
  percpu: remove per_cpu__ prefix.

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw
Linus Torvalds [Wed, 3 Mar 2010 15:33:50 +0000 (07:33 -0800)]
Merge git://git./linux/kernel/git/steve/gfs2-2.6-nmw

* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw:
  GFS2: print glock numbers in hex
  GFS2: ordered writes are backwards
  GFS2: Remove old, unused linked list code from quota
  GFS2: Remove loopy umount code
  GFS2: Metadata address space clean up

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Wed, 3 Mar 2010 15:33:17 +0000 (07:33 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (48 commits)
  IB/srp: Clean up error path in srp_create_target_ib()
  IB/srp: Split send and recieve CQs to reduce number of interrupts
  RDMA/nes: Add support for KR device id 0x0110
  IB/uverbs: Use anon_inodes instead of private infinibandeventfs
  IB/core: Fix and clean up ib_ud_header_init()
  RDMA/cxgb3: Mark RDMA device with CXIO_ERROR_FATAL when removing
  RDMA/cxgb3: Don't allocate the SW queue for user mode CQs
  RDMA/cxgb3: Increase the max CQ depth
  RDMA/cxgb3: Doorbell overflow avoidance and recovery
  IB/core: Pack struct ib_device a little tighter
  IB/ucm: Clean whitespace errors
  IB/ucm: Increase maximum devices supported
  IB/ucm: Use stack variable 'base' in ib_ucm_add_one
  IB/ucm: Use stack variable 'devnum' in ib_ucm_add_one
  IB/umad: Clean whitespace
  IB/umad: Increase maximum devices supported
  IB/umad: Use stack variable 'base' in ib_umad_init_port
  IB/umad: Use stack variable 'devnum' in ib_umad_init_port
  IB/umad: Remove port_table[]
  IB/umad: Convert *cdev to cdev in struct ib_umad_port
  ...

14 years agodocbook: fix errors from x86 headers merger
Randy Dunlap [Tue, 2 Mar 2010 06:06:25 +0000 (22:06 -0800)]
docbook: fix errors from x86 headers merger

Fix docbook errors for x86 headers that were recently merged:

docproc: arch/x86/include/asm/atomic_32.h: No such file or directory
docproc: arch/x86/include/asm/io_32.h: No such file or directory

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Wed, 3 Mar 2010 15:32:10 +0000 (07:32 -0800)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  [CIFS] pSesInfo->sesSem is used as mutex. Rename it to session_mutex and
  [CIFS] Use unsigned ea length for clarity
  cifs: set server_eof in cifs_fattr_to_inode
  [CIFS] Minor cleanup to EA patch
  cifs: merge CIFSSMBQueryEA with CIFSSMBQAllEAs
  cifs: verify lengths of QueryAllEAs reply
  cifs: increase maximum buffer size in CIFSSMBQAllEAs
  cifs: rename name_len to list_len in CIFSSMBQAllEAs
  cifs: clean up indentation in CIFSSMBQAllEAs
  cifs: add parens around smb_var in BCC macros

14 years agoUSB: backlight, appledisplay: fix incomplete registration failure handling
Bruno Prémont [Fri, 26 Feb 2010 12:02:04 +0000 (13:02 +0100)]
USB: backlight, appledisplay: fix incomplete registration failure handling

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 <bonbons@linux-vserver.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: pl2303: remove unnecessary reset of usb_device in urbs
Johan Hovold [Thu, 25 Feb 2010 19:52:30 +0000 (20:52 +0100)]
USB: pl2303: remove unnecessary reset of usb_device in urbs

URBs are initialised at probe and do not change.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ftdi_sio: remove obsolete check in unthrottle
Johan Hovold [Thu, 25 Feb 2010 19:19:10 +0000 (20:19 +0100)]
USB: ftdi_sio: remove obsolete check in unthrottle

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 <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ftdi_sio: remove unused tx_bytes counter
Johan Hovold [Thu, 25 Feb 2010 19:18:13 +0000 (20:18 +0100)]
USB: ftdi_sio: remove unused tx_bytes counter

Remove counter that is never exported.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: qcaux: driver for auxiliary serial ports on Qualcomm devices
Dan Williams [Thu, 25 Feb 2010 18:39:20 +0000 (10:39 -0800)]
USB: qcaux: driver for auxiliary serial ports on Qualcomm devices

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 <dcbw@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: pl2303: initial TIOCGSERIAL support
John Tsiombikas [Thu, 25 Feb 2010 15:09:08 +0000 (17:09 +0200)]
USB: pl2303: initial TIOCGSERIAL support

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 <nuclear@member.fsf.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: option: add Longcheer/Longsung vendor ID
Dan Williams [Wed, 17 Feb 2010 02:43:29 +0000 (18:43 -0800)]
USB: option: add Longcheer/Longsung vendor ID

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 <dcbw@redhat.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: fix I2C API usage in ohci-pnx4008.
Luotao Fu [Fri, 19 Feb 2010 14:42:00 +0000 (15:42 +0100)]
USB: fix I2C API usage in ohci-pnx4008.

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

Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
Acked-by: Jean Delvare <khali@linux-fr.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: usbmon: mask seconds properly in text API
Pete Zaitcev [Sat, 20 Feb 2010 06:55:57 +0000 (23:55 -0700)]
USB: usbmon: mask seconds properly in text API

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 <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: sisusbvga: no unnecessary GFP_ATOMIC
Oliver Neukum [Sat, 20 Feb 2010 00:40:54 +0000 (01:40 +0100)]
USB: sisusbvga: no unnecessary GFP_ATOMIC

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

Signed-off-by: Oliver Neukum <neukum@b1-systems.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: storage: onetouch: unnecessary GFP_ATOMIC
Oliver Neukum [Sat, 20 Feb 2010 01:03:19 +0000 (02:03 +0100)]
USB: storage: onetouch: unnecessary GFP_ATOMIC

No need to use GFP_ATOMIC to allocate buffers.

Signed-off-by: Oliver Neukum <neukum@b1-systems.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: ftdi: add CONTEC vendor and product id
Daniel Sangorrin [Mon, 22 Feb 2010 02:03:11 +0000 (11:03 +0900)]
USB: serial: ftdi: add CONTEC vendor and product id

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 <daniel.sangorrin@gmail.com>
Cc: Andreas Mohr <andi@lisas.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: remove references to port->port.count from the serial drivers
Alan Stern [Wed, 17 Feb 2010 15:05:47 +0000 (10:05 -0500)]
USB: remove references to port->port.count from the serial drivers

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 <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: tty: Prune uses of tty_request_room in the USB layer
Alan Cox [Thu, 18 Feb 2010 16:44:01 +0000 (16:44 +0000)]
USB: tty: Prune uses of tty_request_room in the USB layer

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 <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: tty: Add a function to insert a string of characters with the same flag
Alan Cox [Thu, 18 Feb 2010 16:43:54 +0000 (16:43 +0000)]
USB: tty: Add a function to insert a string of characters with the same flag

The USB drivers often want to insert a series of bytes all with the same
flag set - provide a helper for this case.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: don't read past config->interface[] if usb_control_msg() fails in usb_reset_conf...
Roel Kluin [Thu, 18 Feb 2010 01:36:23 +0000 (02:36 +0100)]
USB: don't read past config->interface[] if usb_control_msg() fails in usb_reset_configuration()

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 <roel.kluin@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: tty: kill request_room for USB ACM class
Alan Cox [Wed, 17 Feb 2010 13:07:05 +0000 (13:07 +0000)]
USB: tty: kill request_room for USB ACM class

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: tty: sort out the request_room handling for whiteheat
Alan Cox [Wed, 17 Feb 2010 13:06:57 +0000 (13:06 +0000)]
USB: tty: sort out the request_room handling for whiteheat

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 <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: storage: fix misplaced parenthesis
Roel Kluin [Wed, 17 Feb 2010 10:50:26 +0000 (11:50 +0100)]
USB: storage: fix misplaced parenthesis

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 <roel.kluin@gmail.com>
Cc: Joe Perches <joe@perches.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: vstusb.c: removal of driver for Vernier Software & Technology, Inc., devices...
Dennis O'Brien [Mon, 15 Feb 2010 16:50:38 +0000 (08:50 -0800)]
USB: vstusb.c: removal of driver for Vernier Software & Technology, Inc., devices and spectrometers

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 <jim.collar@eqware.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: fix the idProduct value for USB-3.0 root hubs
Alan Stern [Thu, 25 Feb 2010 18:19:37 +0000 (13:19 -0500)]
USB: fix the idProduct value for USB-3.0 root hubs

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 <stern@rowland.harvard.edu>
Acked-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
CC: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agousb-storage: use max_hw_sectors instead of max_sectors
Alan Stern [Fri, 26 Feb 2010 16:49:39 +0000 (11:49 -0500)]
usb-storage: use max_hw_sectors instead of max_sectors

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 <stern@rowland.harvard.edu>
CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: OHCI: DA8xx/OMAP-L1x glue layer
Sergei Shtylyov [Fri, 12 Feb 2010 19:52:34 +0000 (23:52 +0400)]
USB: OHCI: DA8xx/OMAP-L1x glue layer

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 <mcherkashin@ru.mvista.com>
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ehci: omap: Update TODO list in comments
Anand Gadiyar [Fri, 12 Feb 2010 12:19:00 +0000 (17:49 +0530)]
USB: ehci: omap: Update TODO list in comments

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 <gadiyar@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ehci: omap: use default interrupt threshold
Anand Gadiyar [Fri, 12 Feb 2010 12:18:59 +0000 (17:48 +0530)]
USB: ehci: omap: use default interrupt threshold

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 <gadiyar@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: omap: ehci: kill 2 compile warnings
Anand Gadiyar [Fri, 12 Feb 2010 12:24:59 +0000 (17:54 +0530)]
USB: omap: ehci: kill 2 compile warnings

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 <gadiyar@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: sierra driver indat_callback fix
Elina Pasheva [Mon, 15 Feb 2010 22:50:14 +0000 (14:50 -0800)]
USB: serial: sierra driver indat_callback fix

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 <epasheva@sierrawireless.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: sierra driver adding reset_resume function
Elina Pasheva [Fri, 12 Feb 2010 02:37:40 +0000 (18:37 -0800)]
USB: serial: sierra driver adding reset_resume function

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 <epasheva@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
 drivers/usb/serial/sierra.c |   30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)

14 years agoUSB: xhci: Fix finding extended capabilities registers
Edward Shao [Wed, 10 Feb 2010 19:37:30 +0000 (03:37 +0800)]
USB: xhci: Fix finding extended capabilities registers

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 <laface.tw@gmail.com>
Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: remove debugging message for uevent constructions
Alan Stern [Mon, 8 Feb 2010 14:45:12 +0000 (09:45 -0500)]
USB: remove debugging message for uevent constructions

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

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty: Fix various bogus WARN checks in the usb serial layer
Alan Cox [Mon, 8 Feb 2010 10:10:04 +0000 (10:10 +0000)]
tty: Fix various bogus WARN checks in the usb serial layer

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 <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: cp210x: Add 81E8 (Zephyr Bioharness)
Alan Cox [Mon, 8 Feb 2010 10:10:44 +0000 (10:10 +0000)]
USB: cp210x: Add 81E8 (Zephyr Bioharness)

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

Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: Extend and neaten dbg macros
Joe Perches [Sat, 6 Feb 2010 02:09:49 +0000 (18:09 -0800)]
USB: Extend and neaten dbg macros

Add format/argument validation for #ifndef DEBUG dbg macro
Neaten dbg macro definitions

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: Convert concatenated __FILE__ to %s, __FILE__
Joe Perches [Sat, 6 Feb 2010 01:51:13 +0000 (17:51 -0800)]
USB: Convert concatenated __FILE__ to %s, __FILE__

Reduces string space a bit
Neaten a macro redefine of dbg

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: Remove unnecessary \n's from dbg uses
Joe Perches [Sat, 6 Feb 2010 00:50:08 +0000 (16:50 -0800)]
USB: serial: Remove unnecessary \n's from dbg uses

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

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ehci-dbgp: split PID register updates for IN and OUT pipes
Jason Wessel [Fri, 5 Feb 2010 17:49:05 +0000 (11:49 -0600)]
USB: ehci-dbgp: split PID register updates for IN and OUT pipes

This patch addresses two problems:

1) Bulk reads should always use the DATA0 for the pid, and the write
   PID should toggle between DATA0 and DATA1.  The fix is using
   dbgp_pid_write_update() and dbgp_pid_read_update().

2) The delay loop for waiting for a transaction was not long enough to
   always complete the initial handshake inside dbgp_wait_until_done().
   After the initial handshake the maximum delay length is never reached.

The combined result of these two changes allows for the removal of the
forced resynchronization where a bulk write was issued with a dummy
data payload only to get the device to start accepting data writes
again.

CC: Eric Biederman <ebiederm@xmission.com>
CC: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: Add support for ViVOtech ViVOpay devices.
Forest Bond [Fri, 5 Feb 2010 16:30:28 +0000 (11:30 -0500)]
USB: serial: Add support for ViVOtech ViVOpay devices.

Add support for USB serial interface provided by ViVOtech ViVOpay devices via
new driver vivopay-serial.  Currently only the ViVOpay 8800 device is supported,
but support for similar devices can be added by adding the appropriate device
IDs to the driver.

Signed-off-by: Forest Bond <forest.bond@outpostembedded.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: atmel uaba: Adding invert vbus_pin
Eirik Aanonsen [Fri, 5 Feb 2010 08:49:25 +0000 (09:49 +0100)]
USB: atmel uaba: Adding invert vbus_pin

Adding vbus_pin_inverted so that the usb detect pin can be active high
or low depending on HW implementation also replaced the
gpio_get_value(udc->vbus_pin); with a call to vbus_is_present(udc); This
allows the driver to be loaded and save about 0,15W on the consumption.

Signed-off-by: Eirik Aanonsen <eaa@wprmedical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: Remove unsupported usb gadget drivers
Christoph Egger [Fri, 5 Feb 2010 12:24:12 +0000 (13:24 +0100)]
USB: Remove unsupported usb gadget drivers

A bunch of USB gadget drivers where never ported from the linux 2.4
series to 2.6 kernels. However there's some code still in the tree for
them which isn't used and is probably untested for ages.

As the chance of these drivers being forward ported is probably quite
small now it might be time to get rid of them.

Signed-off-by: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: f_mass_storage: fix crash on bind() error
Peter Korsgaard [Thu, 4 Feb 2010 16:15:25 +0000 (17:15 +0100)]
USB: f_mass_storage: fix crash on bind() error

init_completion() hasn't been called yet and the thread isn't created
if we end up here, so don't call complete() on thread_notifier.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Michal Nazarewicz <m.nazarewicz@samsung.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: cdc-acm: fix possible deadlock with multiple openers
Oliver Neukum [Wed, 3 Feb 2010 16:10:22 +0000 (17:10 +0100)]
USB: cdc-acm: fix possible deadlock with multiple openers

The lock must be dropped before usb_autopm_interface_put() is called

Signed-off-by: Oliver Neukum <oliver@neukum.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: g_mass_storage: min(...) warning fixed
Michal Nazarewicz [Wed, 3 Feb 2010 10:37:17 +0000 (11:37 +0100)]
USB: g_mass_storage: min(...) warning fixed

This patch fixes warning caused by calling min() macro
with arguments of different types:

  drivers/usb/gadget/f_mass_storage.c:623: warning: \
  comparison of distinct pointer types lacks a cast

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com>
Cc: Marek Szyprowski <m.nazarewicz@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: musb: test always evaluates to false
Roel Kluin [Tue, 2 Feb 2010 22:47:17 +0000 (14:47 -0800)]
USB: musb: test always evaluates to false

The removed part always evaluates to false.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
14 years agoUSB: isp1760: Flush the D-cache for the pipe-in transfer buffers
Catalin Marinas [Tue, 2 Feb 2010 15:31:02 +0000 (15:31 +0000)]
USB: isp1760: Flush the D-cache for the pipe-in transfer buffers

When the HDC driver writes the data to the transfer buffers it pollutes
the D-cache (unlike DMA drivers where the device writes the data). If
the corresponding pages get mapped into user space, there are no
additional cache flushing operations performed and this causes random
user space faults on architectures with separate I and D caches
(Harvard) or those with aliasing D-cache.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Matthew Dharm <mdharm-kernel@one-eyed-alien.net>
Cc: Greg KH <greg@kroah.com>
Cc: Sebastian Siewior <bigeasy@linutronix.de>
Cc: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: add new ftdi_sio device ids
Mitchell Solomon [Fri, 12 Feb 2010 18:23:18 +0000 (13:23 -0500)]
USB: add new ftdi_sio device ids

PID patch for my products

Signed-off-by: Mitchell Solomon <mitchjs@rush2112.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ftdi_sio: Replace BKL with a mutex
Alessio Igor Bogani [Tue, 2 Feb 2010 15:18:28 +0000 (16:18 +0100)]
USB: ftdi_sio: Replace BKL with a mutex

As Alan Cox have pinpointed the driver still required protection against
parallels calls to the config ioctl(). If lock is still necessary the use of
BKL is abused here. So replace BKL with a more convenient mutex.

Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Johan Hovold <jhovold@gmail.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Daniel Mack <daniel@caiaq.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agousb: gadgetfs: Convert semaphore to mutex
Thomas Gleixner [Fri, 29 Jan 2010 20:38:59 +0000 (20:38 +0000)]
usb: gadgetfs: Convert semaphore to mutex

The semaphore data->lock is semantically a mutex. Convert it to a real
mutex.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: g_mass_storage: superfluous and missing packets fixed
Michal Nazarewicz [Wed, 27 Jan 2010 10:14:28 +0000 (11:14 +0100)]
USB: g_mass_storage: superfluous and missing packets fixed

The mass storage function responded needlessly to a set
configuration packet.  This was a leftover from converting
gadget (file storage gadget) into a composite function.

Moreover, it has failed to respond to get max LUN request.
Adding request queueing made the function work better.

Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: mass_storage: eject LUNs on thread exit
Michal Nazarewicz [Thu, 28 Jan 2010 12:05:26 +0000 (13:05 +0100)]
USB: mass_storage: eject LUNs on thread exit

Adds a fallback which forces all LUNs ejection (including
non-removable and with prevent_medium_removal flag) when mass storage
function (MSF) worker thread exits and gadget fails to handle the
situation.

Previously, if thread_exits was not specified mass storage function
(MSF) did nothing when exiting thread as it's unclear for *function*
what to do when it's thread terminates so responsibility of handling
this situation was left to the *gadget* using the function.

The g_mass_storage handled the situation by unregistering itself (the
same thing that file storage gadget does).  However, g_multi did
nothing and so MSF did not eject LUNs which prevented file system
unmounting.

Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: musb: disable double buffering for older RTL versions
Cliff Cai [Fri, 29 Jan 2010 01:44:18 +0000 (20:44 -0500)]
USB: musb: disable double buffering for older RTL versions

Trying to use double buffer modes in RTL versions <2.0 may result in
infinite hangs or data corruption.  So avoid them with older versions.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: musb: set version of Blackfin version
Cliff Cai [Fri, 29 Jan 2010 01:43:44 +0000 (20:43 -0500)]
USB: musb: set version of Blackfin version

All current Blackfin parts are using RTL v1.9, but they don't expose the
hardware registers to probe this dynamically.  So hardcode the version to
v1.9 for now.

Need to move the local hwvers related defines higher up in the header so
that sub-musb headers may utilize them.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: pxa27x_udc: Fix deadlocks on request queueing
Robert Jarzmik [Wed, 27 Jan 2010 17:38:03 +0000 (18:38 +0100)]
USB: pxa27x_udc: Fix deadlocks on request queueing

As reported by Antonio, there are cases where the ep->lock
can be taken twice, triggering a deadlock.
The typical sequence is :
 irq_handler
   \
    -> gadget.complete()
       \
        -> pxa27x_udc.pxa_ep_queue() : ep->lock is taken
           \
            -> gadget.complete()
               \
                -> pxa27x_udc.pxa_ep_queue() : ep->lock is taken
                                               ==> *deadlock*
The patch fixes this by :
 - releasing the lock each time gadget.complete() is called
 - adding a check in handle_ep() to detect a recursive call,
   in which case the function becomes on no-op.

The patch is still not good enough for ep0. For this unique
endpoint, another well thought over patch will be needed.

Reported-by: Antonio Ospite <ospite@studenti.unina.it>
Tested-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: add support for serial port on the moschip 7715
Mike Dunn [Tue, 26 Jan 2010 17:12:12 +0000 (12:12 -0500)]
USB: serial: add support for serial port on the moschip 7715

Add support for the serial port on devices based on the MosChip 7715,
which provides a serial and parallel port on a single usb interface.
This is added to the existing driver for the Moschip 7720 dual serial
port device.  The 7715 is very similiar to the 7720, requiring only the
addition of a calc_num_ports() function, a separate interrupt-in
endpoint callback, and some manipulation of the port pointers added to
the attach() function to correct the fact that the usbserial core
erroneously assigns the first bulk in/out endpoint pair to the serial
port (the 7715 uses these for its parallel port).  There is no support
for the 7715's parallel port yet.

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: io_edgeport: eliminate get_string()
Dan Carpenter [Mon, 25 Jan 2010 11:53:33 +0000 (14:53 +0300)]
USB: io_edgeport: eliminate get_string()

Johan Hovold points out that get_string() is basically just a
re-implimentation of usb_string().  It is also buggy.  It does DMA on
the stack and it doesn't handle negative returns from
usb_get_descriptor().  Plus unicode_to_ascii() is a rubbish function and
moving to usb_string() avoids using it.

Let's eliminate get_string() entirely.

Reported-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: s3c-hsotg: replace deprecated dma_sync_single()
FUJITA Tomonori [Mon, 25 Jan 2010 02:07:19 +0000 (11:07 +0900)]
USB: s3c-hsotg: replace deprecated dma_sync_single()

This replaces deprecated dma_sync_single() with dma_sync_single_for_cpu().

There is no functional change because dma_sync_single() simply calls
dma_sync_single_for_cpu():

static inline void __deprecated dma_sync_single(struct device *dev,
                   dma_addr_t addr, size_t size,
enum dma_data_direction dir)
{
dma_sync_single_for_cpu(dev, addr, size, dir);
}

This fixes the following compile warnings:

drivers/usb/gadget/s3c-hsotg.c: In function 's3c_hsotg_unmap_dma':
drivers/usb/gadget/s3c-hsotg.c:376: warning: 'dma_sync_single' is deprecated (declared at /home/fujita/git/linux-2.6/include/linux/dma-mapping.h:109)
drivers/usb/gadget/s3c-hsotg.c: In function 's3c_hsotg_map_dma':
drivers/usb/gadget/s3c-hsotg.c:758: warning: 'dma_sync_single' is deprecated (declared at /home/fujita/git/linux-2.6/include/linux/dma-mapping.h:109)

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: musb: only print info message if probe() is successful
Felipe Balbi [Thu, 21 Jan 2010 13:33:58 +0000 (15:33 +0200)]
USB: musb: only print info message if probe() is successful

we were printing the info about musb probe too early where
it was still possible for things to go wrong. Move the
down right before the return 0 statement. While at that
also convert pr_info to dev_info.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: musb: unmap base if we can't probe
Felipe Balbi [Thu, 21 Jan 2010 13:33:57 +0000 (15:33 +0200)]
USB: musb: unmap base if we can't probe

when probe() fails, we should iounmap() the mapped address.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: musb: tusb6010: use resource_size
Felipe Balbi [Thu, 21 Jan 2010 13:33:56 +0000 (15:33 +0200)]
USB: musb: tusb6010: use resource_size

Trivial patch, no functional changes.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: musb: deprecate what we don't use
Felipe Balbi [Thu, 21 Jan 2010 13:33:55 +0000 (15:33 +0200)]
USB: musb: deprecate what we don't use

after 2.6.34, those fields will be removed from
struct musb_hdrc_platform_data, it's expected
that other architectures are fixed by then.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: musb: we already tested for dyn_fifo
Felipe Balbi [Thu, 21 Jan 2010 13:33:54 +0000 (15:33 +0200)]
USB: musb: we already tested for dyn_fifo

... and even added a flag to struct musb, so let's
use that.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: musb: get rid of omap_readl/writel
Felipe Balbi [Thu, 21 Jan 2010 13:33:53 +0000 (15:33 +0200)]
USB: musb: get rid of omap_readl/writel

we have those addresses already ioremaped, so let's
use our __raw_readl/writel wrappers.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agousb: musb: Add context save and restore support
Ajay Kumar Gupta [Thu, 21 Jan 2010 13:33:52 +0000 (15:33 +0200)]
usb: musb: Add context save and restore support

Adding support for MUSB register save and restore during system
suspend and resume.

Changes:
        - Added musb_save/restore_context() functions
        - Added platform specific musb_platform_save/restore_context()
          to handle platform specific jobs.
        - Maintaining BlackFin compatibility by adding read/write
          functions for registers which are not available in BlackFin

Tested system suspend and resume on OMAP3EVM board.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: remove obsolete config in kernel source (USB_HCD_DMA)
Christoph Egger [Thu, 21 Jan 2010 13:58:47 +0000 (14:58 +0100)]
USB: remove obsolete config in kernel source (USB_HCD_DMA)

The configuration Option USB_HCD_DMA is not reachable in KConfig so
this piece of Code is effectively dead and useless. Remove it to avoid
confusion.

Signed-off-by: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: usbfs_snoop: add data logging back in
Chris Frey [Tue, 26 Jan 2010 22:07:29 +0000 (17:07 -0500)]
USB: usbfs_snoop: add data logging back in

Uses the new snoop function from commit 4c6e8971cbe0148085,
but includes the buffer data where appropriate, as before.

Signed-off-by: Chris Frey <cdfrey@foursquare.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: s3c-hsotg: Staticise non-exported functions
Mark Brown [Mon, 18 Jan 2010 13:18:35 +0000 (13:18 +0000)]
USB: s3c-hsotg: Staticise non-exported functions

Keeps sparse happy if nothing else.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: trivial: missing newline in usb core warning message
Thadeu Lima de Souza Cascardo [Sun, 17 Jan 2010 21:24:03 +0000 (19:24 -0200)]
USB: trivial: missing newline in usb core warning message

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ftdi_sio: correct spelling in implementation file
Andreas Mohr [Sun, 17 Jan 2010 10:45:57 +0000 (11:45 +0100)]
USB: ftdi_sio: correct spelling in implementation file

- correct spelling
- correct non-tabbed .tiocmget/.tiocmset entries

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: ftdi_sio: correct spelling in header files
Andreas Mohr [Sun, 17 Jan 2010 10:45:47 +0000 (11:45 +0100)]
USB: ftdi_sio: correct spelling in header files

- correct spelling/whitespace in ftdi_sio.h and ftdi_sio_ids.h

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: serial: Eliminate useless code
Julia Lawall [Sat, 16 Jan 2010 15:59:51 +0000 (16:59 +0100)]
USB: serial: Eliminate useless code

The variables priv and portdata are initialized twice to the same (side
effect-free) expressions.  Drop one initialization in each case.

A simplified version of the semantic match that finds this problem is:
(http://coccinelle.lip6.fr/)

// <smpl>
@forall@
idexpression *x;
identifier f!=ERR_PTR;
@@

x = f(...)
... when != x
(
x = f(...,<+...x...+>,...)
|
* x = f(...)
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: gadget: Add DEVTYPE support for Ethernet functions
Marcel Holtmann [Sat, 16 Jan 2010 06:13:58 +0000 (22:13 -0800)]
USB: gadget: Add DEVTYPE support for Ethernet functions

The problem with Ethernet based networking devices is to clearly
identify what's their usage. Special interfaces like bridges, WiFi,
Bluetooth, WiMAX or WWAN are already using DEVTYPE identification.

This patch marks the Ethernet functions of gadgets from the device
type "gadget". Automatic setup of these interfaces can now happen
from userspace without the need of hardcoding the network interface
name.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: remove the berry_charge driver
Greg Kroah-Hartman [Thu, 21 Jan 2010 22:54:10 +0000 (14:54 -0800)]
USB: remove the berry_charge driver

The Barry project's userspace program, bcharge, can better handle this
device and functionality, and it also works with the latest phones,
which this driver does not support.  So remove it, as the userspace code
should be used instead.

Cc: Chris Frey <cdfrey@foursquare.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: BKL removal from ioctl path of usbfs
Oliver Neukum [Thu, 14 Jan 2010 15:23:56 +0000 (16:23 +0100)]
USB: BKL removal from ioctl path of usbfs

Total removal from the ioctl code path except for the outcall
to external modules. Locking is ensured by the normal locks
of usbfs.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: BKL removal: frontier
Oliver Neukum [Thu, 14 Jan 2010 15:13:46 +0000 (16:13 +0100)]
USB: BKL removal: frontier

BKL was not needed at all. Removed without replacement.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: BKL removal: vstusb
Oliver Neukum [Thu, 14 Jan 2010 15:13:24 +0000 (16:13 +0100)]
USB: BKL removal: vstusb

BKL was not needed at all. Removed without replacement.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: BKL removal: legousbtower
Oliver Neukum [Thu, 14 Jan 2010 15:12:53 +0000 (16:12 +0100)]
USB: BKL removal: legousbtower

BKL was not needed at all. Removed without replacement.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: BKL removal: ldusb
Oliver Neukum [Thu, 14 Jan 2010 15:12:27 +0000 (16:12 +0100)]
USB: BKL removal: ldusb

BKL was not needed at all. Removed without replacement.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: BKL removal: ftdi-elan
Oliver Neukum [Thu, 14 Jan 2010 15:12:01 +0000 (16:12 +0100)]
USB: BKL removal: ftdi-elan

BKL was not needed at all. Removed without replacement.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: BKL removal: adutux
Oliver Neukum [Thu, 14 Jan 2010 15:11:32 +0000 (16:11 +0100)]
USB: BKL removal: adutux

BKL was not needed at all. Removed without replacement.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: BKL removal: idmouse
Oliver Neukum [Thu, 14 Jan 2010 15:11:03 +0000 (16:11 +0100)]
USB: BKL removal: idmouse

BKL was not needed at all. Removed without replacement.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: BKL removal: rio500
Oliver Neukum [Thu, 14 Jan 2010 15:10:38 +0000 (16:10 +0100)]
USB: BKL removal: rio500

This driver had used BKL to guard against disconnect but
was incorrectly converted leaving an SMP race.
BKL was added to disconnect() to fix this race
BKL was removed from ioctl() as the mutex is sufficient
on its own.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: BKL removal: mdc800
Oliver Neukum [Thu, 14 Jan 2010 15:10:05 +0000 (16:10 +0100)]
USB: BKL removal: mdc800

BKL not needed at all. Removed without replacement.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: BKL removal: cdc-wdm
Oliver Neukum [Thu, 14 Jan 2010 15:09:26 +0000 (16:09 +0100)]
USB: BKL removal: cdc-wdm

BKL not needed at all. Removed without replacement.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: BKL removal: usbtmc
Oliver Neukum [Thu, 14 Jan 2010 15:08:42 +0000 (16:08 +0100)]
USB: BKL removal: usbtmc

BKL not needed at all. Removed without replacement.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: BKL removal: usb-skeleton
Oliver Neukum [Thu, 14 Jan 2010 15:08:13 +0000 (16:08 +0100)]
USB: BKL removal: usb-skeleton

BKL not needed at all. Removed without replacement.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agousb: BKL removal: usblp
Oliver Neukum [Thu, 14 Jan 2010 15:07:37 +0000 (16:07 +0100)]
usb: BKL removal: usblp

BKL was not needed at all. Removed without replacement.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Acked-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>