dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

3876 Commits

Author SHA1 Message Date
Jonathan McDowell 237e75bf1e usb gadget: fix ethernet link reports to ethtool
The g_ether USB gadget driver currently decides whether or not there's a
link to report back for eth_get_link based on if the USB link speed is
set. The USB gadget speed is however often set even before the device is
enumerated. It seems more sensible to only report a "link" if we're
actually connected to a host that wants to talk to us. The patch below
does this for me - tested with the PXA27x UDC driver.

Signed-off-by: Jonathan McDowell <noodles@earth.li>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-17 10:50:23 -07:00
Alan Cox cf5450930d tty: Fix leak in ti-usb
If the ti-usb adapter returns an zero data length frame (which happens)
then we leak a kref.  Found by Christoph Mair <christoph.mair@gmail.com>
who proposed a patch.  The patch here is different as Christoph's patch
didn't work for the case where tty = NULL and data arrived but Christoph
did all the hard work chasing it down.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-14 08:48:50 -07:00
Alan Cox 7a9a65ced1 cdc-acm: Fix long standing abuse of tty->low_latency
ACM sets the low latency flag but calls the flip buffer routines from
IRQ context which isn't permitted (and as of 2.6.29 causes a warning
hence this one was caught)

Fortunatelt ACM doesn't need to set this flag in the first place as it
only set it to work around problems in ancient (pre tty flip rewrite)
kernels.

Reported-by: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-14 08:48:50 -07:00
Yang Hongyang e930438c42 Replace all DMA_nBIT_MASK macro with DMA_BIT_MASK(n)
This is the second go through of the old DMA_nBIT_MASK macro,and there're not
so many of them left,so I put them into one patch.I hope this is the last round.
After this the definition of the old DMA_nBIT_MASK macro could be removed.

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Tony Lindgren <tony@atomide.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Greg KH <greg@kroah.com>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-13 15:04:33 -07:00
Linus Torvalds 139ef17a46 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 5446/1: ohci-at91: Limit vbus_pin assignment to the size of the array
  [ARM] 5445/1: AT91: Remove flexible array from USBH platform data
  [ARM] 5447/1: Add SZ_32K
  [ARM] omap: fix omap1 clock usecount decrement bug
  [ARM] pxa: register AC97 controller devices
  [ARM] pxa/csb701: do not register devices on non-csb726 boads
  [ARM] pxa/colibri: get rid of set_irq_type()
  [ARM] pxa/colibri: provide MAC address from ATAG_SERIAL
  [ARM] pxa/cm-x2xx: fix ucb1400 not being registered
  [ARM] pxa: Add support for suspend on PalmTX, T5 and LD
  [ARM] pxa: PalmTE2 support for battery, UDC, IrDA and backlight
  [ARM] pxa: Palm Tungsten E2 basic support
  [ARM] pxa/em-x270: add libertas device registration
  [ARM] pxa/magician: Enable bq24022 regulator for gpio_vbus and pda_power
2009-04-08 15:24:09 -07:00
Justin Waters 3d6fdf7563 [ARM] 5446/1: ohci-at91: Limit vbus_pin assignment to the size of the array
Currently, the vbus_pin assignment loop is limited by the value of the "ports"
variable in the platform data.  Now that the vbus_pin array is no longer
flexible, we can use its actual size.

Signed-off-by: Justin Waters <justin.waters@timesys.com>
Acked-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-04-08 20:36:18 +01:00
Yang Hongyang 929a22a558 dma-mapping: replace all DMA_31BIT_MASK macro with DMA_BIT_MASK(31)
Replace all DMA_31BIT_MASK macro with DMA_BIT_MASK(31)

Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-07 08:31:11 -07:00
Yang Hongyang 284901a90a dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)
Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)

Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-07 08:31:11 -07:00
Yang Hongyang 6a35528a83 dma-mapping: replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64)
Replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64)

Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-07 08:31:10 -07:00
Alan Cox 22654b41a7 symbol: Remove various bits of left over junk
There are various bits of code here that are unfinished and instead of
being harmless either confuse or spew stuff into the logs at higher than
debug level. They can and should go away.

Also remove the bogus use of tty->lowlatency. We fixed the need for this hack
long ago (with the flip buffer rewrite) but people keep copying it into drivers.

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-06 14:36:42 -07:00
Alan Cox 912299f6f0 tty: pl2303 needs identifiers for Siemens S81 as well as EF81
Closes bug 9065

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-06 14:36:41 -07:00
Alan Cox 7abcf20b8f cdc-acm: zydas 1602 identifier needed
Bugzilla #9095 and a couple of other confirmations

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-06 14:36:38 -07:00
Scott James Remnant e766aeb882 usb: Auto-load cdc_acm module when device opened.
The cdc_acm module is missing the char-major-166-* alias that would
cause it to be auto-loaded when a device of that type is opened.  This
patch adds the alias.

Signed-off-by: Scott James Remnant <scott@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-06 14:36:31 -07:00
Linus Torvalds 87fc94d54b Merge branch 'avr32-arch' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6
* 'avr32-arch' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6:
  avr32: add hardware handshake support to atmel_serial
  avr32: add RTS/CTS/CLK pin selection for the USARTs
  Add RTC support for Merisc boards
  avr32: at32ap700x: setup DMA for AC97C in the machine code
  avr32: at32ap700x: setup DMA for ABDAC in the machine code
  Add Merisc board support
  avr32: use gpio_is_valid() to check USBA vbus_pin I/O line
  atmel-usba-udc: use gpio_is_valid() to check vbus_pin I/O line
  avr32: fix timing LCD parameters for EVKLCD10X boards
  avr32: use GPIO line PB15 on EVKLCD10x boards for backlight
  avr32: configure MCI detect and write protect pins for EVKLCD10x boards
  avr32: set pin mask to alternative 18 bpp for EVKLCD10x boards
  avr32: add pin mask for 18-bit color on the LCD controller
  avr32: fix 15-bit LCDC pin mask to use MSB lines
2009-04-05 11:15:28 -07:00
Linus Torvalds 811158b147 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (28 commits)
  trivial: Update my email address
  trivial: NULL noise: drivers/mtd/tests/mtd_*test.c
  trivial: NULL noise: drivers/media/dvb/frontends/drx397xD_fw.h
  trivial: Fix misspelling of "Celsius".
  trivial: remove unused variable 'path' in alloc_file()
  trivial: fix a pdlfush -> pdflush typo in comment
  trivial: jbd header comment typo fix for JBD_PARANOID_IOFAIL
  trivial: wusb: Storage class should be before const qualifier
  trivial: drivers/char/bsr.c: Storage class should be before const qualifier
  trivial: h8300: Storage class should be before const qualifier
  trivial: fix where cgroup documentation is not correctly referred to
  trivial: Give the right path in Documentation example
  trivial: MTD: remove EOL from MODULE_DESCRIPTION
  trivial: Fix typo in bio_split()'s documentation
  trivial: PWM: fix of #endif comment
  trivial: fix typos/grammar errors in Kconfig texts
  trivial: Fix misspelling of firmware
  trivial: cgroups: documentation typo and spelling corrections
  trivial: Update contact info for Jochen Hein
  trivial: fix typo "resgister" -> "register"
  ...
2009-04-03 15:24:35 -07:00
Linus Torvalds ea02259fdf Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/linux-hdreg-h-cleanup
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/linux-hdreg-h-cleanup:
  remove <linux/ata.h> include from <linux/hdreg.h>
  include/linux/hdreg.h: remove unused defines
  isd200: use ATA_* defines instead of *_STAT and *_ERR ones
  include/linux/hdreg.h: cover WIN_* and friends with #ifndef/#endif __KERNEL__
  aoe: WIN_* -> ATA_CMD_*
  isd200: WIN_* -> ATA_CMD_*
  include/linux/hdreg.h: cover struct hd_driveid with #ifndef/#endif __KERNEL__
  xsysace: make it 'struct hd_driveid'-free
  ubd_kern: make it 'struct hd_driveid'-free
  isd200: make it 'struct hd_driveid'-free
2009-04-03 09:02:32 -07:00
Jean Delvare bf6aede712 workqueue: add to_delayed_work() helper function
It is a fairly common operation to have a pointer to a work and to need a
pointer to the delayed work it is contained in.  In particular, all
delayed works which want to rearm themselves will have to do that.  So it
would seem fair to offer a helper function for this operation.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Greg KH <greg@kroah.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-02 19:04:50 -07:00
Bartlomiej Zolnierkiewicz fcd3ec6960 isd200: use ATA_* defines instead of *_STAT and *_ERR ones
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-04-01 21:42:25 +02:00
Bartlomiej Zolnierkiewicz f08f31f7c7 isd200: WIN_* -> ATA_CMD_*
* Use ATA_CMD_* defines instead of WIN_* ones.

Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-04-01 21:42:24 +02:00
Bartlomiej Zolnierkiewicz d8881cdab5 isd200: make it 'struct hd_driveid'-free
* Factor out debug dump of id from isd200_get_inquiry_data()
  to isd200_dump_driveid().

* Change id field in struct isd200_info from 'struct hd_driveid *id'
  to 'u16 *id' and update driver accordingly.

* Include <linux/ata.h> directly instead of through <linux/hdreg.h>.

While at it:

* Use ata_id_u32() and ata_id_has_lba() macros.

There should be no functional changes caused by this patch.

Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-04-01 21:42:19 +02:00
Alexey Dobriyan 6fd69d3cf1 proc tty: switch usb-serial to ->proc_fops
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-01 08:59:10 -07:00
Matt LaPlante 692105b8ac trivial: fix typos/grammar errors in Kconfig texts
Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-30 15:22:01 +02:00
Nick Andrew 877d03105d trivial: Fix misspelling of firmware
Fix misspelling of firmware.

Signed-off-by: Nick Andrew <nick@nick-andrew.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-30 15:21:59 +02:00
Alexey Zaytsev 542d886b7f trivial: Fix dubious bitwise 'and' usage spotted by sparse.
It doesn't change the semantics, but clearly
the logical 'and' was meant to be used here.

Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-30 15:21:57 +02:00
Linus Torvalds 0fe41b8982 Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (422 commits)
  [ARM] 5435/1: fix compile warning in sanity_check_meminfo()
  [ARM] 5434/1: ARM: OMAP: Fix mailbox compile for 24xx
  [ARM] pxa: fix the bad assumption that PCMCIA sockets always start with 0
  [ARM] pxa: fix Colibri PXA300 and PXA320 LCD backlight pins
  imxfb: Fix TFT mode
  i.MX21/27: remove ifdef CONFIG_FB_IMX
  imxfb: add clock support
  mxc: add arch_reset() function
  clkdev: add possibility to get a clock based on the device name
  i.MX1: remove fb support from mach-imx
  [ARM] pxa: build arch/arm/plat-pxa/mfp.c only when PXA3xx or ARCH_MMP defined
  Gemini: Add support for Teltonika RUT100
  Gemini: gpiolib based GPIO support v2
  MAINTAINERS: add myself as Gemini architecture maintainer
  ARM: Add Gemini architecture v3
  [ARM] OMAP: Fix compile for omap2_init_common_hw()
  MAINTAINERS: Add myself as Faraday ARM core variant maintainer
  ARM: Add support for FA526 v2
  [ARM] acorn,ebsa110,footbridge,integrator,sa1100: Convert asm/io.h to linux/io.h
  [ARM] collie: fix two minor formatting nits
  ...
2009-03-28 14:03:14 -07:00
Linus Torvalds d54b3538b0 Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (119 commits)
  [SCSI] scsi_dh_rdac: Retry for NOT_READY check condition
  [SCSI] mpt2sas: make global symbols unique
  [SCSI] sd: Make revalidate less chatty
  [SCSI] sd: Try READ CAPACITY 16 first for SBC-2 devices
  [SCSI] sd: Refactor sd_read_capacity()
  [SCSI] mpt2sas v00.100.11.15
  [SCSI] mpt2sas: add MPT2SAS_MINOR(221) to miscdevice.h
  [SCSI] ch: Add scsi type modalias
  [SCSI] 3w-9xxx: add power management support
  [SCSI] bsg: add linux/types.h include to bsg.h
  [SCSI] cxgb3i: fix function descriptions
  [SCSI] libiscsi: fix possbile null ptr session command cleanup
  [SCSI] iscsi class: remove host no argument from session creation callout
  [SCSI] libiscsi: pass session failure a session struct
  [SCSI] iscsi lib: remove qdepth param from iscsi host allocation
  [SCSI] iscsi lib: have lib create work queue for transmitting IO
  [SCSI] iscsi class: fix lock dep warning on logout
  [SCSI] libiscsi: don't cap queue depth in iscsi modules
  [SCSI] iscsi_tcp: replace scsi_debug/tcp_debug logging with iscsi conn logging
  [SCSI] libiscsi_tcp: replace tcp_debug/scsi_debug logging with session/conn logging
  ...
2009-03-28 13:30:43 -07:00
Russell King ed40d0c472 Merge branch 'origin' into devel
Conflicts:
	sound/soc/pxa/pxa2xx-i2s.c
2009-03-28 20:29:51 +00:00
Haavard Skinnemoen b92efa9abf Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into avr32-arch 2009-03-27 16:14:38 +01:00
Linus Torvalds 8e9d208972 Merge branch 'bkl-removal' of git://git.lwn.net/linux-2.6
* 'bkl-removal' of git://git.lwn.net/linux-2.6:
  Rationalize fasync return values
  Move FASYNC bit handling to f_op->fasync()
  Use f_lock to protect f_flags
  Rename struct file->f_ep_lock
2009-03-26 16:14:02 -07:00
David S. Miller 08abe18af1 Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts:
	drivers/net/wimax/i2400m/usb-notif.c
2009-03-26 15:23:24 -07:00
Linus Torvalds 61a091827e Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (97 commits)
  USB: qcserial: add device id for HP devices
  USB: isp1760: Add a delay before reading the SKIPMAP registers in isp1760-hcd.c
  USB: allow malformed LANGID descriptors
  USB: pxa27x_udc: typo fixes and code cleanups
  USB: gadget: gadget zero uses new suspend/resume hooks
  USB: gadget: composite device-level suspend/resume hooks
  USB: r8a66597-hcd: suspend/resume support
  USB: more u32 conversion after transfer_buffer_length and actual_length
  USB: Fix cp2101 USB serial device driver termios functions for console use
  USB: CP2101 New Device ID
  USB: ipaq: handle 4 endpoint devices
  USB: S3C: Move usb-control.h to platform include
  USB: ohci-hcd: Add ARCH_S3C24XX to the ohci-s3c2410.c glue
  USB: pedantic: spelling correction in comment for ch9.h
  USB: host: fix sparse warning: Using plain integer as NULL pointer
  USB: ohci-s3c2410: fix name of bus clock
  USB: ohci-s3c2410: remove <mach/hardware.h> include
  USB: serial: rename cp2101 driver to cp210x
  USB: CP2101 Reduce Error Logging
  USB: CP2101 Support AN205 baud rates
  ...
2009-03-26 11:17:39 -07:00
Linus Torvalds 0c93ea4064 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (61 commits)
  Dynamic debug: fix pr_fmt() build error
  Dynamic debug: allow simple quoting of words
  dynamic debug: update docs
  dynamic debug: combine dprintk and dynamic printk
  sysfs: fix some bin_vm_ops errors
  kobject: don't block for each kobject_uevent
  sysfs: only allow one scheduled removal callback per kobj
  Driver core: Fix device_move() vs. dpm list ordering, v2
  Driver core: some cleanup on drivers/base/sys.c
  Driver core: implement uevent suppress in kobject
  vcs: hook sysfs devices into object lifetime instead of "binding"
  driver core: fix passing platform_data
  driver core: move platform_data into platform_device
  sysfs: don't block indefinitely for unmapped files.
  driver core: move knode_bus into private structure
  driver core: move knode_driver into private structure
  driver core: move klist_children into private structure
  driver core: create a private portion of struct device
  driver core: remove polling for driver_probe_done(v5)
  sysfs: reference sysfs_dirent from sysfs inodes
  ...

Fixed conflicts in drivers/sh/maple/maple.c manually
2009-03-26 11:17:04 -07:00
Linus Torvalds 928a726b0e Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (96 commits)
  sh: add support for SMSC Polaris platform
  sh: fix the HD64461 level-triggered interrupts handling
  sh: sh-rtc wakeup support
  sh: sh-rtc invalid time rework
  sh: sh-rtc carry interrupt rework
  sh: disallow kexec virtual entry
  sh: kexec jump: fix for ftrace.
  sh: kexec: Drop SR.BL bit toggling.
  sh: add kexec jump support
  sh: rework kexec segment code
  sh: simplify kexec vbr code
  sh: Flush only the needed range when unmapping a VMA.
  sh: Update debugfs ASID dumping for 16-bit ASID support.
  sh: tlb-pteaex: Kill off legacy PTEA updates.
  sh: Support for extended ASIDs on PTEAEX-capable SH-X3 cores.
  sh: sh7763rdp: Change IRQ number for sh_eth of sh7763rdp
  sh: espt-giga board support
  sh: dma: Make G2 DMA configurable.
  sh: dma: Make PVR2 DMA configurable.
  sh: Move IRQ multi definition of DMAC to defconfig
  ...
2009-03-26 11:11:23 -07:00
Hans-Christian Egtvedt 472a6786b0 atmel-usba-udc: use gpio_is_valid() to check vbus_pin I/O line
This patch will convert to use gpio_is_valid() to check the vbus_pin
platform data. It will also default to -ENODEV if no vbus_pin is
defined.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-03-26 14:58:59 +01:00
Russell King 8937b7349c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 into devel 2009-03-25 18:31:35 +00:00
Sachin Sant 6866ac9db0 USB: FHCI: use dev_name() in place of bus_id.
Replace references to bus_id with dev_name() to fix fhci driver build break.

drivers/usb/host/fhci-hcd.c:586: error: struct device has no member named bus_id
drivers/usb/host/fhci-hcd.c:653: error: struct device has no member named bus_id
drivers/usb/host/fhci-dbg.c:111: error: struct device has no member named bus_id

Signed-off-by: Sachin Sant <sachinp@in.ibm.com>
Acked-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:38:23 -07:00
Kay Sievers 5df5852446 usb: struct device - replace bus_id with dev_name(), dev_set_name()
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-03-24 16:38:23 -07:00
Alexander Shumakovitch fd8345f8de USB: qcserial: add device id for HP devices
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:46 -07:00
Catalin Marinas e6bdfe36e5 USB: isp1760: Add a delay before reading the SKIPMAP registers in isp1760-hcd.c
The data read from the SKIPMAP registers is not immediately available
after writing and the driver panics when a packet is enqueued from the
interrupt handler. This patch adds an ndelay(195) before these registers
are read (delay value mentioned in section 15.1.1.3 of the ISP1760 data
sheet).

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:46 -07:00
Daniel Mack b7af0bb268 USB: allow malformed LANGID descriptors
When an USB hardware does not provide a valid LANGID, fall back to value
zero which is still a reasonable default for most devices.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:45 -07:00
Vernon Sauder 4c24b6d045 USB: pxa27x_udc: typo fixes and code cleanups
This patch is a merge of patches :
 - fix function doc and debug
 - cleanup loop count
 - optimize code to remove local variable and extra check
 - init 'req' before use
 - add missing iounmap call

[dbrownell@users.sourceforge.net: capitalize IN/OUT directions in doc]

Signed-off-by: Vernon Sauder <vsauder@inhand.com>
[folded by Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:45 -07:00
David Brownell ab943a2e12 USB: gadget: gadget zero uses new suspend/resume hooks
Use the new device-level suspend/resume hooks for Gadget Zero;
always enable them with the OTG test mode; and support remote
wakeup on both configurations even in non-OTG mode.

This ensures that both configurations can pass the USBCV remote
wakeup tests when the OTG test mode is enabled.  This changes
behavior by adding autoresume support to the loopback config
even in non-OTG mode; the test failure was that it didn't work
in OTG mode.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:45 -07:00
David Brownell 8942939a6c USB: gadget: composite device-level suspend/resume hooks
Address one open question in the composite gadget framework:
Yes, we should have device-level suspend/resume callbacks
in addition to the function-level ones.  We have at least one
scenario (with gadget zero in OTG test mode) that's awkward
to handle without it.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:45 -07:00
Yoshihiro Shimoda e1e609be49 USB: r8a66597-hcd: suspend/resume support
Fix the problem that system cannot suspend.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:45 -07:00
Roel Kluin 71d2718f25 USB: more u32 conversion after transfer_buffer_length and actual_length
transfer_buffer_length and actual_length have become unsigned, therefore some
additional conversion of local variables, function arguments and print
specifications is desired.

A test for a negative urb->transfer_buffer_length became obsolete; instead
we ensure that it does not exceed INT_MAX. Also, urb->actual_length is always
less than urb->transfer_buffer_length.

rh_string() does no longer return -EPIPE in the case of an unsupported ID.
Instead its only caller, rh_call_control() does the check.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:45 -07:00
VomLehn d2ad67b3fa USB: Fix cp2101 USB serial device driver termios functions for console use
This is really a follow up to the modifications Alan Cox made for commit
95da310e66 to pass a tty_struct to various
interface functions, which broke the serial configuration (termios) functions
when the device is being used as a console. These changes restore the
configuration to proper functioning both as a tty and as a console.  As Alan
notes in that commit, these changes will need to be tweaked when we have
a proper console abstraction.

Signed-off-by: David VomLehn <dvomlehn@cisco.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:45 -07:00
Alex Stephens d23bac9f8b USB: CP2101 New Device ID
One new device ID for CP2101 driver.

Signed-off-by: Alex Stephens alex@miranova.com
2009-03-24 16:20:45 -07:00
Mark Ellis 1b8fb4141e USB: ipaq: handle 4 endpoint devices
The ipaq driver currently enforces one port on all devices. This
is correct for 2 and 3 endpoint devices, but with 4 endpoint devices
meaningful communication occurs on the second pair.

This patch allows 2 ports for 4 endpoint devices.

Signed-off-by: Mark Ellis <mark@mpellis.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:45 -07:00
Ben Dooks 49121aa14c USB: S3C: Move usb-control.h to platform include
The usb-control.h is needed by ohci-s3c2410.c for both S3C24XX and S3C64XX
architectures, so move it to <plat/usb-control.h>

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:45 -07:00
Ben Dooks 3ba5f38f3d USB: ohci-hcd: Add ARCH_S3C24XX to the ohci-s3c2410.c glue
The ohci-s3c2410.c glue supports both CONFIG_ARCH_S3C2410 and
CONFIG_ARCH_S3C64XX so add it to the build of ohci-s3c2410.c

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:44 -07:00
Hannes Eder a9f8ec4db1 USB: host: fix sparse warning: Using plain integer as NULL pointer
Fix this sparse warning:
 drivers/usb/host/oxu210hp-hcd.c:2687:42: warning: Using plain integer as NULL pointer

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:44 -07:00
Ben Dooks 2dfa319a64 USB: ohci-s3c2410: fix name of bus clock
The USB bus clock is usb-bus-host, so print the correct name in the
dev_err() statement if we cannot find it.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
2009-03-24 16:20:44 -07:00
Ben Dooks 3edb8a208b USB: ohci-s3c2410: remove <mach/hardware.h> include
Remove the include of <mach/hardware.h>, as no definitions
from it are used by the OHCI driver.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:44 -07:00
Greg Kroah-Hartman 03ee251546 USB: serial: rename cp2101 driver to cp210x
Lots of users are getting confused about the cp2101 driver.  It really
does support more than just the cp2101 device, so rename it to cp210x to
try to prevent confusion.

Cc: Craig Shelley <craig@microtron.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:44 -07:00
Craig Shelley 97324955c6 USB: CP2101 Reduce Error Logging
This patch lowers the logging priority of certain messages to prevent
users from flooding the log files.

Signed-off-by: Craig Shelley <craig@microtron.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:44 -07:00
Craig Shelley ef8b6bcb39 USB: CP2101 Support AN205 baud rates
This patch adds support for the extended range of baud rates supported
by CP2102 and CP2103 devices described in SiLabs AN205.  An additional
function cp2101_quantise_baudrate rounds the baud rate as per AN205
Table 1.  A modification to the baud rate calculation removes a rounding
error, allowing the full range of baud rates to be used.

Signed-off-by: Craig Shelley <craig@microtron.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:44 -07:00
Johannes Weiner 31dbb80346 USB: use kzfree()
Use kzfree() instead of memset() + kfree().

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:44 -07:00
Alan Stern d34d9721a5 USB: usbfs: remove unneeded "inline" annotations
This patch (as1223) removes a bunch of unnecessary "inline"
annotations from the usbfs driver.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:44 -07:00
Alan Stern 4fe0387afa USB: don't send Set-Interface after reset
This patch (as1221) changes the way usbcore reinitializes a device
following a reset or a reset-resume.  Currently we call
usb_set_interface() for every interface in the active configuration;
this is to put the interface into the same altsetting as before the
reset and to make sure that the host's endpoint state matches the
device's endpoint state.

However, sending a Set-Interface request is a waste of time if an
interface was already in altsetting 0 before the reset, since it is
certainly in altsetting 0 afterward.  In addition, many devices can't
handle Set-Interface requests -- they crash when they receive them.

So instead, the patch adds code to check each interface.  If the
interface wasn't in altsetting 0 before the reset, we go head with the
Set-Interface request as before.  But if it was then we skip sending
the Set-Interface request, and we clear out the host-side endpoint
state by calling usb_disable_interface() followed by
usb_enable_interface().

The patch also adds a couple of new comments to explain what's going
on.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:38 -07:00
Greg Kroah-Hartman 77aa2b5878 USB: remove phidget drivers from kernel tree.
These devices are better controlled with the LGPL userspace library
found at:
	http://www.phidgets.com/downloads.php?os_id=3
and full documentation at:
	http://www.phidgets.com/documentation/web/cdoc/index.html

Cc: Chester Fitchett <fitchett@phidgets.com>
Acked-by: Sean Young <sean@mess.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:37 -07:00
Greg Kroah-Hartman 8c209e6782 USB: make actual_length in struct urb field u32
actual_length should also be a u32 and not a signed value.  This patch
changes this field to be 'u32' to prevent any potential negative
conversion and comparison errors.

This triggered a few compiler warning messages when these fields were
being used with the min macro, so they have also been fixed up in this
patch.

Cc: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:36 -07:00
Greg Kroah-Hartman 16e2e5f634 USB: make transfer_buffer_lengths in struct urb field u32
Roel Kluin pointed out that transfer_buffer_lengths in struct urb was
declared as an 'int'.  This patch changes this field to be 'u32' to
prevent any potential negative conversion and comparison errors.

This triggered a few compiler warning messages when these fields were
being used with the min macro, so they have also been fixed up in this
patch.

Cc: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:36 -07:00
Alan Stern 7ea0a2bcfe USB: uhci: don't use pseudo negative values
The code in uhci-q.c doesn't have to use pseudo-negative values.  I did
it that way because it was easy and because it would give the expected
output during debugging.  But it doesn't have to work that way.  Here's
another approach.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:36 -07:00
Jouni Hogander 6676016949 USB: TWL: disable VUSB regulators when cable unplugged
This patch disables USB regulators VUSB1V5, VUSB1V8, and VUSB3V1
when the USB cable is unplugged to reduce power consumption.
Added a depencency from twl4030 usb driver to TWL_REGULATOR.

Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com>
Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@digia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:36 -07:00
Pete Zaitcev 471c604daf USB: usbmon: Add binary API v1
This patch adds an extension to the binary API so it reaches parity with
existing text API (so-called "1u"). The extension delivers additional data,
such as ISO descriptors and the interrupt interval.

Signed-Off-By: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:36 -07:00
Ming Lei 1ded7ea47b USB: ch341 serial: fix port number changed after resume
This patch fixes the following bug:
	.plug ch341 usb serial port into a hub port;
	.ch341 driver bound to the device and /dev/ttyUSB0 comes
	.open /dev/ttyUSB0 by minicom and we can use the serial successfully
	.suspend the ch341 usb serial device(such as: echo suspend > power/level)
	.resume the ch341 usb serial device (such as: echo on > power/level)
	.new port /dev/ttyUSB1 comes ,and the original /dev/ttyUSB0 still exists,
but is no longer usable by minicom

The patch adds suspend and resume callback to ch341 usb driver to prevent it
from unbinding during suspend. The /dev/ttyUSB0 is not released until being
closed, so /dev/ttyUSB1 comes after resume, and the original /dev/ttyUSB0 is
no longer usable by minicom. It is really a mess for a minicom user.

This patch also adds the reset_resume callback to make it usable after resuming
from STR or hibernation, for generally STR or hibernation will make the vbus
of root-hub lost.

Finally enable the driver's supports_autosuspend, for the device is in working
order with it.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:36 -07:00
David Brownell a227fd7db7 USB: musb: partial DaVinci dm355 support
Partial support for DaVinci DM355, on the EVM board; peripheral
mode should work, once mainline merges DM355 support.  Missing:

  (a) renumbering the GPIO for DRVVBUS on the DM6446 EVM,
      when DAVINCI_N_GPIO increases;

  (b) disabling DM355_DEEPSLEEP.DRVVBUS_OVERRIDE so VBUS is
      driven according to the ID signal, if cpu_is_..._dm355()

The new PHY control bits are ignored on DM6446.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:36 -07:00
Ajay Kumar Gupta 743821717c USB: musb: only turn off vbus in OTG hosts
Except on DaVinci, VBUS is now switched off as part of idling the
USB link (after a_wait_bcon) whenever a device is disconnected
from host.  This is correct for OTG hosts, where either SRP or
an ID interrupt could turn VBUS on again.

However, for non-OTG hosts there's no way to turn VBUS on again,
so the host becomes unusable.  And the procfs entry which once
allowed a manual workaround for this is now gone.

This patch adds an is_otg_enabled() check before scheduling the
switch-off timer in disconnect path, supporting a "classic host"
mode where SRP is unavailable.

[ dbrownell@users.sourceforge.net: tweak patch description ]

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:36 -07:00
Giuseppe GORGOGLIONE 322337168f USB: musb: fix init oops crash with static FIFO config
Correct musb_read_fifosize() and musb_configure_ep0() functions
for the #ifndef BLACKFIN branch when the silicon uses static FIFO
configuration.  (Most current silicon configures this controller
to use dynamic FIFO configuration; some parts from ST don't, like
the STM STA2062.)

Signed-off-by: Giuseppe	GORGOGLIONE <giuseppe.gorgoglione@st.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:36 -07:00
Ajay Kumar Gupta 1e0320f0d4 USB: musb: NAK timeout scheme on bulk RX endpoint
Fixes endpoint starvation issue when more than one bulk QH is
multiplexed on the reserved bulk RX endpoint, which is normal
for cases like serial and ethernet adapters.

This patch sets the NAK timeout interval for such QHs, and when
a timeout triggers the next QH will be scheduled.  (This resembles
the bulk scheduling done in hardware by EHCI, OHCI, and UHCI.)

This scheme doesn't work for devices which are connected to a
high to full speed tree (transaction translator) as there is
no NAK timeout interrupt from the musb controller from such
devices.

Tested with PIO, Inventra DMA, CPPI DMA.

[ dbrownell@users.sourceforge.net:  fold in start_urb() update;
  clarify only for bulk RX; don't accidentally clear WZC bits ]

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:36 -07:00
Sergei Shtylyov 5d67a851bc USB: musb: rewrite host periodic endpoint allocation
The current MUSB host code doesn't make use of all the available
FIFOs in for periodic transfers since it wrongly assumes the RX
and TX sides of any given hw_ep always share one FIFO.

Change:  use 'in_qh' and 'out_qh' fields of the 'struct musb_hw_ep'
to check the endpoint's business; get rid of the now-unused 'periodic'
array in the 'struct musb'.  Also optimize a loop induction variable
in the endpoint lookup code.

(Based on a previous patch from Ajay Kumar Gupta <ajay.gupta@ti.com>)

[ dbrownell@users.sourceforge.net: clarify description and origin
  of this fix; whitespace ]

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:35 -07:00
Felipe Balbi b2bdf3a789 USB: composite: avoid inconsistent lock state
Avoid the following INFO from lock debugging:

[  369.126112] =================================
[  369.132063] [ INFO: inconsistent lock state ]
[  369.136457] 2.6.28-maemo1 #1
[  369.139387] ---------------------------------
[  369.143782] inconsistent {hardirq-on-W} -> {in-hardirq-W} usage.
[  369.149855] swapper/0 [HC1[1]:SC0[0]:HE0:SE1] takes:
[  369.154890]  (&cdev->lock){+-..}, at: [<bf1979f0>] composite_disconnect+0x1c/0]
[  369.163404] {hardirq-on-W} state was registered at:
[  369.168348]   [<c00788a8>] __lock_acquire+0x5d0/0x7d8
[  369.173506]   [<c0078b14>] lock_acquire+0x64/0x78
[  369.178266]   [<c0263a34>] _spin_lock+0x4c/0x80
[  369.182905]   [<bf19597c>] usb_function_deactivate+0x20/0x70 [g_nokia]
[  369.189527]   [<bf1a0a88>] 0xbf1a0a88
[  369.193281]   [<bf19f450>] 0xbf19f450
[  369.197004]   [<bf19fa3c>] 0xbf19fa3c
[  369.200758]   [<bf1a03a0>] 0xbf1a03a0
[  369.204481]   [<bf19f254>] 0xbf19f254
[  369.208204]   [<bf1a0158>] 0xbf1a0158
[  369.211927]   [<bf1a130c>] 0xbf1a130c
[  369.215650]   [<c01c21f0>] usb_gadget_register_driver+0x12c/0x28c
[  369.221846]   [<bf1a06bc>] 0xbf1a06bc
[  369.225569]   [<bf1a06e8>] 0xbf1a06e8
[  369.229322]   [<c002c2dc>] __exception_text_end+0x64/0x19c
[  369.234877]   [<c0081628>] sys_init_module+0x9c/0x194
[  369.240004]   [<c002c8e0>] ret_fast_syscall+0x0/0x2c
[  369.245039]   [<ffffffff>] 0xffffffff
[  369.248793] irq event stamp: 218356
[  369.252302] hardirqs last  enabled at (218355): [<c003a77c>] omap3_enter_idle+8
[  369.260420] hardirqs last disabled at (218356): [<c0264774>] __irq_svc+0x34/0x0
[  369.267927] softirqs last  enabled at (218348): [<c00585a4>] __do_softirq+0x134
[  369.275892] softirqs last disabled at (218335): [<c005899c>] irq_exit+0x60/0xb0
[  369.283308]
[  369.283308] other info that might help us debug this:
[  369.289930] no locks held by swapper/0.

Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:35 -07:00
David Vrabel 6da9c99059 USB: allow libusb to talk to unauthenticated WUSB devices
To permit a userspace application to associate with WUSB devices
using numeric association, control transfers to unauthenticated WUSB
devices must be allowed.

This requires that wusbcore correctly sets the device state to
UNAUTHENTICATED, DEFAULT and ADDRESS and that control transfers can be
performed to UNAUTHENTICATED devices.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:35 -07:00
Maciej Grela 4246b06a33 USB: usb-storage: added missing MODULE_LICENSE("GPL") for usb-storage ums-* modules
The lack of a MODULE_LICENSE macro in ums-* subdrivers prevented them
from loading. Needs to be applied after Alan Stern's usb-storage
subdriver separation patchset. Also added missing MODULE_DESCRIPTION and
MODULE_AUTHOR entries.

Signed-off-by: Maciej Grela <maciej.grela@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:35 -07:00
Alan Stern 9cfb95ef72 usb-storage: make onetouch a separate module
This patch (as1217) converts usb-storage's onetouch subdriver into a
separate module.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:35 -07:00
Alan Stern c10337846c usb-storage: make karma a separate module
This patch (as1216) converts usb-storage's karma subdriver into a
separate module.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:35 -07:00
Alan Stern a74bba3bf9 usb-storage: make alauda a separate module
This patch (as1215) converts usb-storage's alauda subdriver into a
separate module.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:35 -07:00
Alan Stern a9fb6d05d5 usb-storage: make jumpshot a separate module
This patch (as1214) converts usb-storage's jumpshot subdriver into a
separate module.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:34 -07:00
Alan Stern 2cbbf3576a usb-storage: make datafab a separate module
This patch (as1213) converts usb-storage's datafab subdriver into a
separate module.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:34 -07:00
Alan Stern 0d62939fab usb-storage: make freecom a separate module
This patch (as1212) converts usb-storage's freecom subdriver into a
separate module.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:34 -07:00
Alan Stern 26d6818f19 usb-storage: make shuttle_usbat a separate module
This patch (as1211) converts usb-storage's shuttle_usbat subdriver
into a separate module.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:34 -07:00
Alan Stern fcdb51401f usb-storage: make cypress_atacb a separate module
This patch (as1210) converts usb-storage's cypress_atacb subdriver
into a separate module.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:34 -07:00
Alan Stern 70fcc00507 usb-storage: make sddr55 a separate module
This patch (as1209) converts usb-storage's sddr55 subdriver into a
separate module.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:34 -07:00
Alan Stern 32d5493eb8 usb-storage: make isd200 a separate module
This patch (as1208) converts usb-storage's isd200 subdriver into a
separate module.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:34 -07:00
Alan Stern 0ff71883b2 usb-storage: make sddr09 a separate module
This patch (as1207) converts usb-storage's sddr09 subdriver into a
separate module.

An unexpected complication arises because of DPCM devices, in which
one LUN uses the sddr09 transport and one uses the standard CB
transport.  Since these devices can be used even when
USB_STORAGE_SDDR09 isn't configured, their entries in unusual_devs.h
require special treatment.  If SDDR09 isn't configured then the
entries remain in unusual_devs.h; if it is then the entries are
present in unusual_sddr09.h instead.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:34 -07:00
Alan Stern e6e244b6cb usb-storage: prepare for subdriver separation
This patch (as1206) is the first step in converting usb-storage's
subdrivers into separate modules.  It makes the following large-scale
changes:

	Remove a bunch of unnecessary #ifdef's from usb_usual.h.
	Not truly necessary, but it does clean things up.

	Move the USB device-ID table (which is duplicated between
	libusual and usb-storage) into its own source file,
	usual-tables.c, and arrange for this to be linked with
	either libusual or usb-storage according to whether
	USB_LIBUSUAL is configured.

	Add to usual-tables.c a new usb_usual_ignore_device()
	function to detect whether a particular device needs to be
	managed by a subdriver and not by the standard handlers
	in usb-storage.

	Export a whole bunch of functions in usb-storage, renaming
	some of them because their names don't already begin with
	"usb_stor_".  These functions will be needed by the new
	subdriver modules.

	Split usb-storage's probe routine into two functions.
	The subdrivers will call the probe1 routine, then fill in
	their transport and protocol settings, and then call the
	probe2 routine.

	Take the default cases and error checking out of
	get_transport() and get_protocol(), which run during
	probe1, and instead put a check for invalid transport
	or protocol values into the probe2 function.

	Add a new probe routine to be used for standard devices,
	i.e., those that don't need a subdriver.  This new routine
	checks whether the device should be ignored (because it
	should be handled by ub or by a subdriver), and if not,
	calls the probe1 and probe2 functions.

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>
2009-03-24 16:20:34 -07:00
Dave Young e4abe6658a usb-serial: fix usb_serial_register bug when boot with nousb param
With "nousb" cmdline booting, built-in serial drivers (ie. airecable)
will trigger kernel oops.

Indeed, if nousb, usb_serial_init will failed, and the usb serial bus type
will not be registerd, then usb_serial_register call driver_register
which try to register the driver to a not registered bus.

Here add usb_disabled() check in usb_serial_register to fix it.

Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:33 -07:00
Randy Dunlap d0626808f7 USB: fix ehci printk formats
Fix ehci printk formats:

drivers/usb/host/ehci-q.c:351: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
drivers/usb/host/ehci-q.c:351: warning: format '%d' expects type 'int', but argument 5 has type 'size_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:33 -07:00
Harvey Harrison 551509d267 USB: replace uses of __constant_{endian}
The base versions handle constant folding now.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:33 -07:00
Greg Kroah-Hartman a78b42824d USB: serial: add qualcomm wireless modem driver
Driver originally written by Qualcomm, but rewritten by me due to the
totally different coding style.  Cleaned up the probe logic to make a
bit more sense, this is one wierd device.  They could have prevented all
of this by just writing sane firmware for the modem.

Cc: Tamm Liu <tamml@qualcomm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:32 -07:00
Greg Kroah-Hartman 3d940b7d27 USB: symbolserial: log the ioctl commands
We need to figure out what userspace programs are expecting from this
driver, so log them so we can try to get it right.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:32 -07:00
Greg Kroah-Hartman 68b44eaed5 USB: serial: add symbol serial driver
This is for the Symbol 6608 barcode scanner in a fake "HID" mode.

Thanks to Dalibor Grgec for working with me to get this to start to work
properly.

Cc: Dalibor Grgec <dalibor.grgec@zemris.fer.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:32 -07:00
Catalin Marinas f7e7aa5850 USB: Add platform device support for the ISP1760 USB chip
Currently, the driver only supports PCI and PPC_OF but there are
boards like ARM RealView where this is a platform device. The patch adds
the necessary functions and registration to the isp1760-if.c file and
modifies the corresponding Makefile and Kconfig to be able to use this
driver even if PCI and PPC_OF are not enabled.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Sebastian Siewior <bigeasy@linutronix.de>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:31 -07:00
Catalin Marinas f9031f2c42 USB: Make the isp1760_register function prototype more generic
The patch changes the prototype of the isp1760_register() function to use
predefined types like phys_addr_t and resource_size_t rather than u64

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Sebastian Siewior <bigeasy@linutronix.de>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:31 -07:00
Alan Stern a2c2706e10 USB: EHCI: add software retry for transaction errors
This patch (as1204) adds a software retry mechanism to ehci-hcd.  It
gets invoked when the driver encounters transaction errors on an
asynchronous endpoint.  On many systems, hardware deficiencies cause
such errors to occur if one device is unplugged while the host is
communicating with another device.  With the patch, the failed
transactions are retried and generally succeed the second or third
time through.

This is based on code originally written by Koichiro Saito.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested by: Koichiro Saito <Saito.Koichiro@adniss.jp>
CC: David Brownell <david-b@pacbell.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:31 -07:00
Boaz Harrosh 1f4159c162 USB: fix USB_STORAGE_CYPRESS_ATACB
commit 64a87b24: [SCSI] Let scsi_cmnd->cmnd use request->cmd buffer
changed the scsi_eh_prep_cmnd logic by making it clear
the ->cmnd buffer. But the sat to cypress atacb translation supposed
the ->cmnd buffer wasn't modified.

This patch makes it set the ->cmnd buffer after scsi_eh_prep_cmnd call.
The problem and a fix was reported by Matthieu CASTET <castet.matthieu@free.fr>

It also removes all the hackery fiddling of scsi_cmnd and scsi_eh_save by
requesting from scsi_eh_prep_cmnd to prepare a read into ->sense_buffer,
which is much more suitable a buffer for HW transfers, then after the command
execution the regs read is copied into regs buffer before actual preparation
of sense_buffer.

Also fix an alien comment character to my utf-8 editor.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Cc: stable <stable@kernel.org>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Matthew Dharm <mdharm-kernel@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:31 -07:00
Alan Stern bc29847e16 USB: EHCI: Make timer_action out-of-line
This patch (as1205) moves timer_action() from ehci.h to ehci-hcd.c and
makes it out-of-line.  Over the years it has grown too big to be inline
any more.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:31 -07:00
Thierry Vignaud b967c88ed1 usb: kill prehistorical comments about USB_EHCI_HCD
Remove old comments about USB_EHCI_HCD.

Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:31 -07:00
James Woodcock 331879fd6f USB: serial: refuse to open recently removed USB Serial devices
A USB-serial converter device is plugged into a system, and a process
opens it's device node.  If the device is physically removed whilst the
process still has its device node open, then other processes can
sucessfully open the now non-existent device's node.  I would expect
that open() on a device that has been physically removed should return
ENODEV.

This is manifesting itself with getty on my system.  I do the following:
1.  set up inittab to spawn getty on ttyUSB0, eg:
    T1:23:respawn:/sbin/getty -L ttyUSB0 115200 vt100
2.  Plug in USB-serial converter cable
3.  Wait for a login prompt on a terminal program attached to the serial
    cable
4.  Login
5.  Pull the USB-serial converter cable from the box
6.  getty doesn't realise that ttyUSB0 no longer exists as /dev/ttyUSB0
    can still be opened.
7.  Re-insert the USB-serial converter cable
8.  You should no longer get a login prompt over the serial cable, as
    the the USB-serial cable now shows up as /dev/ttyUSB1, and getty is
    trying to talk to /dev/ttyUSB0.

The attached patch will cause open("/dev/ttyUSB0", O_RDONLY) to return
ENODEV after the USB-serial converter has been pulled.  The patch was
created against 2.6.28.1.  I can supply it against something else if
needs be.  It is fairly simple, so should be OK.

I am using a pl2303 device, although I don't think that makes any
difference.


From: James Woodcock <James.Woodcock@ACULAB.COM>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:31 -07:00
Oliver Neukum 1c27ae671e USB: serial: remove recourse to generic method
This removes the fallback to the generic method. It is cleaner to
explicitely request it. Introducing this was my mistake. This will
be solved by an explicit test and the driver being allowed to request
what it needs to be done upon resumption.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:30 -07:00