Commit graph

1666 commits

Author SHA1 Message Date
Ben Collins d57cdcffe1 [hid-core] TurboX Keyboard needs NOGET quirk.
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-10-18 08:47:37 -04:00
Linus Torvalds 9950421c1e Fix USB gadget net2280.c compile
It would fail the compile due to the newly added error checking testing
a bad macro for a "return value" unless USB_GADGET_DEBUG_FILES was
enabled.

Pointed out by Stephen Hemminger.

Acked-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-17 18:03:33 -07:00
Jan Luebbe ab352c2687 USB: Add device id for Sierra Wireless MC8755
Adds the device id used by the UMTS cards in Lenovo X60s notebooks sold
in Europe.

Signed-off-by: Jan Luebbe <jluebbe@lasnet.de>
Cc: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:34 -07:00
Greg Kroah-Hartman 964ee1deb3 USB: cleanup sierra wireless driver a bit
This saves over 30 lines and fixes a warning from sparse and allows
debugging to work dynamically like all other usb-serial drivers.

Cc: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:34 -07:00
Kevin Lloyd 033a3fb980 USB: Sierra Wireless driver update
The largest feature in this patch is that it adds significant throughput
increase to the Sierra driver and adds support for modem status line
control (e.g. the DTR line). This patch also updates the current sierra.c
driver so that it supports both 3-port Sierra devices and 1-port legacy
devices and removes Sierra's references in other related files (Kconfig and
airprime.c).

Signed-off-by: Kevin Lloyd  <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:34 -07:00
David Brownell 5c09d144ff USB: ftdi_sio whitespace fixes
Whitespace fixups for drivers/usb/serial/ftdi_sio.c ...
removing end-of-line whitespace, and space-before-tab.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:34 -07:00
Craig Shelley 61926b975d USB-SERIAL:cp2101 Add new device ID
This patch adds device ID 0xEA61. This is another factory default ID
used by SILabs.

Signed-off-by: Craig Shelley <craig@microtron.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:34 -07:00
Jeff Garzik b3899dacaf USB/gadget/net2280: handle sysfs errors
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:34 -07:00
Daniel Ritz 5dfb5f1d06 usbtouchscreen: fix data reading for ITM touchscreens
ITM devices seem to report only garbage when not touched. update usbtouchscreen
to do data reading like itmtouch. also fix wrong mask on pressure bits.

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:34 -07:00
matthieu castet 9ab99c8c51 UEAGLE: fix ueagle-atm Oops
The array of attribute passed to sysfs_create_group() must be
NULL-terminated.

The sysfs entries are created before the start of the modem state machine
to avoid to stop it in case of errors in sysfs creation.  Also
{destroy,create}_fs_entries are removed as they do nothing.

Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:33 -07:00
Dominic Cerquetti deb8ee43a2 USB: xpad: dance pad support
Adds support for dance pads to the xpad driver. Dance pads require the
d-pad to be mapped to four buttons instead of two axes, so that
combinations of up/down and left/right can be hit simultaneously.
Known dance pads are detected, and there is a module parameter added
to default unknown xpad devices to map the d-pad to buttons if this is
desired. (dpad_to_buttons). Minor modifications were made to port the
changes in the original patch to a newer kernel version.

This patch was originally from Dominic Cerquetti originally written
for kernel 2.6.11.4, with minor modifications (API changes for USB,
spelling fixes to the documentation added in the original patch) made
to apply to the current kernel. I have modified Dominic's original
patch per some suggestions from Dmitry Torokhov. (There was nothing
in the patch format description about multiple From: lines, so I
haven't added myself.)

[akpm@osdl.org: cleanups]
Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:33 -07:00
Grant Grundler 4550718f6c USB: input: extract() and implement() are bit field manipulation routines
extract() and implement() have brain damaged attempts to handle 32-bit wide
"fields".

The problem is the index math in the original code didn't clear all the
relevant bits.  (offset >> 5) only compensated for 32-bit index.  We need
(offset >> 6) if we want to use 64-bit loads.

But it was also wrong in that it tried to use quasi-aligned loads.  Ie
"report" was only incremented in multiples of 4 bytes and then the offset
was masked off for values greater than 4 bytes.  The right way is to
pretend "report" points at a byte array.  And offset is then only minor
adjustment for < 8 bits of offset.  "n" (field width) can then be as big as
24 (assuming 32-bit loads) since "offset" will never be bigger than 7.

If someone needs either function to handle more than 24-bits, please
document why - point at a specification or specific USB hid device - in
comments in the code.

extract/implement() are also an eyesore to read.  Please banish whoever
wrote it to read CodingStyle 3 times in a row to a classroom full of 1st
graders armed with rubberbands.  Or just flame them.  Whatever.  Globbing
all the code together on two lines does NOT make it faster and is Just
Wrong.

I've tested this patch on j6000 (dual 750Mhz PA-RISC, 32-bit 2.6.12-rc5). 
Kyle McMartin tested on c3000 (up 400Mhz PA-RISC, same kernel).  "p2-mate"
(Peter De Schrijver?) tested on sb1250 (dual core Mips, broadcom "swarm"
eval board).

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Cc: Vojtech Pavlik <vojtech@suse.cz>
Cc: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:33 -07:00
Eric Sesterhenn 0e185b7922 USB: Memory leak in drivers/usb/serial/airprime.c
the commit
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=5dda171202f94127e49c12daf780cdae1b4e668b
added a memory leak.  In case we cant allocate an urb, we dont free the
buffer and leak it.  Coverity id #1438

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Acked-by: Andy Gay <andy@andynet.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:33 -07:00
Jan Mate c0fc0ee06f USB Storage: unusual_devs.h entry for Sony Ericsson P990i
USB Storage: this patch adds support for Sony Ericsson P990i

Signed-off-by: Jan Mate <mate@fiit.stuba.sk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:33 -07:00
Andrew Morton 521b600b58 USB: fix usbatm tiny race
ia64:

drivers/usb/atm/usbatm.c: In function `usbatm_do_heavy_init':
drivers/usb/atm/usbatm.c:1004: warning: implicit declaration of function `get_current'
drivers/usb/atm/usbatm.c:1004: error: invalid type argument of `->'

Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:33 -07:00
Alan Stern 3ccf25ce18 USB: unusual_devs entry for Nokia 6234
This patch (as803) adds an unusual_devs entry for the Nokia 6234
mobile phone.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:33 -07:00
Adrian Bunk ad18027f49 USB: mos7840.c: fix a check-after-dereference
This patch fixes an obvious check-after-dereference spotted by the
Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:33 -07:00
Adrian Bunk c19ecd6542 USB: ftdi-elan.c: remove dead code
The Coverity checker spotted this obviously dead code.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:33 -07:00
Tobias Lorenz 1ff15e8efc USB: Mitsumi USB FDD 061M: UNUSUAL_DEV multilun fix
From: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:33 -07:00
Eric Sesterhenn a65dc301c7 USB: fix dereference in drivers/usb/misc/adutux.c
in two of the error cases, dev is still NULL,
and we dereference it. Spotted by coverity (cid#1428, 1429)

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:33 -07:00
Greg Kroah-Hartman 0f64478cbc USB: add USB serial mos7720 driver
Add support for Moschip 7720 USB dual port usb to serial device.

This driver is originally based on the drivers/usb/io_edgeport.c driver.

Cleaned up and forward ported by me.

Cc: VijayaKumar <vijaykumar@aspirecom.net>
Cc: AjayKumar <ajay@aspirecom.net>
Cc: Gurudeva <gurudev@aspirecom.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:32 -07:00
Greg Kroah-Hartman 9fcde23527 USB: move trancevibrator.c to the proper usb directory
It's not a input driver, so it doesn't belong in the input directory.


Cc: Sam Hocevar <sam@zoy.org>
Cc: Dmitry Torokhov <dtor@insightbb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:32 -07:00
Arnd Bergmann a9fc6338bd usbnet: add a mutex around phy register access
When working on the mcs7830, I noticed the need for a mutex in its
mdio_read/mdio_write functions. A related problem seems to be present
in the asix driver in the respective functions.

This introduces a mutex in the common usbnet driver and uses it
from the two hardware specific drivers.

Acked-by: David Hollis <dhollis@davehollis.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:32 -07:00
Arnd Bergmann c41286fd42 usbnet: improve generic ethtool support
This adds generic support for the ethtool commands get_settings,
set_settings, get_link and nway_reset to usbnet. These are now
implemented using mii functions when a low-level driver supports
mdio_read/mdio_write and does not override the usbnet ethtool
commands with its own.

Currently, this applies to the asix and the mcs7830 drivers.
I have tested it on mcs7830.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: David Hollis <dhollis@davehollis.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:32 -07:00
Arnd Bergmann 2a36d70834 USB: driver for mcs7830 (aka DeLOCK) USB ethernet adapter
This driver adds support for the DeLOCK USB ethernet adapter
and potentially others based on the MosChip MCS7830 chip.

It is based on the usbnet and asix drivers as well as the
original device driver provided by MosChip, which in turn
was based on the usbnet driver.

It has been tested successfully on an OHCI, but interestingly
there seems to be a problem with the mcs7830 when connected to
the ICH6/EHCI in my thinkpad: it keeps receiving lots of
broken packets in the RX interrupt. The problem goes away when
I'm using an active USB hub, so I assume it's not related to
the device driver, but rather to the hardware.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:32 -07:00
Akinobu Mita 27d39e2627 usb devio: handle class_device_create() error
This patch adds missing class_device_create() error check,
and makes notifier return NOTIFY_BAD.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:32 -07:00
Alexey Dobriyan f8ac232ad7 USB: drivers/usb/net/*: use BUILD_BUG_ON
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:32 -07:00
Alan Stern d5477c1111 usbcore: fix endpoint device creation
This patch (as800) straightens out the USB endpoint class device
creation routine, fixing a refcount bug in the process.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:32 -07:00
Alan Stern c40fd5ea56 usbcore: fix refcount bug in endpoint removal
This patch (as799) fixes a nasty refcount error in the USB endpoint class.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:32 -07:00
Alan Stern b62df45169 UHCI: workaround for Asus motherboard
This patch (as798) adds a workaround to uhci-hcd.  At least one Asus
motherboard is wired in such a way that any device attached to a
suspended UHCI controller will prevent the system from entering
suspend-to-RAM by immediately waking it up.  The only way around the
problem is to turn the controller off instead of suspending it.

This fixes Bugzilla #6193.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:31 -07:00
Greg Kroah-Hartman 96a518928e USB: ftdi-elan: fix sparse warnings
Deleted some unused code that could do bad things on non-x86 platforms.

Also fixed some minor formatting errors.

Thanks to Al Viro for pointing out the sparse errors.

Cc: Tony Olech <tony.olech@elandigitalsystems.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:31 -07:00
Oliver Neukum 516077c1ee USB: fix suspend support for usblp
this implements suspend support for usblp. According to the CUPS people
ENODEV will make CUPS retry the job. Thus it is returned in the runtime
case. My printer survives suspend/resume cycles with it.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:31 -07:00
Duncan Sands 44960af1b6 cxacru: add the ZTE ZXDSL 852
From http://doc.ubuntu-fr.org/materiel/zxdsl852.

Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:31 -07:00
Duncan Sands 6a4f1b4135 speedtch: "extended reach"
The speedtouch modem setup code was reverse engineered many years
ago from a prehistoric windows driver. Less ancient windows drivers,
even those from a few years ago, perform extra initialization steps
which this patch adds to the linux driver.  David Woodhouse observed
that this initialization along with the firmware bin/sachu3/zzzlp2.eni
from the driver at
http://www.speedtouch.co.uk/downloads/330/301/UK3012%20Extended.zip
improves line sync speeds by about 20%.  He provided the original
patch, which I've modified to use symbolic names (BMaxDSL, ModemMode,
ModemOption) rather than magic numbers.  These names may not seem like
much of an improvement (after all, what is "ModemOption" exactly?),
but they do have one big advantage: they are the names used in the
windows registry.  I've made them available as module parameters.
Thanks are due to Aurelio Arroyo, who noticed the relationship
between these magic numbers and the entries in Phonebook.ini.

Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:31 -07:00
Duncan Sands ccf40d62c7 usbatm: fix tiny race
If usbatm_do_heavy_init finishes before usbatm_heavy_init
writes the pid, the disconnect method could shoot down the
wrong process if the pid has been recycled.

Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:31 -07:00
Alan Stern e4a20daa7b USB: unusual_devs entry for Nokia 6131
This patch (as796) adds an unusual_devs entry for the Nokia 6131, which
doesn't like large transfer sizes.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:31 -07:00
Jarek Poplawski 762f007b05 USB: fix cdc-acm problems with hard irq? (inconsistent lock state)
Signed-off-by: Jarek Poplawski <jarkao2@o2.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:31 -07:00
matthieu castet a7a0c9cd1f UEAGLE : comestic changes
Hi,

this patch does some cosmetic changes :
- dump firwmare version as soon as possible and export it on sysfs
- hint about wrong cmv/dsp
- Display a message to warn user when the modem is ready : it can help
  people to detect problems on the line without debug trace
- Fix wrong indent
- display modem type (pots/isdn)
- increase version number


Signed-off-by: Matthieu Castet <castet.matthieu@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:31 -07:00
matthieu castet 531a39bbab UEAGLE : use interruptible sleep
this patch use wait_event_interruptible_timeout and msleep_interruptible
beacause uninterruptible sleep (task state 'D') is counted as 1 towards
load average, like running processes.


Signed-off-by: Matthieu Castet <castet.matthieu@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:31 -07:00
matthieu castet 9ca5346483 UEAGLE : be suspend friendly
this patch avoid that the kernel thread block the suspend process.
Some work is still need to recover after a resume.

Signed-off-by: Matthieu Castet <castet.matthieu@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:31 -07:00
David Brownell 8442ae00d4 USB: ohci-pnx4008 build fixes
The OHCI bus glue for the Philips PNX chips is missing a few calls.

 - Bus suspend/resume were wrongly omitted in the original submission.
 - Two new calls were added since that glue was submitted:
     * Root hub irq enable call
     * Shutdown hook for usbcore

Plus usb_bus.hcpriv has now been removed from usbcore.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:30 -07:00
Oliver Neukum 1a2ea1dfc4 USB: suspend/resume support for kaweth
this adds support for suspend and resume to the kaweth driver.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:30 -07:00
Oliver Neukum fbe2bafcb0 USB: remove private debug macros from kaweth
this kills the private debug macros from the kaweth driver.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:30 -07:00
Chris Malley 91a9c9214e USB: Support for BT On-Air USB modem in cdc-acm.c
The patch below is a necessary workaround to support the BT On-Air USB modem, which
fails to initialise properly during normal probing thus:

Sep 30 17:34:57 sled kernel: drivers/usb/class/cdc-acm.c: Zero length descriptor references
Sep 30 17:34:57 sled kernel: cdc_acm: probe of 1-1.2:1.0 failed with error -22

Adding the patch below causes the probing section to be skipped, and the modem
then initialises correctly.

Signed-off-by: Chris Malley <mail@chrismalley.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:30 -07:00
Luiz Fernando N. Capitulino 931b0411ac airprime: New device ID.
Adds support for the verizon wireless Broadband Access, National Access V640
ExpressCard34 Qualcomm 3G CDMA.

Reported by Maciej A. __enczykowski <maze@google.com>

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:30 -07:00
Eric Sesterhenn 2daa48729d USB: fix use after free in wacom_sys.c
the following commit added a use after free
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3D3bea733ab21247290bd552dd6a2cd3049af9adef
Found by coverity (cid #1441)

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: "Ping Cheng" <pingc@wacom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:30 -07:00
Eric Sesterhenn 2920349d43 USB: BUG_ON conversion for wacom.c
this patch converts two if () BUG(); construct to BUG_ON();
which occupies less space, uses unlikely and is safer when
BUG() is disabled.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Acked-by: "Ping Cheng" <pingc@wacom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:30 -07:00
Ping Cheng 8d32e3ae59 USB: Wacom driver updates
This fixes some issues with the current wacom driver due to the split of
the driver into different pieces and adds support for the Intuos3 4x6

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:30 -07:00
Greg Kroah-Hartman 64f89798da USB: revert EHCI VIA workaround patch
This reverts 26f953fd88 which caused
resume problems on the mac mini.

Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 13:57:18 -07:00
Al Viro c714de5dcf [PATCH] devio __user annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-10 15:37:21 -07:00
Al Viro 97c4965d97 [PATCH] mos7840 annotations
__user annotations, NULL noise removal, %p use for pointers

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-09 14:19:08 -07:00
Al Viro 2843114699 [PATCH] misc arm pt_regs fixes
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-08 12:32:36 -07:00
David Brownell da66b719d1 [PATCH] ohci: don't play with IRQ regs
This is a more correct fix for the way the ohci hcd was referencing pt_regs
in the unlink paths.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-06 08:53:40 -07:00
David Howells 7d12e780e0 IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.

The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around.  On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).

Where appropriate, an arch may override the generic storage facility and do
something different with the variable.  On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.

Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions.  Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller.  A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.

I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.

This will affect all archs.  Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

	struct pt_regs *old_regs = set_irq_regs(regs);

And put the old one back at the end:

	set_irq_regs(old_regs);

Don't pass regs through to generic_handle_irq() or __do_IRQ().

In timer_interrupt(), this sort of change will be necessary:

	-	update_process_times(user_mode(regs));
	-	profile_tick(CPU_PROFILING, regs);
	+	update_process_times(user_mode(get_irq_regs()));
	+	profile_tick(CPU_PROFILING);

I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().

Some notes on the interrupt handling in the drivers:

 (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
     the input_dev struct.

 (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
     something different depending on whether it's been supplied with a regs
     pointer or not.

 (*) Various IRQ handler function pointers have been moved to type
     irq_handler_t.

Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-10-05 15:10:12 +01:00
Mark Assad 77dc2db6d1 [PATCH] itmtouch: fix inverted flag to indicate touch location correctly, correct white space
There is a bug in the current version of the itmtouch USB touchscreen
driver.  The if statment that checks if pressure is being applied to the
touch screen is now missing a ! (not), so events are no longer being
reported correctly.

The original source code for this line was as follows:

	#define UCP(x) ((unsigned char*)(x))
	#define UCOM(x,y,z) ((UCP((x)->transfer_buffer)[y]) & (z))

	...
	if (!UCOM(urb, 7, 0x20)) {

And was cleaned to:

	unsigned char *data = urb->transfer_buffer;
	....
	 if (data[7] & 0x20) {

(note the lack of '!')

This has been tested on an LG L1510BF and an LG1510SF touch screen.

Signed-off-by: Mark Assad <massad@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-04 19:44:36 -07:00
Dave Jones 038b0a6d8d Remove all inclusions of <linux/config.h>
kbuild explicitly includes this at build time.

Signed-off-by: Dave Jones <davej@redhat.com>
2006-10-04 03:38:54 -04:00
Uwe Zeisberger f30c226954 fix file specification in comments
Many files include the filename at the beginning, serveral used a wrong one.

Signed-off-by: Uwe Zeisberger <Uwe_Zeisberger@digi.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-03 23:01:26 +02:00
Matt LaPlante cab00891c5 Still more typo fixes
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-03 22:36:44 +02:00
Matt LaPlante 095096038d Fix several typos in drivers/
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-03 22:31:37 +02:00
Linus Torvalds a12f66fccf Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (35 commits)
  Input: wistron - add support for Acer TravelMate 2424NWXCi
  Input: wistron - fix setting up special buttons
  Input: add KEY_BLUETOOTH and KEY_WLAN definitions
  Input: add new BUS_VIRTUAL bus type
  Input: add driver for stowaway serial keyboards
  Input: make input_register_handler() return error codes
  Input: remove cruft that was needed for transition to sysfs
  Input: fix input module refcounting
  Input: constify input core
  Input: libps2 - rearrange exports
  Input: atkbd - support Microsoft Natural Elite Pro keyboards
  Input: i8042 - disable MUX mode on Toshiba Equium A110
  Input: i8042 - get rid of polling timer
  Input: send key up events at disconnect
  Input: constify psmouse driver
  Input: i8042 - add Amoi to the MUX blacklist
  Input: logips2pp - add sugnature 56 (Cordless MouseMan Wheel), cleanup
  Input: add driver for Touchwin serial touchscreens
  Input: add driver for Touchright serial touchscreens
  Input: add driver for Penmount serial touchscreens
  ...
2006-10-02 08:20:33 -07:00
Serge E. Hallyn 96b644bdec [PATCH] namespaces: utsname: use init_utsname when appropriate
In some places, particularly drivers and __init code, the init utsns is the
appropriate one to use.  This patch replaces those with a the init_utsname
helper.

Changes: Removed several uses of init_utsname().  Hope I picked all the
	right ones in net/ipv4/ipconfig.c.  These are now changed to
	utsname() (the per-process namespace utsname) in the previous
	patch (2/7)

[akpm@osdl.org: CIFS fix]
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Cc: Kirill Korotaev <dev@openvz.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Andrey Savochkin <saw@sw.ru>
Cc: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-02 07:57:21 -07:00
Eric W. Biederman 2425c08b37 [PATCH] usb: fixup usb so it uses struct pid
The problem with remembering a user space process by its pid is that it is
possible that the process will exit, pid wrap around will occur.
Converting to a struct pid avoid that problem, and paves the way for
implementing a pid namespace.

Also since usb is the only user of kill_proc_info_as_uid rename
kill_proc_info_as_uid to kill_pid_info_as_uid and have the new version take
a struct pid.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-02 07:57:15 -07:00
Jeff Dike b68e31d0eb [PATCH] const struct tty_operations
As part of an SMP cleanliness pass over UML, I consted a bunch of
structures in order to not have to document their locking.  One of these
structures was a struct tty_operations.  In order to const it in UML
without introducing compiler complaints, the declaration of
tty_set_operations needs to be changed, and then all of its callers need to
be fixed.

This patch declares all struct tty_operations in the tree as const.  In all
cases, they are static and used only as input to tty_set_operations.  As an
extra check, I ran an i386 allyesconfig build which produced no extra
warnings.

53 drivers are affected.  I checked the history of a bunch of them, and in
most cases, there have been only a handful of maintenance changes in the
last six months.  serial_core.c was the busiest one that I looked at.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-02 07:57:14 -07:00
Dave Hansen d8c76e6f45 [PATCH] r/o bind mount prepwork: inc_nlink() helper
This is mostly included for parity with dec_nlink(), where we will have some
more hooks.  This one should stay pretty darn straightforward for now.

Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:30 -07:00
Dave Hansen 9a53c3a783 [PATCH] r/o bind mounts: unlink: monitor i_nlink
When a filesystem decrements i_nlink to zero, it means that a write must be
performed in order to drop the inode from the filesystem.

We're shortly going to have keep filesystems from being remounted r/o between
the time that this i_nlink decrement and that write occurs.

So, add a little helper function to do the decrements.  We'll tie into it in a
bit to note when i_nlink hits zero.

Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:30 -07:00
Badari Pulavarty 027445c372 [PATCH] Vectorize aio_read/aio_write fileop methods
This patch vectorizes aio_read() and aio_write() methods to prepare for
collapsing all aio & vectored operations into one interface - which is
aio_read()/aio_write().

Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Michael Holzheu <HOLZHEU@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:28 -07:00
Peter Zijlstra 6e9a4738c9 [PATCH] completions: lockdep annotate on stack completions
All on stack DECLARE_COMPLETIONs should be replaced by:
DECLARE_COMPLETION_ONSTACK

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:24 -07:00
David Howells 65934a9a02 [PATCH] BLOCK: Make USB storage depend on SCSI rather than selecting it [try #6]
This makes CONFIG_USB_STORAGE depend on CONFIG_SCSI rather than selecting it,
as selecting it makes CONFIG_USB_STORAGE override the dependencies of SCSI,
causing it to turn on even if they aren't all met.

Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2006-09-30 20:52:32 +02:00
Greg Kroah-Hartman 6e3ce3ae8e USB: fix build error in ohci driver
Thanks to Andrew for the original patch for this.
I need to upgrade my version of gcc to catch these things...

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 17:06:45 -07:00
Alan Stern 6174d0fd35 USB: g_file_storage: Set sense info Valid bit only when needed
Strictly speaking, the Valid bit in SCSI sense data is supposed to
be set only when the Information field contains a valid number.  This
patch (as793) turns off the Valid bit when the Information field
hasn't been set.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:36:47 -07:00
Alan Stern e0318ebff4 USB: fix autosuspend when CONFIG_PM isn't set
This patch (as791b) fixes things up to avoid compiler warnings or
errors when CONFIG_USB_SUSPEND or CONFIG_PM isn't set.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:36:46 -07:00
Alan Stern 8d1a243ba5 OHCI: add auto-stop support
This patch (as790b) adds "autostop" support to ohci-hcd: the driver
will automatically stop the host controller when no devices have been
connected for at least one second.  This feature is useful when the
USB autosuspend facility isn't available, such as when
CONFIG_USB_SUSPEND hasn't been set.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:36:46 -07:00
Alan Stern 1f7e1a3b7e OHCI: remove existing autosuspend code
The autosuspend technique used by ohci-hcd doesn't mesh well with the
newer USB core autosuspend code.  This patch (as789) removes ohci-hcd's
autosuspend support.  Now the driver will be usable, but it won't
automatically go into a low-power state when no devices are connected.
That's for a later patch.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:36:46 -07:00
Alan Stern d19ac7da72 USB: allow both root-hub interrupts and polling
Originally I didn't think any host controller driver would ever use
interrupts and polling at the same time, but it turns out ohci-hcd wants
to do exactly that.  This patch (as788) makes it possible.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:36:45 -07:00
Alan Stern 2de9eaefa7 USB: g_file_storage: fix "ignoring return value" warnings
This patch (as792) fixes "ignoring return value" warnings in
file_storage.c.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:36:45 -07:00
Alan Stern efd54a3641 USB: dummy-hcd: fix "warn-unused-result" messages
This patch (as758) fixes the "warn-unused-result" messages in dummy-hcd.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:36:45 -07:00
Alan Stern bd859281c0 USB: create new workqueue thread for USB autosuspend
This patch (as787) creates a new workqueue thread to handle delayed
USB autosuspend requests.  Previously the code used keventd.  However
it turns out that the hub driver's suspend routine calls
flush_scheduled_work(), making it a poor candidate for running in
keventd (the call immediately deadlocks).  The solution is to use a
new thread instead of keventd.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:36:44 -07:00
Jan Mate 6a9fb06039 USB Storage: unusual_devs.h entry for Sony Ericsson P990i
USB Storage: this patch adds support for Sony Ericsson P990i

Signed-off-by: Jan Mate <mate@fiit.stuba.sk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:36:44 -07:00
Henrik Kretzschmar 0eebe6ac7c USB: microtek usb scanner: Scsi_Cmnd conversion
Converts obsolete typedef'd Scsi_Cmnd into struct scsi_cmnd.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:36:44 -07:00
Henrik Kretzschmar 701f35af28 USB: fixes kerneldoc errors in usbcore-auto(susp/res)-patch
Fixes kerneldoc errors on usb/core/driver.c, which occured in 2.6.18-rc6-mm2
gregkh-usb-usbcore-add-autosuspend-autoresume-infrastructure.patch

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:36:44 -07:00
Raghavendra Biligiri 931e24b93a USB: add Raritan KVM USB Dongle to the HID_QUIRK_NOGET blacklist
During Installation the host tries to enumerate the keyboard/mouse
dongle for the Raritan KVM.At this time timeouts have been observed
Adding the Raritan KVM USB dongle to the blacklist fixes this issue.

Signed-off-by: Raghavendra Biligiri <Raghavendra_Biligiri@Dell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:36:44 -07:00
David Hollis b923e7fcc1 USB: asix - Add alternate device IDs for Dlink DUB-E100 Rev B1
Add alternate device IDs for Dlink DUB-E100 Rev B1

Signed-off-by: David Hollis <dhollis@davehollis.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:36:43 -07:00
Peter Zijlstra e81ee637e4 usb-serial: possible irq lock inversion (PPP vs. usb/serial)
=========================================================
[ INFO: possible irq lock inversion dependency detected ]
2006-09-28 15:36:43 -07:00
Alan Cox 2e3a43f0b6 ohci: Use ref-counting hotplug safe interfaces
We want to avoid legacy APIs like pci_find_slot().

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:36:43 -07:00
Mikael Pettersson 54bee6e1b4 USB: Fix alignment of buffer passed down to ->hub_control()
Implementations assume the buffer is at least 4 byte aligned.

Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:36:43 -07:00
Justin Carlson a14848275b USB: add SeaLevel 2106 SeaLINK support to ftdi_sio
We have a couple of these USB-Serial converters around; they're slightly
different from the 2104 models in that they can handle 500Kb/sec over RS422.
The existing ftdi driver seems to work just fine if we add in the 
appropriate IDs.

Patch is against 2.6.17.6, but should apply cleanly to pretty much 
anything recent.

From: Justin Carlson <justinca@qatar.cmu.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:36:43 -07:00
Sean Young 238d0e7bcf USB: New PhidgetKit 8/8/8 reset outputs after 2 seconds
New phidget interface kits (type 8/8/8) reset their outputs if they
haven't received a set report for 2 seconds.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:36:43 -07:00
Matthias Urlichs 1b495f753a USB: another device ID for ipaq
Add yet another device ID to the ipaq USB-serial driver.

Signed-Off-By: Matthias Urlichs <matthias@urlichs.de>
Cc: Ganesh Varadarajan <ganesh@veritas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:36:43 -07:00
Ian Abbott 9978f9e124 USB serial ftdi_sio: Add support for Tactrix OpenPort devices
This patch adds support for three OpenPort ECU data cables from Tactrix
Inc. to the ftdi_sio driver's device ID table.  One of the PIDs was
supplied by Donour Sizemore on the ftdi-usb-sio-devel mailing list.  The
other two were added by myself after examining the Windows driver software.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:36:43 -07:00
Petko Manolov 37cf3477d2 USB: Pegasus driver failing for ADMtek 8515 network device
Address http://bugzilla.kernel.org/show_bug.cgi?id=7126

Attempting to read the ethernet ID directly from the eeprom somehow
confuses ADM8515.  Subsequent read requests to either the eeprom or the MII
fail as well.  Didn't dig much deeper, though.  For example ADM8513 does
not experience this problem.

I used the fact that at power up the device is reading its ID automatically
(not true for older Pegasus based devices) and put it in the Ethernet ID
registers.  So now the driver uses get_registers() instead of
read_eprom_word() if the device is Pegasus_II based one.  Tested it with
all (Pegasus and Pegasus_II) gadgets i have and everything seems ok.

Cc: <jogeedaklown@yahoo.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:36:42 -07:00
Alan Stern 7923811a46 USB: unusual-devs entry for Nokia E60
This patch (as794) adds an unusual_devs entry for the Nokia E60.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:36:42 -07:00
Wesley PA4WDH b697f70f76 USB: Add vendor / product ID to pl2303
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:36:42 -07:00
Oliver Neukum 486ba2a9b2 USB: new id for kaweth
this adds a new id to the kaweth driver.
Please apply.

Signed-Off-By: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:36:42 -07:00
Linus Torvalds ebdea46fec Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (130 commits)
  [ARM] 3856/1: Add clocksource for Intel IXP4xx platforms
  [ARM] 3855/1: Add generic time support
  [ARM] 3873/1: S3C24XX: Add irq_chip names
  [ARM] 3872/1: S3C24XX: Apply consistant tabbing to irq_chips
  [ARM] 3871/1: S3C24XX: Fix ordering of EINT4..23
  [ARM] nommu: confirms the CR_V bit in nommu mode
  [ARM] nommu: abort handler fixup for !CPU_CP15_MMU cores.
  [ARM] 3870/1: AT91: Start removing static memory mappings
  [ARM] 3869/1: AT91: NAND support for DK and KB9202 boards
  [ARM] 3868/1: AT91 hardware header update
  [ARM] 3867/1: AT91 GPIO update
  [ARM] 3866/1: AT91 clock update
  [ARM] 3865/1: AT91RM9200 header updates
  [ARM] 3862/2: S3C2410 - add basic power management support for AML M5900 series
  [ARM] kthread: switch arch/arm/kernel/apm.c
  [ARM] Off-by-one in arch/arm/common/icst*
  [ARM] 3864/1: Refactore sharpsl_pm
  [ARM] 3863/1: Add Locomo SPI Device
  [ARM] 3847/2:  Convert LOMOMO to use struct device for GPIOs
  [ARM] Use CPU_CACHE_* where possible in asm/cacheflush.h
  ...
2006-09-28 14:40:39 -07:00
Andrew Victor 72729910c3 [ARM] 3865/1: AT91RM9200 header updates
This is more preparation for adding support for the new Atmel AT91SAM9
processors.

Changes include:
- Replace AT91_BASE_* with AT91RM9200_BASE_*
- Replace AT91_ID_* with AT91RM9200_ID_*
- ROM, SRAM and UHP address definitions moved to at91rm9200.h.
- The raw AT91_P[ABCD]_* definitions are now depreciated in favour of
the GPIO API.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-09-28 11:52:05 +01:00
Andrew Morton 7f38aa0f04 [PATCH] USB Storage: fix Rio Karma eject support build error
In file included from drivers/usb/storage/usb.c:180:
drivers/usb/storage/unusual_devs.h:221: error: 'US_PR_KARMA' undeclared here (not in a function)
drivers/usb/storage/unusual_devs.h:221: error: 'rio_karma_init' undeclared here (not in a function)

Cc: Keith Bennett <keith@mcs.st-and.ac.uk>
Acked-by: Bob Copeland <me@bobcopeland.com>
Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 12:45:07 -07:00
Andy Gay 5dda171202 USB: Airprime driver improvements to allow full speed EvDO transfers
Adapted from an earlier patch by Greg KH <gregkh@suse.de>.
That patch added multiple read urbs and larger transfer buffers to allow
data transfers at full EvDO speed.

This version includes additional device IDs and fixes a memory leak in
the transfer buffer allocation.

Some (maybe all?) of the supported devices present multiple bulk endpoints,
the additional EPs can be used for control and status functions,
This version allocates 3 EPs by default, that can be changed using
the 'endpoints' module parameter.

Tested with Sierra Wireless EM5625 and MC5720 embedded modules.

Device ID (0x0c88, 0x17da) for the Kyocera Wireless KPC650/Passport
was added but is not yet tested.


From: Andy Gay <andy@andynet.net>
Cc: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:59:00 -07:00
David Brownell fc849b85fb USB: remove OTG build warning
Somewhere along the line, a variable in a USB-OTG codepath
stopped being used; this removes the relevant compiler warning.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:59:00 -07:00
David Brownell 26f953fd88 USB: EHCI update VIA workaround
This revamps handling of the hardware "async advance" IRQ, and its watchdog
timer.  Basically it dis-entangles that important timeout from the others,
simplifying the associated state and code to make it more robust.

This reportedly improves behavior of EHCI on some systems with VIA chips,
and AFAIK won't affect non-VIA hardware.  VIA systems need this code to
recover from silcon bugs whereby the "async advance" IRQ isn't issued.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:59:00 -07:00
Alan Stern 353a4098c6 USB: force root hub resume after power loss
This patch(as785) forces the PM core to resume a root hub after a
power loss during system sleep.  If the root hub had been suspended
before the system sleep then normally the PM core would not resume it
afterward.  Without this resume, various sorts of wakeup events (like
port change events) can get lost.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:59:00 -07:00
Pete Zaitcev 71795c1df3 USB: ohci_usb can oops on shutdown
When ohci-hcd is shutting down (for rmmod or PC-card removal), there is
a window when the device is shut down, HC communication area (->hcca)
is freed, but the core has not called "free_irq" yet. If another device
triggers a shared interrupt in this window, we oops when trying to
access the freed ->hcca.

This patch removes the window by calling free_irq before ->hcca is freed.

The patch is tested at the PC hotplug test rig at Stratus, and with
rmmod by Rafael Wysocki.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:59:00 -07:00
Pete Zaitcev 38e2bfc94e USB: Dealias -110 code (more complete)
The purpose of this patch is to split off the case when a device does
not reply on the lower level (which is reported by HC hardware), and
a case when the device accepted the request, but does not reply at
upper level. This redefinition allows to diagnose issues easier,
without asking the user if the -110 happened "immediately".

The usbmon splits such cases already thanks to its timestamp, but
it's not always available.

I adjusted all drivers which I found affected (by searching for "urb").
Out of tree drivers may suffer a little bit, but I do not expect much
breakage. At worst they may print a few messages.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:59:00 -07:00
Tobias Klauser ec17cf1cfe USB: Remove unneeded void * casts in core files
The patch removes unneeded casts for the following (void *) pointers:
 - struct file: private
 - struct urb: context
 - struct usb_bus: hcpriv
 - return value of kmalloc()

The patch also contains some whitespace cleanup in the relevant areas.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:59 -07:00
Tony Olech d774efeabc USB: u132-hcd: host controller driver for ELAN U132 adapter
This "u132-hcd" module is one half of the "driver" for
ELAN's U132 which is a USB to CardBus OHCI controller
adapter. This module needs the "ftdi-elan" module in
order to communicate to CardBus OHCI controller inserted
into the U132 adapter.

When the "ftdi-elan" module detects a supported CardBus
OHCI controller in the U132 adapter it loads this "u132-hcd"
module.

Upon a successful device probe() the single workqueue
is started up which does all the processing of commands
from the USB core that implement the host controller.

The workqueue maintains the urb queues and issues commands
via the functions exported by the "ftdi-elan" module. Each
such command will result in a callback.

Note that the "ftdi-elan" module is a USB client driver.

Note that this "u132-hcd" module is a (cut-down OHCI)
host controller.

Thus we have a topology with the parent of a host controller
being a USB client! This really stresses the USB subsystem
semaphore/mutex handling in the module removal.

Signed-off-by: Tony Olech <tony.olech@elandigitalsystems.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:59 -07:00
Tony Olech a5c66e4b24 USB: ftdi-elan: client driver for ELAN Uxxx adapters
This "ftdi-elan" module is one half of the "driver" for
ELAN's Uxxx series adapters which are USB to PCMCIA CardBus
adapters. Currently only the U132 adapter is available and
it's module is called "u132-hcd".

When the USB hot plug subsystem detects a Uxxx series adapter
it should load this module.

Upon a successful device probe() the jtag device file interface
is created and the status workqueue started up.

The jtag device file interface exists for the purpose of
updating the firmware in the Uxxx series adapter, but as
yet it had never been used.

The status workqueue initializes the Uxxx and then sits there
polling the Uxxx until a supported PCMCIA CardBus device is
detected it will start the command and respond workqueues
and then load the module that handles the device. This will
initially be only the u132-hcd module. The status workqueue
then just polls the Uxxx looking for card ejects.

The command and respond workqueues implement a command
sequencer for communicating with the firmware on the other
side of the FTDI chip in the Uxxx. This "ftdi-elan" module
exports some functions to interface with the sequencer.

Note that this module is a USB client driver.

Note that the "u132-hcd" module is a (cut-down OHCI)
host controller.

Thus we have a topology with the parent of a host controller
being a USB client! This really stresses the USB subsystem
semaphore/mutex handling in the module removal.

Signed-off-by: Tony Olech <tony.olech@elandigitalsystems.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:59 -07:00
Johannes Steingraeber 8fd8013393 usb serial: support Alcor Micro Corp. USB 2.0 TO RS-232 through pl2303 driver
Patch to add support for Alcor Micro Corp. USB 2.0 TO RS-232 converter.
This patch adds VID and PID to pl2303.[ch], adds it to the "HORRIBLE
HACK FOR PL2303" in usb-serial.c and also prevents cdc-acm to claim
driving this device by blacklisting it in hid-core.

Signed-off-by: Johannes Steingraeber <Jo_Stein@web.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:59 -07:00
Paul B Schroeder 3f5429746d USB: Moschip 7840 USB-Serial Driver
Signed-off-by: Paul B Schroeder <pschroeder@uplogix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:59 -07:00
Sam Hocevar 5638e4d92e USB: add PlayStation 2 Trance Vibrator driver
This patch is a driver for the PlayStation 2 specific Trance Vibrator
device. The only thing that device can do is vibrate at various speeds.

Signed-off-by: Sam Hocevar <sam@zoy.org>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Cc: Luiz Fernando N. Capitulino" <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:59 -07:00
Steven Haigh 03270634e2 USB: Add ADU support for Ontrak ADU devices
This patch adds support for Ontrak ADU USB devices.

Fixed for printk issues by Randy Dunlap <rdunlap@xenotime.net>

Signed-off-by: Steven Haigh <netwiz@crc.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:59 -07:00
Randy Dunlap 8ac283ad41 aircable: fix printk format warnings
Fix printk format warnings:
drivers/usb/serial/aircable.c:221: warning: format ‘%Zd’ expects type ‘signed size_t’, but argument 4 has type ‘int’
drivers/usb/serial/aircable.c:283: warning: format ‘%Zd’ expects type ‘signed size_t’, but argument 4 has type ‘int’

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:59 -07:00
Manuel Francisco Naranjo 3fe70ba227 Add AIRcable USB Bluetooth Dongle Driver
Add driver for AIRcable USB Bluetooth dongle.

Signed-off-by: Naranjo, Manuel Francisco <naranjo.manuel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:59 -07:00
Mike Isely 78aef519ed cypress_m8: implement graceful failure handling
When receiving a fatal error from the USB core, e.g. EILSEQ (which can
happen if the polling interval is too short), fail gracefully.
Previously the driver would fill the log with useless error messages
or (more alarmingly) silently spin forever trying to write updated
control information to the device.  This change implements a new flag
which if cleared indicates that the driver has failed.  The flag will
be set on initialization, cleared on fatal errors, and anything else
that touches the USB port in the driver will abort if the flag is
clear.  When the flag is cleared, a message will be logged indicating
that the driver has failed.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:59 -07:00
Mike Isely 48298e50e0 cypress_m8: improve control endpoint error handling
Fix usb core function error return checks to look for negative errno
values, not positive errno values.  This bug had rendered those checks
useless.  Also remove attempted error recovery on control endpoints
for EPIPE - with control endpoints EPIPE does not indicate a halted
endpoint so trying to recover with usb_clear_halt() is not the correct
action.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:58 -07:00
Mike Isely 9aa8dae7b1 cypress_m8: use usb_fill_int_urb where appropriate
Rather than directly filling in URB fields, it's safer to use
usb_fill_int_urb().  This improves robustness of the driver; URB
changes in the future will not go uninitialized here.  That point not
withstanding, this driver should at least be self-consistent.  Either
use usb_fill_int_urb() everywhere or don't bother with it all.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:58 -07:00
Mike Isely 0257fa9ffe cypress_m8: use appropriate URB polling interval
The polling interval for the device can't always be 1msec.  If it is
too quick, the device can fail causing a fatal (to the driver) EILSEQ
error from the USB core.  The actual correct value is reported by the
device as part of its configuration data, so use that value as the
default.  On a DeLorme Earthmate for example, the device reports that
it wants a 6msec interval.  As part of this fix, the "interval" module
option has been fixed as well; the device's default can be overridden
by specifying interval=<value> as a module option.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:58 -07:00
Greg Kroah-Hartman 13f4db9e1b USB: fix __must_check warnings in drivers/usb/serial/
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:58 -07:00
Greg Kroah-Hartman 1ee95216c0 USB: fix __must_check warnings in drivers/usb/host/
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:58 -07:00
Greg Kroah-Hartman 657b6717e7 USB: fix __must_check warnings in drivers/usb/input/
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:58 -07:00
Greg Kroah-Hartman 96cede531c USB: fix __must_check warnings in drivers/usb/class/
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:58 -07:00
Greg Kroah-Hartman e7ccdfec08 USB: fix __must_check warnings in drivers/usb/atm/
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:58 -07:00
Greg Kroah-Hartman 4d42e1bb9e USB: fix __must_check warnings in drivers/usb/misc/
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:58 -07:00
Greg Kroah-Hartman 1b21d5e166 USB: fix __must_check warnings in drivers/usb/core/
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:57 -07:00
Alan Stern 592fbbe4bc USB: fix root-hub resume when CONFIG_USB_SUSPEND is not set
This patch (as786) removes a redundant test and fixes a problem
involving repeated system sleeps when CONFIG_USB_SUSPEND is not set.
During the first wakeup, the root hub's dev.power.power_state.event
field doesn't get updated, causing it not to be suspended during the
second sleep transition.

This takes care of the issue raised by Rafael J. Wysocki and Mattia
Dongili.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:57 -07:00
Alan Stern 02c399ee45 usbcore: remove usb_suspend_root_hub
This patch (as740) removes the existing support for autosuspend of
root hubs.  That support fit in rather awkwardly with the rest of
usbcore and it was used only by ohci-hcd.  It won't be needed any more
since the hub driver will take care of autosuspending all hubs, root
or external.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:57 -07:00
Alan Stern 01d883d44a usbcore: non-hub-specific uses of autosuspend
This patch (as741) makes the non-hub parts of usbcore actually use the
autosuspend facilities added by an earlier patch.

	Devices opened through usbfs are autoresumed and then
	autosuspended upon close.

	Likewise for usb-skeleton.

	Devices are autoresumed for usb_set_configuration.


Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:57 -07:00
Alan Stern 645daaab0b usbcore: add autosuspend/autoresume infrastructure
This patch (as739) adds the basic infrastructure for USB autosuspend
and autoresume.  The main features are:

	PM usage counters added to struct usb_device and struct
	usb_interface, indicating whether it's okay to autosuspend
	them or they are currently in use.

	Flag added to usb_device indicating whether the current
	suspend/resume operation originated from outside or as an
	autosuspend/autoresume.

	Flag added to usb_driver indicating whether the driver
	supports autosuspend.  If not, no device bound to the driver
	will be autosuspended.

	Mutex added to usb_device for protecting PM operations.
	Unlike the device semaphore, the locking rule for the pm_mutex
	is that you must acquire the locks going _up_ the device tree.

	New routines handling autosuspend/autoresume requests for
	interfaces and devices.

	Suspend and resume requests are propagated up the device tree
	(but not outside the USB subsystem).

	work_struct added to usb_device, for carrying out delayed
	autosuspend requests.

	Autoresume added (and autosuspend prevented) during probe and
	disconnect.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:57 -07:00
Alan Stern b6956ffa59 usbcore: store each usb_device's level in the tree
This patch (as778) adds a field to struct usb_device to store the
device's level in the USB tree.  In itself this number isn't really
important.  But the overhead is very low, and in a later patch it will
be used for preventing bogus warnings from the lockdep checker.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:57 -07:00
Reiner Herrmann 14acdcd321 USB: usb/input/usbmouse.c: whitespace cleanup
Replace spaces with tab and change comment indention for better readability.

Signed-off-by: Reiner Herrmann <reiner@reiner-h.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:57 -07:00
David Brownell cd22afda3f USB: ohci-at91, two one-liners
This includes two one-liners forwarded to me for the OHCI support on at91:

 - KB920x (and other boards with CPUs in non-BGA packages) need a slightly
   different way to say "ignore that port, it's not pinned out";

 - On resume, if we turn clocks on, record that we did so.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:57 -07:00
David Brownell 901b3d75e7 USB: net2280: update dma buffer allocation
This updates the code handling dma-coherent buffer allocations, basically
reusing code from the musb_hdrc driver.  Instead of trying to work around two
significant limitations of the dma framework (memory wastage for buffers
smaller than a page, and inconsistency between calling context requirements
for allocation and free) this just works around one of them (the latter).

So count this as two steps forward (bugfixes:  the latter issue could cause
errors on some platforms, and some MIPS changes broke code for the former), 
and one step back (increasing cross-platform memory wastage).

Plus linelength and whitespace fixes; and minor data segment shrinkage.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:57 -07:00
Eugeny S. Mints 80f8af0c59 USB: usb serial gadget smp related bug
Adjust dev->dev_lock spinlock lock/unlock calls to be safe for SMP case.
Otherwise the following sequence may lead to a deadlock in SMP case:

gs_send()->usb_ep_queue()
	->(in case a request is satisfied immediatly) gs_write_complete()

for ex for pxa2xx_udc.c: 
usb_ep_queue()->pxa2xx_ep_queue()->write_fifo()->done()->gs_write_complete() 
(through req.complete pointer)

Signed-off-by: Eugeny S. Mints <emints@ru.mvista.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:56 -07:00
Matthew Dharm 0e3c8c26c7 USB: replace kernel_thread() with kthread_run() in libusual.c
Replaced kernel_thread() with kthread_run() since kernel_thread() is
deprecated in drivers/modules.

Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:56 -07:00
Skip Hansen 997694defd gadgetfs patch for ep0out
For ep0out transfers (rare), be sure to copy the right data to userspace.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:56 -07:00
David Brownell 53bd6a601a USB: EHCI whitespace fixes (cosmetic)
[ ... when you have an editor set to remind you of whitespace bugs ... ]

Cosmetic EHCI changes: remove end-of-line whitespace, spaces before tabs.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:56 -07:00
David Brownell 729ed6d502 USB: ethernet gadget avoids zlps for musb_hdrc
For systems using the Mentor HDRC controllers we get better TX DMA throughput
if we can avoid falling back to PIO to write zero length packets ... so tell
the driver to avoid ZLPs.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:56 -07:00
Alan Stern 4d6cd48380 usbmon: don't call mon_dmapeek if DMA isn't being used
This patch (as755b) fixes a bug in usbmon.  Rather than assuming all
USB host controllers use DMA, the code will check the usb_bus data
structure.  If DMA isn't used, we don't want to try peeking into a
non-existent DMA buffer!

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:56 -07:00
Alan Stern 1720058343 usbcore: trim down usb_bus structure
As part of the ongoing program to flatten out the HCD bus-glue layer,
this patch (as771b) eliminates the hcpriv, release, and kref fields
from struct usb_bus.  hcpriv and release were not being used for
anything worthwhile, and kref has been moved into the enclosing
usb_hcd structure.

Along with those changes, the patch gets rid of usb_bus_get and
usb_bus_put, replacing them with usb_get_hcd and usb_put_hcd.

The one interesting aspect is that the dev_set_drvdata call was
removed from usb_put_hcd, where it clearly doesn't belong.  This means
the driver private data won't get reset to NULL.  It shouldn't cause
any problems, since the private data is undefined when no driver is
bound.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:56 -07:00
Alan Stern dd990f16a3 usbcore: Add flag for whether a host controller uses DMA
This patch (as770b) introduces a new field to usb_bus: a flag
indicating whether or not the host controller uses DMA.  This serves
to encapsulate the computation.  It also means we will have only one
spot to update if the DMA API changes.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:56 -07:00
Alan Stern a6d2bb9ff9 USB: remove struct usb_operations
All of the currently-supported USB host controller drivers use the HCD
bus-glue framework.  As part of the program for flattening out the glue
layer, this patch (as769) removes the usb_operations structure.  All
function calls now go directly to the HCD routines (slightly renamed
to remain within the "usb_" namespace).

The patch also removes usb_alloc_bus(), because it's not useful in the
HCD framework and it wasn't referenced anywhere.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:56 -07:00
Andrew Morton 511366da53 USB: usb-hub-driver-improve-use-of-ifdef fix
Fix CONFIG_PM=n build.

Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:55 -07:00
Alexey Dobriyan 42d8a2d22b USB: Turn usb_resume_both() into static inline
drivers/usb/core/hub.c: In function `hub_events':
drivers/usb/core/hub.c:2591: warning: statement with no effect

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:55 -07:00
Alan Stern 088dc270e1 usbcore: help drivers to change device configs
It's generally a bad idea for USB interface drivers to try to change a
device's configuration, and usbcore doesn't provide any way for them
to do it.  However in a few exceptional circumstances it can make
sense.  This patch (as767) adds a roundabout mechanism to help drivers
that may need it.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:55 -07:00
Alan Stern 3a3416b12f usb-storage: fix for UFI LUN detection
The UFI specification doesn't permit devices to indicate non-existent
LUNs in the manner prescribed by the SCSI spec.  This patch (as773)
sets a special flag so that the SCSI scanner will recognize these
devices and treat them specially.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:55 -07:00
Jules Villard e113f29c90 USB: fix typo in drivers/usb/gadget/Kconfig
This tiny patch fixes a typo in drivers/usb/gadget/Kconfig. The typo
is present in 2.6.18-rc4 and in the corresponding -mm tree (and AFAIK,
FYI and FWIW was present in previous kernel versions as well).

From: Jules Villard <jvillard@ens-lyon.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:55 -07:00
Eric Sesterhenn 55359021b9 USB: fix signedness issue in drivers/usb/gadget/ether.c
another gcc 4.1 signdness warning:

drivers/usb/gadget/ether.c:2028: warning: comparison of unsigned expression < 0 is always false

length is assigned the value of usb_ep_queue() which returns an int.
Directly after this it is checked for < 0, which can never be true.  Making
length an int makes the error check work again.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:55 -07:00
Luiz Fernando N. Capitulino 095bc33536 USB core: Use const where possible.
This patch marks some USB core's functions parameters as const. This
improves the design (we're saying to the caller that its parameter is
not going to be modified) and may help in compiler's optimisation work.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:55 -07:00
Inaky Perez-Gonzalez 83a0719673 wusb: pretty print new wireless USB devices when they connect
New code being pushed to linuxuwb.org requires this patch to connect
WUSB devices.

Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:55 -07:00
Inaky Perez-Gonzalez 5bb6e0ae8f wusb: handle wusb device ep0 speed settings
This patch teaches the USB stack handling of WUSB devices (those whose
speed is USB_SPEED_VARIABLE). For these devices, we need to set ep0's
maxpacketsize to 512 (even though the device descriptor reports it as
0xff).

New code being pushed to linuxuwb.org requires this patch to connect WUSB
devices.

Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:55 -07:00
Inaky Perez-Gonzalez 0165de0974 wusb: hub code recognizes wusb ports
This patch enables the USB stack to recognize WUSB devices (from a
WUSB HCD) and assigns them the proper speed setting
(USB_SPEED_VARIABLE).

1. Introduce usb_hcd->wireless to mark a host controller instance as
   being wireless, and thus having wireless 'fake' ports. 

   [discarded previous model of using a reserved bit in the port_stat
   struct to do this; thanks to Alan Stern for indicating the
   proper way to do it].

2. Introduce hub.c:hub_is_wusb() that tests if a hub is a WUSB root
   hub (WUSB doesn't have non-root hubs).

New code being pushed to linuxuwb.org requires this patch to connect WUSB
devices.

Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:55 -07:00
Inaky Perez-Gonzalez cb4c8fe57c usb: deal with broken config descriptors
Change usb_get_configuration() so that it is more tolerant to devices
with bad configuration descriptors (it'll make it ignore
configurations that fail to load).

Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:55 -07:00
Matthew Dharm dfe0d3ba20 USB Storage: add rio karma eject support
This changeset from Keith Bennett (via Bob Copeland) moves the Karma
initializer to its own file and adds trapping of the START_STOP command to
enable eject of the device.

Signed-off-by: Keith Bennett <keith@mcs.st-and.ac.uk>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:54 -07:00
Luiz Fernando N. Capitulino c07045412f usb-skeleton: small update
o CodingStyle fixes
o Removes trailing spaces
o Do not make not needed initialiation of automatic variables
o Use usb_endpoint_* functions
o If we get an error in the write URB callback print an error message instead
  of a debug one

(Pretty unrelated changes, but spliting this up doesn't pay off as our main
changes are just CodingStyle fixes).

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:54 -07:00
Alan Stern d5cbad4b8b usbcore: khubd and busy-port handling
We don't want khubd to start interfering in the device-resume process
merely because the PORT_STATUS_C_SUSPEND feature happens to be set.
Ports need to be marked as busy while a resume is taking place.

In addition, so long as ports are marked as busy, khubd won't be able to
clear their various status-change features.  On an interrupt-driven root
hub this could lead to an interrupt storm.  Root hub IRQs should not be
re-enabled until the busy_bits value is equal to 0.

This patch (as765) fixes these two potential problems.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:54 -07:00
Alan Stern 455b25fb20 usbcore: make hcd_endpoint_disable wait for queue to drain
The inconsistent lock state problem in usbcore (the one that shows up
when an HCD is unloaded) comes down to two inter-related problems:

	usb_rh_urb_dequeue() isn't set up to be called with interrupts
	disabled.

	hcd_endpoint_disable() doesn't wait for all URBs on the
	endpoint's queue to complete.

The two problems are related because the one type of URB that isn't
likely to be complete when hcd_endpoint_disable() returns is a root-hub
URB.  Right now usb_rh_urb_dequeue() waits for them to complete, and it
assumes interrupts are enabled so it can wait.  But
hcd_endpoint_disable() calls it with interrupts disabled.

Now, it should be legal to unlink root-hub URBs with interrupts
disabled.  The solution is to move the waiting into
hcd_endpoint_disable(), where it belongs.  This patch (as754) does that.

It turns out to be completely safe to replace the del_timer_sync() with
a simple del_timer().  It doesn't matter if the timer routine is
running; hcd_root_hub_lock will synchronize the two threads and the
status URB will complete with an unlink error, as it should.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:54 -07:00
Alan Stern de06a3b842 UHCI: increase Resume-Detect-off delay
The UHCI controller in my laptop takes longer to turn off the
Resume-Detect bit than the 4 us allowed by uhci-hcd.  Presumably other
computers will have the same problem.

This patch (as752) increases the maximum delay to 10 us, which should be
plenty, and uses polling to avoid penalizing systems which can turn the
bit off more quickly.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:54 -07:00
Aleksey Gorelov 64a21d025d USB: Properly unregister reboot notifier in case of failure in ehci hcd
If some problem occurs during ehci startup, for instance, request_irq fails,
echi hcd driver tries it best to cleanup, but fails to unregister reboot
notifier, which in turn leads to crash on reboot/poweroff.

The following patch resolves this problem by not using reboot notifiers
anymore, but instead making ehci/ohci driver get its own shutdown method.  For
PCI, it is done through pci glue, for everything else through platform driver
glue.

One downside: sa1111 does not use platform driver stuff, and does not have its
own shutdown hook, so no 'shutdown' is called for it now.  I'm not sure if it
is really necessary on that platform, though.

Signed-off-by: Aleks Gorelov <dared1st@yahoo.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:54 -07:00
Milan Svoboda a94da8971e USB gadget: gadgetfs dont try to lock before free
I spotted this during my tests with -rt on arm. The -rt patch contains
some better tools
to diagnose problems with locks and some other things...

Original code tries to take semaphore in BUG_ON and then free the memory
with this semaphore.


Signed-off-by: Milan Svoboda <msvoboda@ra.rockwell.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:54 -07:00
Milan Svoboda e22fc27c87 USB: add poll to gadgetfs's endpoint zero
Add poll() support to gadgetfs ep0

Signed-off-by: Milan Svoboda <msvoboda@ra.rockwell.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:54 -07:00
dave rientjes 9bcbcf4d00 USB: net1080 inherent pad length
The size of struct nc_trailer is inherently the newtailroom pad.


Signed-off-by: David Rientjes <rientjes@google.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:54 -07:00
Luiz Fernando N. Capitulino 5482687b8b USB: ldusb: Use usb_endpoint_* functions.
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:54 -07:00
Luiz Fernando N. Capitulino b0b660b8d5 USB: usblcd: Use usb_endpoint_* functions.
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:54 -07:00
Luiz Fernando N. Capitulino 4fa1bbf5cf USB: usb-serial: Use usb_endpoint_* functions.
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:53 -07:00
Luiz Fernando N. Capitulino 60ca126c95 USB: powermate: Use usb_endpoint_* functions.
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:53 -07:00
Luiz Fernando N. Capitulino 96723199e0 USB: keyspan_remote: Use usb_endpoint_* functions.
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:53 -07:00
Luiz Fernando N. Capitulino 96642a2ce5 USB: ati_remote: Use usb_endpoint_* functions.
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:53 -07:00
Luiz Fernando N. Capitulino ee709a3c61 USB: acecad: Use usb_endpoint_* functions.
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:53 -07:00
Luiz Fernando N. Capitulino 97b107ca39 USB: appletouch: Use usb_endpoint_* functions.
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:53 -07:00
Luiz Fernando N. Capitulino fbf81c29a3 USB: hub: Use usb_endpoint_* functions.
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:53 -07:00
Luiz Fernando N. Capitulino 5bc66d530b USB: usblp: Use usb_endpoint_* functions.
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:53 -07:00
Luiz Fernando N. Capitulino b7cfaaaf86 USB: New functions to check endpoints info.
These functions makes USB driver's code simpler when dealing with endpoints
by avoiding them from accessing the endpoint's descriptor structure directly
when they only need to know the endpoint's transfer type and/or
direction.

Please, read each functions' documentation in order to know how to use
them.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:53 -07:00
Luiz Fernando N. Capitulino 066202dd48 USB: Make file operations structs in drivers/usb const.
Making structs const prevents accidental bugs and with the proper debug
options they're protected against corruption.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:52 -07:00
Ben Williamson f2ebf92c9e USB: gmidi: New USB MIDI Gadget class driver.
This driver is glue between the USB gadget interface
and the ALSA MIDI interface. It allows us to appear
as a MIDI Streaming device to a host system on the
other end of a USB cable.

This includes linux/usb/audio.h and linux/usb/midi.h
containing definitions from the relevant USB specifications
for USB audio and USB MIDI devices.

The following changes have been made since the first RFC
posting:

* Bug fixes to endpoint handling.
* Workaround for USB_REQ_SET_CONFIGURATION handling,
  not understood yet.
* Added SND and SND_RAWMIDI dependencies in Kconfig.
* Moved usb_audio.h and usb_midi.h to usb/*.h
* Added module parameters for ALSA card index and id.
* Added module parameters for USB descriptor IDs and strings.
* Removed some unneeded stuff inherited from zero.c, more to go.
* Provide DECLARE_* macros for the variable-length structs.
* Use kmalloc instead of usb_ep_alloc_buffer.
* Limit source to 80 columns.
* Return actual error code instead of -ENOMEM in a few places.

Signed-off-by: Ben Williamson <ben.williamson@greyinnovation.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:52 -07:00
Milan Svoboda ba307f5828 USB: gadgetfs: protect ep_release with lock
This patch adds mutex protection to ep_release.

Signed-off-by: Milan Svoboda <msvoboda@ra.rockwell.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:52 -07:00
Milan Svoboda 8a7471aba1 USB: fix ep_config to return correct value
This patch fixes ep_config to return correct value. Without patch
ep_config returns submitted lenght minus 4 on succes. With this
patch applied, whole submitted lenght is returned.

ep_config parses submitted data and if buffer starts with (int) 1
it is parsed, otherwise error is reported. Problem is that ep_config
returns size of buffer minus 4 on success. I think that size of buffer
should be returned instead, because there were no problems and
all data were processed.

Signed-off-by: Milan Svoboda <msvoboda@ra.rockwell.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:52 -07:00
Milan Svoboda 07cb7f23d0 USB: correct locking in gadgetfs_disconnect
This patch moves spin_lock (&dev->lock) before first use of dev.
I think that test to the state of device should be protected with
this spin_lock...

Signed-off-by: Milan Svoboda <msvoboda@ra.rockwell.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:52 -07:00
Dmitry Torokhov 17efe15525 USB: onetouch - handle errors from input_register_device()
Onetouch: handle errors from input_register_device()

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:52 -07:00
David Brownell bd35078f47 USB: build fixes: ohci-omap
The ohci-omap code has diverged from the working version in the linux-omap
tree; this syncs up the versions:

  - Another clock is needed in various cases
  - The omap-1510 iommu code needs to be #ifdeffed out on newer parts
  - Saner use of the HCD framework
  - Various other changes, e.g. a Nokia 770 quirk

And some minor dead-whitespace removal.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:52 -07:00
Hermann Kneissel eb6d8c2d14 USB: garmin_gps support for new generation of gps receivers
The attached patch adds support for the new generation of gps receivers (eg. 
GPSmap 60Cx) to garmin_gps.c.

Signed-off-by: Hermann Kneissel <herkne@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:52 -07:00
Ping Cheng 3bea733ab2 USB: wacom tablet driver reorganization
- split wacom.c into 4 files: wacom.h, wacom_wac.h, wacom_sys.c, and wacom_wac.c
- where wacom_sys.c deals with system specific code, 
- and wacom_wac.c deals with Wacom specific code

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:52 -07:00
Franck Bui-Huu ecdc0a5902 USB: usbcore get rid of the timer in usb_start_wait_urb()
This patch uses completion timeout instead of a timer to implement
a timeout when submitting an URB in usb_start_wait_urb().

It also fixes a small issue. With the previous code, if no timeout
happened and the URB's status was set to ECONNRESET value, the code
assumed wrongly that a timeout had occured.

Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:51 -07:00
Luiz Fernando N. Capitulino 014aa2a3c3 USB: ipaq: minor ipaq_open() cleanup.
Commit b512504e5671f83638be0ddr085c4b1832f623d3 made ipaq_open() a bit
messy by moving the read urb submission far from its usb_fill_bulk_urb()
call and the comment explaining what it does.

 This patch put they together again. Although only compiled tested, should
not break the fix introduced by b512504e5671f83638be0ddr085c4b1832f623d3,
of course.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:51 -07:00
Randy Dunlap 25d94e682c usbnet: printk format warning
Fix printk format warning(s):
drivers/usb/net/usbnet.c:654: warning: int format, different type arg (arg 3)

The fact that rx_urb_size happens to be a size_t has propagated all the way
back to this printk.  It's fragile to be using %z in this case - let's just
typecast the args instead.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:51 -07:00
David Hollis 933a27d39e USB: asix - Add AX88178 support and many other changes
* More generi-fication of function/macro names where appropriate:
     ax88772_xx() -> asix_xx()

* Reorder functions to provide more logical grouping

* AX88178 device support

* Support DLink DUB-E100 Rev B Support

* Hopefully resolve all endian-ness issues

* Use more defines for bitmask values

* Change a number of devdbg() calls to deverr() so that if DEBUG is not
  defined, the error messages still get through as necessary


Signed-off-by: David Hollis <dhollis@davehollis.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:51 -07:00
Jamie Painter a99c19492a USB: usbnet - Add unlink_rx_urbs() call to allow for Jumbo Frames
Add usbnet_unlink_rx_urbs() which can be called by mini-drivers when
they change their MTU such as for Jumbo Frame support.


Signed-off-by: David Hollis <dhollis@davehollis.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:51 -07:00
Thiago Galesi 9c53761681 USB: pl2303: cosmetic changes to quirk
Cosmetic changes to quirk in pl2303_update_line_status

Signed-off-by: Thiago Galesi <thiagogalesi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:51 -07:00
Thiago Galesi 572d3138eb USB: pl2303: reduce number of prototypes
Reduce number of needed prototypes in Prolific pl2303 driver

Signed-off-by: Thiago Galesi <thiagogalesi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:51 -07:00
Thiago Galesi 10a18cd1a3 USB: pl2303: cosmetic changes to pl2303_buf_{clear, data_avail}
Changes the functions pl2303_buf_clear and pl2303_buf_data_avail for
the purpose of keeping them under the 80 column limit, making them
more similar to similar functions and making then simpler.

Signed-off-by: Thiago Galesi <thiagogalesi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:51 -07:00
Thiago Galesi 372db8a780 USB: pl2303: remove 80-columns limit violations in pl2303 driver
Fixes several lines that overrun 80 columns in Prolific pl2303 driver
and cleans up some space usages in the function calls.

Signed-off-by: Thiago Galesi <thiagogalesi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:51 -07:00
Luiz Fernando N. Capitulino a009b75aa0 USB: pl2303: Removes unneeded goto.
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:51 -07:00
Daniel Ritz 5d8926658c usbtouchscreen: version 0.4
changes over 0.3:
- some more eGalax device IDs (from eGalax driver/spec)
- return the error code in probe()
- 3M/MTouch init fixes, tested by Don Alexander
- eGalax fixes for bugs in multi-packet handling, spottet by Pieter Grimmerink
- support for some eTurboTouch devices, mostly by Pieter Grimmerink
- support for Gunze AHL61 controller (untested, but simple enough)

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Cc: Pieter Grimmerink <p.grimmerink@inepro.com>
Cc: Don Alexander <debug@roosoft.ltd.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:51 -07:00
Alan Stern d388dab7b5 hub driver: improve use of #ifdef
This patch (as736) makes the hub driver more readable by improving the
usage of "#ifdef CONFIG_PM" and "#ifdef CONFIG_USB_SUSPEND".


Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:50 -07:00
Alan Stern 1c5df7e705 usbcore: suspending devices with no driver
Since usb_generic can be unbound from a USB device, we need to be able
to handle the possibility that a suspend or resume request arrives for a
device with no driver.  This patch (as735) arranges things so that
resume requests will fail and suspend requests will use the standard USB
port-suspend code.  Attempts to suspend or resume an unbound interface
are handled similarly (although the error caused by trying to resume an
unbound interface is dropped by the calling routine).


Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:50 -07:00
Alan Stern 114b368c07 usbcore: fix up device and power state tests
This patch (as734) rationalizes the various tests of device state and
power states.  There are duplications and mistaken tests in several
places.

Perhaps the most interesting challenge is where the hub driver tests to
see that all the child devices are suspended before allowing itself to
be suspended.  When CONFIG_USB_SUSPEND is set the test is
straightforward, since we expect that the children _will_ be suspended.
But when CONFIG_USB_SUSPEND isn't set, it's not so clear what should be
done.  The code compromises by checking the child's
power.power_state.event field.


Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:50 -07:00
Alan Stern 2bf4086d7a usbcore: set device and power states properly
This patch (as733) fixes up the places where device states and power
states are set in usbcore.  Right now things are duplicated or missing;
this should straighten things out.

The idea is that udev->state is USB_STATE_SUSPENDED exactly when the
device's upstream port has been suspended, whereas
udev->dev.power.power_state.event reflects the result of the last call
to the suspend/resume routines (which might not actually change the
device state, especially if CONFIG_USB_SUSPEND isn't set).


Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:50 -07:00
Alan Stern 4d064c0802 usbcore: track whether interfaces are suspended
Currently we rely on intf->dev.power.power_state.event for tracking
whether intf is suspended.  This is not a reliable technique because
that value is owned by the PM core, not by usbcore.  This patch (as718b)
adds a new flag so that we can accurately tell which interfaces are
suspended and which aren't.

At first one might think these flags aren't needed, since interfaces
will be suspended along with their devices.  It turns out there are a
couple of intermediate situations where that's not quite true, such as
while processing a remote-wakeup request.


Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:50 -07:00
Alan Stern a8e7c56535 usbcore: resume device resume recursion
This patch (as717b) removes the existing recursion in hub resume code:
Resuming a hub will no longer automatically resume the devices attached
to the hub.

At the same time, it adds one level of recursion: Suspending a USB
device will automatically suspend all the device's interfaces.  Failure
at an intermediate stage will cause all the already-suspended interfaces
to be resumed. Attempts to suspend or resume an interface by itself will
do nothing, although they won't return an error.  Thus the regular
system-suspend and system-resume procedures should continue to work as
before; only runtime PM will be affected.

The patch also removes the code that tests state of the interfaces
before suspending a device.  It's no longer needed, since everything
gets suspended together.


Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:50 -07:00
Alan Stern 1cc8a25d5b usbcore: split suspend/resume for device and interfaces
This patch (as716b) splits up the core suspend and resume routines into
two parts each: one for handling devices and one for handling
interfaces.  The behavior of the parts should be the same as in the old
unified code.


Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:50 -07:00
Alan Stern 782da727b0 usbcore: make usb_generic a usb_device_driver
This patch (as714b) makes usb_generic into a usb_device_driver capable
of being probed and unbound, just like other drivers.  A fair amount of
the work that used to get done during discovery or removal of a USB
device have been moved to the probe and disconnect methods of
usb_generic: creating the sysfs attributes and selecting an initial
configuration.  However the normal behavior should continue to be the
same as before.

We will now have the possibility of creating other USB device drivers,
They will assist with exporting devices to remote systems
(USB-over-TCPIP) or to paravirtual guest operating systems.


Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:50 -07:00
Alan Stern 8bb54ab573 usbcore: add usb_device_driver definition
This patch (as732) adds a usb_device_driver structure, for representing
drivers that manage an entire USB device as opposed to just an
interface.  Support routines like usb_register_device_driver,
usb_deregister_device_driver, usb_probe_device, and usb_unbind_device
are also added.

Unlike an earlier version of this patch, the new code is type-safe.  To
accomplish this, the existing struct driver embedded in struct
usb_driver had to be wrapped in an intermediate wrapper.  This enables
the core to tell at runtime whether a particular struct driver belongs
to a device driver or to an interface driver.


Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:50 -07:00
Alan Stern 36e56a3458 usbcore: move code among source files
This revised patch (as713b) moves a few routines among source files in
usbcore.  Some driver-related code in usb.c (claiming interfaces and
matching IDs) is moved to driver.c, where it belongs.  Also the
usb_generic stuff in driver.c is moved to a new source file: generic.c.
(That's the reason for revising the patch.)  Although not very big now,
it will get bigger in a later patch.

None of the code has been changed; it has only been re-arranged.


Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:50 -07:00
Alan Stern 140d8f6874 usbcore: rename usb_suspend_device to usb_port_suspend
This revised patch (as715b) renames usb_suspend_device to
usb_port_suspend, usb_resume_device to usb_port_resume, and
finish_device_resume to finish_port_resume.  There was no objection to
the original version of the patch so this should be okay to apply.

The revision was needed only because I have re-arranged the order of the
earlier patches.


Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:49 -07:00
Alan Stern 121e287cb5 usb-skeleton: don't submit URBs after disconnection
This patch (as712b) is a slight revision of one submitted earlier.  It
fixes the usb-skeleton example driver so that it won't try to submit
URBs after skel_disconnect() has returned.  This could cause errors, if
the driver was unbound and then a different driver was bound to the
device.  It also fixes a couple of small bugs in the skel_write()
routine.

The revised patch uses a slightly different test, suggested by Dave
Brownell, for determining whether to free a transfer buffer.  It's a
little clearer than the earlier version.


Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:49 -07:00
Alan Stern 349710c3a7 usbfs: detect device unregistration
This patch (as711b) is a revised version of an earlier submission.  It
modifies the usbfs code to detect when a device has been unregistered from
usbfs, even if the device is still connected.  Although this can't happen
now, it will be able to happen after the upcoming changes to usb_generic.

Nobody objected to this patch when it was submitted before, so it should
be okay to apply this version.  The revision is merely to take into
account the changes introduced by as723, which touches the same driver.


Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:49 -07:00
Alan Stern 4a2a8a2cce usbfs: private mutex for open, release, and remove
The usbfs code doesn't provide sufficient mutual exclusion among open,
release, and remove.  Release vs. remove is okay because they both
acquire the device lock, but open is not exclusive with either one.  All
three routines modify the udev->filelist linked list, so they must not
run concurrently.

Apparently someone gave this a minimum amount of thought in the past by
explicitly acquiring the BKL at the start of the usbdev_open routine.
Oddly enough, there's a comment pointing out that locking is unnecessary
because chrdev_open already has acquired the BKL.

But this ignores the point that the files in /proc/bus/usb/* are not
char device files; they are regular files and so they don't get any
special locking.  Furthermore it's necessary to acquire the same lock in
the release and remove routines, which the code does not do.

Yet another problem arises because the same file_operations structure is
accessible through both the /proc/bus/usb/* and /dev/usb/usbdev* file
nodes.  Even when one of them has been removed, it's still possible for
userspace to open the other.  So simple locking around the individual
remove routines is insufficient; we need to lock the entire
usb_notify_remove_device notifier chain.

Rather than rely on the BKL, this patch (as723) introduces a new private
mutex for the purpose.  Holding the BKL while invoking a notifier chain
doesn't seem like a good idea.


Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:49 -07:00
Sean Young da308e8da7 USB: Phidgets should check create_device_file() return value
device_create_file() could fail, add proper error paths for this condition.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:49 -07:00
Sean Young 912b24c333 USB: Put phidgets driver in a sysfs class
This patch creates a device class phidget and add the phidget drivers to 
them.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:49 -07:00
Sean Young d5176b413d USB: Add driver for PhidgetMotorControl
This driver add support for the Phidgets Inc., MotorControl via sysfs. Also
some minor fixes for the InterfaceKit.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:49 -07:00
Alan Stern b6eb2d84d2 usbcore: add configuration_string to attribute group
This patch (as737b) does a very small cleanup of core/sysfs.c by adding
the configuration_string attribute file to the existing attribute group
instead of treating it separately.  It doesn't need this separate
treatment because unlike the other device string attributes, it changes
along with the active configuration.

The patch also fixes a simple typo (which, oddly enough, doesn't seem to
bother the compiler).

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:49 -07:00
Dmitry Torokhov b94badbb47 USB: Make usb_buffer_free() NULL-safe
kfree() handles NULL arguments which is handy in error handling paths as one
does need to  insert bunch of ifs. How about making usb_buffer_free() do the
same?

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:49 -07:00
Werner Lemberg 988440e7e5 USB: ark3116: Formatting cleanups
Formatting only.

Signed-off-by: Werner Lemberg <wl@gnu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:49 -07:00
Werner Lemberg 2f430b4bba USB: ark3116: Add TIOCGSERIAL and TIOCSSERIAL ioctl calls.
Add (dummy?) support for TIOCGSERIAL and TIOCSSERIAL ioctl calls to the USB
serial driver file `ark3116.c'.  This is sufficient for me to run wvdial
successfully, receive my email, and do webbrowsing with firefox.  On the
other hand, running the cvs program to update archives seems not to work,
and the traceroute command sometimes says

  send failed: No buffer space available

Looks like a buffering problem...  My knowledge of serial device drivers is
zero, so I can't fix this -- I just did a cut'n'paste from other USB serial
drivers...

Signed-off-by: Werner Lemberg <wl@gnu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:49 -07:00
Tony Lindgren bfb2c965d6 USB: Allow compile in g_ether, fix typo
Allows compiling g_ether in and fixes a typo with MUSB_HDRC

Signed-off-by: Tony Lindgren <tony@atomide.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:48 -07:00
David Brownell b2bbb20b37 USB: pxa2xx_udc understands GPIO based VBUS sensing
This updates the PXA 25x UDC board-independent infrastructure for VBUS sensing
and the D+ pullup.  The original code evolved from rather bizarre support on
Intel's "Lubbock" reference hardware, so that on more sensible hardware it
doesn't work as well as it could/should.

The change is just to teach the UDC driver how to use built-in PXA GPIO pins
directly.  This reduces the amount of board-specfic object code needed, and
enables the use of a VBUS sensing IRQ on boards (like Gumstix) that have one.
With VBUS sensing, the UDC is unclocked until a host is actually connected.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:48 -07:00
David Brownell 3a16f7b4a7 USB: move <linux/usb_otg.h> to <linux/usb/otg.h>
Move <linux/usb_otg.h> to <linux/usb/otg.h>.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:48 -07:00
Andrew Morton 26facdff1d USB: kill usb kconfig warning
drivers/usb/host/Kconfig:87:warning: 'select' used by config symbol 'USB_OHCI_HCD' refer to undefined symbol 'I2C_PNX'


Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:48 -07:00
Vitaly Wool 60bbfc84b6 USB OHCI controller support for PNX4008
inlined is the patch that adds basic support for USB OHCI controller
support for PNX4008 Philips PNX4008 ARM board. Due to HW design, it
depends on I2C driver for PNX4008 which I've recetnly posted to LKML and
i2c at lm-sensors.

Signed-off-by: Vitaly Wool <vitalywool@gmail.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:48 -07:00
Ben Dooks b2a8e097d0 USB: ohci-s3c2410.c: clock now usb-bus-host
With the newer Samsung S3C2412 and S3C2413 SoC devices,
the 48MHz USB clock has been given an individual gate
into the USB OHCI and gadget blocks.

This clock is called usb-bus-clock, and we need to
replace the old use of the USB PLL (upll) directly
with the new usb-bus-host.

The S3C2410 clock driver has been updated already to
provide a virtual clock which is a child of the UPLL
to maintain compatibility. The S3C2412 clock driver
correctly enables the PLL when either usb-bus clock
is active.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:48 -07:00
David Brownell d413984ae9 USB: OHCI avoids root hub timer polling
This teaches OHCI to use the root hub status change (RHSC) IRQ, bypassing
root hub timers most of the time and switching over to the "new" root hub
polling scheme.  It's complicated by the fact that implementations of OHCI
trigger and ack that IRQ differently (the spec is vague there).

Avoiding root hub timers helps mechanisms like "dynamic tick" leave the
CPU in lowpower modes for longer intervals.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:48 -07:00
Phil Dibowitz 39c2f3ac04 USB: unusual_dev entry for Sony P990i
This patch is a re-diffed version of one originally sent by Jan Mate
<mate@fiit.stuba.sk>.

Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:48 -07:00
Alan Stern b97b196c9d USB: unusual_devs entry for Lacie DVD+-RW
This patch (as781) adds an entry to unusual_devs.h for the Lacie DVD+-RW
drive.  Apparently its USB interface has requirements similar to the
Genesys Logic interface; it doesn't like data to be sent too soon after
a command.

This fixes Bugzilla #6817.


Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:47 -07:00
Theodore Ts'o ba52de123d [PATCH] inode-diet: Eliminate i_blksize from the inode structure
This eliminates the i_blksize field from struct inode.  Filesystems that want
to provide a per-inode st_blksize can do so by providing their own getattr
routine instead of using the generic_fillattr() function.

Note that some filesystems were providing pretty much random (and incorrect)
values for i_blksize.

[bunk@stusta.de: cleanup]
[akpm@osdl.org: generic_fillattr() fix]
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-27 08:26:18 -07:00
Theodore Ts'o 8e18e2941c [PATCH] inode_diet: Replace inode.u.generic_ip with inode.i_private
The following patches reduce the size of the VFS inode structure by 28 bytes
on a UP x86.  (It would be more on an x86_64 system).  This is a 10% reduction
in the inode size on a UP kernel that is configured in a production mode
(i.e., with no spinlock or other debugging functions enabled; if you want to
save memory taken up by in-core inodes, the first thing you should do is
disable the debugging options; they are responsible for a huge amount of bloat
in the VFS inode structure).

This patch:

The filesystem or device-specific pointer in the inode is inside a union,
which is pretty pointless given that all 30+ users of this field have been
using the void pointer.  Get rid of the union and rename it to i_private, with
a comment to explain who is allowed to use the void pointer.  This is just a
cleanup, but it allows us to reuse the union 'u' for something something where
the union will actually be used.

[judith@osdl.org: powerpc build fix]
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Judith Lebzelter <judith@osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-27 08:26:17 -07:00
Alexey Dobriyan 1a1d92c10d [PATCH] Really ignore kmem_cache_destroy return value
* Rougly half of callers already do it by not checking return value
* Code in drivers/acpi/osl.c does the following to be sure:

	(void)kmem_cache_destroy(cache);

* Those who check it printk something, however, slab_error already printed
  the name of failed cache.
* XFS BUGs on failed kmem_cache_destroy which is not the decision
  low-level filesystem driver should make. Converted to ignore.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-27 08:26:10 -07:00
David Brownell 185849991d PM: USB HCDs use PM_EVENT_PRETHAW
This teaches several USB host controller drivers to treat PRETHAW as a chip
reset since the controller, and all devices connected to it, are no longer in
states compatible with how the snapshotted suspend() left them.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-25 21:08:37 -07:00
Al Viro c03efdb202 [PATCH] fallout from hcd-core patch
missing le16_to_cpu()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-22 17:48:57 -07:00
Dmitry Torokhov 0612ec4876 Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2006-09-19 01:56:44 -04:00
Henk Vergonet 3e2aac366f USB: Fix unload oops and memory leak in yealink driver
This patch fixes a memory leak and a kernel oops when trying to unload
the driver, due to an unbalanced cleanup.
Thanks Ivar Jensen for spotting my mistake.

Signed-off-by: Henk Vergonet <henk.vergonet@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-12 03:10:21 -07:00
Matthias Urlichs 5992583889 usbserial: Reference leak
A sufficiently-large number of USB serial devices causes a reference leak
when /proc/tty/drivers/usbserial is read.

Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-12 03:10:20 -07:00
Kai Lindhom 09494d5d11 usbtouchscreen: fix ITM data reading
From: Kai Lindhom <megantti@gmail.com>
Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-07 15:23:04 -07:00
Ralf Schlatterbeck eaede2cb75 USB: New device ID for ftdi_sio usb serial driver
The patch adds a new device ID for the Gamma Scout Geiger counter
device.

Signed-off-by: Ralf Schlatterbeck <rsc@runtux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-07 15:23:04 -07:00
Nobuhiro Iwamatsu 3003b9f789 USB: Support for USB20SVGA-WH & USB20SVGA-DG
This patch is support USB20SVGA-WH & USB20SVGA-DG of the sisusb device.
As for this device, Device ID is different according to the color of the
product.  A blue device is supported. However, a green, white device is
not supported.

http://www.lubic.jp/uv_method.html ( Japanese only ) .

Green, white USB20SVGA comes to work by applying the patch .
And, it  be able to use three USB20SVGA( Blue , Green , White ).

Signed-off-by: Nobuhiro Iwamatsu <hemamu@t-base.ne.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-07 15:23:04 -07:00
Adrian Bunk f064902457 USB: hid-core.c: fix duplicate USB_DEVICE_ID_GTCO_404
On Fri, Sep 01, 2006 at 01:58:18AM -0700, Andrew Morton wrote:
>...
> Changes since 2.6.18-rc4-mm3:
>...
> +gregkh-usb-hid-core.c-adds-all-gtco-calcomp-digitizers-and-interwrite-school-products-to-blacklist.patch
>...
>  USB tree updates.
>...

The GNU C compiler spotted the following bug:

<--  snip  -->

...
  CC      drivers/usb/input/hid-core.o
/home/bunk/linux/kernel-2.6/linux-2.6.18-rc5-mm1/drivers/usb/input/hid-core.c:1446:1: warning: "USB_DEVICE_ID_GTCO_404" redefined
/home/bunk/linux/kernel-2.6/linux-2.6.18-rc5-mm1/drivers/usb/input/hid-core.c:1445:1: warning: this is the location of the previous definition
...

<--  snip  -->

This patch fixes this cut'n'paste error.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-07 15:23:03 -07:00
Alan Stern db59b464f8 uhci-hcd: fix list access bug
When skipping to the last TD of an URB, go to the _last_ entry in the
list instead of the _first_ entry (as780).  This fixes Bugzilla #6747
and possibly others.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-31 18:04:30 -07:00
Nobuhiro Iwamatsu 5df3d8b53f USB: Support for ELECOM LD-USB20 in pegasus
This patch is support LD-USB20 of the USB LAN device.
http://www2.elecom.co.jp/products/LD-USB20.html ( Japanese only )

I am using this device.
And, I confirmed work by using this patch.

Signed-off-by: Nobuhiro Iwamatsu <hemamu@t-base.ne.jp>
Acked-by: Petko Manolov <petkan@nucleusys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-31 18:04:30 -07:00
Andrew Morton eff674a514 USB: rtl8150_disconnect() needs tasklet_kill()
We need to wait until any currently-running handler has completed.  Fixes an
unplug-time oops reported by "Miles Lane" <miles.lane@gmail.com>.

Cc: "Petko Manolov" <petkan@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-31 18:04:30 -07:00
Phil Dibowitz c9c770ed1f USB Storage: unusual_devs.h for Sony Ericsson M600i
This entry was sent in by Emmanuel Vasilakis <evas@forthnet.gr>, turned
into a patch by yours truly.

Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-31 18:04:30 -07:00
Phil Dibowitz f84c749f1c USB Storage: Remove the finecam3 unusual_devs entry
This patch removes the Kyocera Finecam L3 entry in unusual devices
originally submitted by Michael Krauth <michael.krauth@web.de> and
Alessandro Fracchetti <al.fracchetti@tin.it> given that Gerriet
<ger.haw@gmx.de> finds he doesn't need it and Alessandro confirms it
isn't needed anymore as well.

Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-31 18:04:30 -07:00
Alan Stern 7ceb932f48 UHCI: don't stop at an Iso error
Unlike other sorts of endpoint queues, Isochronous queues don't stop
when an error is encountered.  This patch (as772) fixes the scanning
routine in uhci-hcd, to make it keep on going when it finds an Iso
error.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-31 18:04:30 -07:00
David Brownell 789851cf00 usb gadget: g_ether spinlock recursion fix
The new spinlock debug code turned up a spinlock recursion bug in the
Ethernet gadget driver on a disconnect path; it would show up with any
UDC driver where the cancellation of active requests was synchronous,
rather than e.g. delayed until a controller's completion IRQ.

That recursion is fixed here by creating and using a new spinlock to
protect the relevant lists.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-31 18:04:30 -07:00
Ping Cheng ea186651d5 USB: add all wacom device to hid-core.c blacklist
Add all Wacom devices to hid-core.c blacklist

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-31 18:04:30 -07:00
Jeremy Roberson 6f8d9e26e7 hid-core.c: Adds all GTCO CalComp Digitizers and InterWrite School Products to blacklist
Adds all GTCO CalComp Digitizers and InterWrite School Products to
hid-core.c blacklist.

Signed-off-by: Jeremy A. Roberson <jroberson@gtcocalcomp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-31 18:04:29 -07:00
juergen.mell@t-online.de 082fdd12b1 USB floppy drive SAMSUNG SFD-321U/EP detected 8 times
USB floppy drive SAMSUNG SFD-321U/EP detected 8 times

Acked-by: mantel@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-31 18:04:29 -07:00
Alan Stern 94918ff68a [PATCH] unusual_devs update for UCR-61S2B
The existing unusual_devs entry for the UCR-61S2B appears to have too
wide a revision range.  It matches at least one device that doesn't
respond to the initialization sequence.  Perhaps the sequence needs to
be updated, or perhaps something else can be done.  For now, this patch
(as764) restricts the range to include only the revision mentioned in
the original comment.

This resolves (for now!) Bugzilla entry #6950.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-26 13:06:24 -07:00
Tomasz Kazmierczak be72952336 [PATCH] USB: pl2303: removed support for OTi's DKU-5 clone cable
This patch removes support for a clone of Nokia DKU-5 cable made by Ours
Technology Inc, as it turned out that the cable does not use the pl2303
chip, but OTI-6858 chip which is not compatible with the pl2303.

Signed-off-by: Tomasz Kazmierczak <tomek.fizyk@op.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-26 13:06:17 -07:00
Greg Kroah-Hartman b93b58eea8 [PATCH] USB: fix bug in cypress_cy7c63.c driver
This was pointed out by Adrian Bunk <bunk@stusta.de>, as found by the Coverity Checker.

Cc: Adrian Bunk <bunk@stusta.de>
Cc: Oliver Bock <o.bock@fh-wolfenbuettel.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-26 13:06:11 -07:00
Orjan Friberg f54fa84dda USB: usbtest.c: unsigned retval makes ctrl_out return 0 in case of error
In my quest to try and figure out why test 14 (control write) doesn't
work with my EZ-USB board, I noticed that sometimes testusb reported
no error even though the kernel log complained "byte 0 is 0 not 2" etc.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-11 14:06:06 -07:00
Jonathan Davies 2011e9249a USB: ftdi_sio driver - new PIDs
Signed-off-by: Jonathan Davies <jjd27@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-11 14:06:06 -07:00
Norihiko Tomiyama 922fdaa692 USB: Additional PID for SHARP W-ZERO3
I write a patch for ipaq.c.
Would you like to add upstream tree ?

This patch enables a support of "SHARP W-ZERO3(WS004SH)" and "SHARP W-ZERO3[es](WS007SH)".

From: Norihiko Tomiyama <norihiko.tomiyama@ctc-g.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-11 14:06:06 -07:00
Johannes Berg 7af569abc3 USB: appletouch: fix atp_disconnect
appletouch uses urb->transfer_dma after having freed the urb, this shows
up only if the system is compiled with slab debugging. This patch fixes
it by reordering the free calls.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-11 14:06:06 -07:00
Yoichi Yuasa 919aeadcfa USB: removed a unbalanced #endif from ohci-au1xxx.c
This patch has removed a unbalanced #endif from ohci-au1xxx.c .
Please apply before 2.6.18 release.

Error message was:
In file included from drivers/usb/host/ohci-hcd.c:909:
drivers/usb/host/ohci-au1xxx.c:113:2: #endif without #if

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-11 14:06:06 -07:00
David Kuehling b41ee5d622 USB: unusual_devs entry for A-VOX WSX-300ER MP3 player
This patch (as763) adds an unusual_devs entry for the A-VOX WSX-300ER MP3
player.

From: David Kuehling <dvdkhlng@gmx.de>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-11 14:06:05 -07:00
Adrian Bunk f287caee80 Input: hid - #if 0 the no longer used hid_find_field_by_usage()
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-08-04 23:00:02 -04:00
Dmitry Torokhov 2ffc1ccad8 Input: ati_remote - use msec instead of jiffies
By using milliseconds instead of jiffies to calculate acceleration
factor we make the code immune to changes in HZ.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-08-04 22:53:37 -04:00
Dmitry Torokhov c3c38fbd0c Input: ati_remote - add missing input_sync()
When emulating button toggle drivers need to send input_sync()
between 'down' and 'up' events, otherwise some users might miss
keypress because device's state is only considered finalized
after EV_SYN/SYN_REPORT is received.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-08-04 22:53:24 -04:00
Dmitry Torokhov c605b67914 Input: ati_remote - relax permissions sysfs module parameters
Allow changing debug and channel_mask parameters on the fly.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-08-04 22:53:15 -04:00
Edwin Huffstutler c669869710 Input: ati_remote - make filter time a module parameter
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-08-04 22:53:02 -04:00
Dmitry Torokhov d932cb7e63 Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus 2006-08-04 22:50:27 -04:00
Greg Kroah-Hartman cae74b30dd Revert "[PATCH] USB: move usb_device_class class devices to be real devices"
This reverts c182274ffe commit because it
required a newer version of udev to work properly than what is currently
documented in Documentation/Changes.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-02 16:52:10 -07:00
Greg Kroah-Hartman 27fb4f0a7f Revert "[PATCH] USB: convert usb class devices to real devices"
This reverts bd00949647 commit because it
required a newer version of udev to work properly than what is currently
documented in Documentation/Changes.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-02 16:49:37 -07:00
Alan Stern f443ddf105 USB: UHCI: Don't test the Short Packet Detect bit
Apparently some UHCI controllers change the value of the Short Packet
Detect (SPD) bit in the TD status word -- presumably when they receive a
short packet.  This patch (as759) changes uhci-hcd to avoid assuming
that the bit is unchanged; in fact, the driver no longer looks at SPD at
all.

This fixes the second problem reported in Bugzilla #6752.


Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-02 16:41:42 -07:00
Alan Stern de1caa4751 USB: unusual_devs entry for Nokia 3250
Here is another unusual_devs entry (as760) for another Nokia device,
this time the 3250.

From: Mario Rettig <mariorettig@web.de>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-02 16:41:42 -07:00
Alan Stern b4dbda1a22 USB: dummy-hcd: disable interrupts during req->complete
This patch (as756) fixes a bug in dummy-hcd found by the lockdep
checker.  In one of the code paths, the driver did not disable
interrupts before calling a request completion routine.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-02 16:41:42 -07:00
Adrian Bunk be0c8015a2 USB: fix the USB_GADGET_DUMMY_HCD dependencies
If USB=m, USB_GADGET=y, the option USB_GADGET_DUMMY_HCD mustn't be 
offered since selecting it results in a compile error.

This patch fixes kernel Bugzilla #6534 reported by Toralf Förster.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-02 16:41:42 -07:00
Marko Macek 168ffc4446 USB: ati_remote.c: autorepeat fix
When HZ is set to 250 (new default) or 100, the time span during which
repeated events from the device are ignored could be too small due to
ms->jiffies rounding.  This causes the auto repeat to kick in early making
it impossible for the user to generate individual press/release events. 
Increate the timeout to compensate.

Signed-off-by: Marko Macek <Marko.Macek@gmx.net>
Cc: Dmitry Torokhov <dtor_core@ameritech.net>
Cc: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-02 16:41:42 -07:00
Peter Chubb 23219c1348 USB: Patch for rtl8150 to fix unplug problems
The RTL8150 driver currently crashes the kernel if the USB lead is unplugged
while the device is active.  The attached patch adds error handling to
tell the network layer that the device has gone away when the device is
unplugged.  With this patch, the device can be plugged and unplugged
to one's hearts' content, without crashing anything.

Oh, I've also added rudimentary suspend and resume methods.

Signed-off-by: Peter Chubb <peter@gelato.unsw.edu.au>
Acked-by: Petko Manolov <petkan@nucleusys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-02 16:41:42 -07:00
Oliver Bock 6ad576bb67 USB: cypress driver comment updates
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-02 16:41:42 -07:00
Phil Dibowitz eda30fdeec USB: unusual_devs device removal
This entry has been a mystery for some time. I had sent this patch as an
RFC a while ago, and now we've had two reports of this not being needed,
so I'm removing it.

In the event there are reports of breakage, we should revert this patch,
but add a US_FL_NEED_OVERRIDE flag.

Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-02 16:41:42 -07:00
Daniel Drake 3c332422f7 usb-storage: Add US_FL_IGNORE_DEVICE flag; ignore ZyXEL G220F
This patch adds a new unusual_devs flag for when usb-storage needs to ignore
a device that it would otherwise claim.

We need to ignore the ZyXEL G220F as it is a virtual CDROM drive which
includes the windows driver for this USB-WLAN adapter. After the windows
driver is installed on a windows system, it converts it into a WLAN adapter
(by ejecting the virtual disc).

The virtual CDROM is of no interest to Linux users. The zd1211rw driver will
automatically perform the eject operation, we just need to ensure that
usb-storage does not claim the device.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-02 16:41:42 -07:00
Kim Oldfield b7aa94b682 USB: New USB ID for Belkin Serial Adapter
Can you add the USB IDs for the Belkin USB Serial adapter (P/N F5U257)
to the pl2303 driver in the Linux Kernel? Are you the appropriate person
to approach for this?

I recently purchased a Belkin USB Serial adapter (P/N F5U257) and found
that it didn't work. After a bit of experimentation I found that it
works with the pl2303 driver once the ID has been added. See attached
patch to fix this. Also attached is the output from lsusb -v just in
case you require any information from there.


From: Kim Oldfield <luv@oldfield.wattle.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-02 16:41:41 -07:00
Dave Platt 274a4bbc9d USB: Additional PID for the ftdi_sio driver
Here's a short patch which adds one PID to the set of devices
supported by the ftdi_sio driver.  The device in question is a
DLP module used as part of a ham radio USB-to-packet adapter.

From: Dave Platt <dplatt@radagast.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-02 16:41:41 -07:00
Norihiko Tomiyama aec0d50b8a USB: adding support for SHARP WS003SH to ipaq.c
This small patch enables a support of "SHARP WS003SH".
"SHARP WS003SH" (usullary called "W-ZERO3") is most polular All-in-one handheld
CellPhone-plus-WindowsMobile5.0 in Japan.

"SHARP WS003SH" has two modes, "Modem" and "ActiveSync".
But, "ActiveSync" mode uses NDIS connection.
Therefore, ipaq.c can only support "Modem" mode.

http://www.sharp.co.jp/ws/ (Japanese Site)
http://greggman.com/edit/editheadlines/2005-12-24.htm

From: Norihiko Tomiyama <norihiko.tomiyama@ctc-g.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-02 16:41:41 -07:00
Li Yang a11570f2a4 USB: Fix Freescale high-speed USB host dependency
The high-speed USB SOC only exists on MPC834x family not MPC83xx family.

Signed-off-by: Li Yang <leoli@freescale.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-02 16:41:41 -07:00
Matthias Urlichs a01c452ee3 USB: Removed 3-port device handler from Option driver
Dead code.

From: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-02 16:41:41 -07:00
Matthias Urlichs 7c1c2f73e0 USB: Drop Sierra Wireless MC8755 from the Option driver
This device is now supported by sierra.c.

From: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-02 16:41:41 -07:00
Matthias Urlichs 31fcbb7338 USB: Let option driver handle Anydata CDMA modems. Remove anydata driver.
Signed-off-by: Jon K Hellan <hellan@acm.org>
Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-02 16:41:41 -07:00
Matthias Urlichs 02b2ac5b03 USB: Option driver: Short driver names were identical
The short driver names were not unique,
which prevented the driver from actually loading.

Also, one of the ioctl pointers was missing.

Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-02 16:41:41 -07:00
Matthias Urlichs b3fdab59b8 USB: Option driver: removed change history and linux/version.h include
Signed-off-by: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-02 16:41:41 -07:00
David Brownell 0365ee0a8f USB: AT91 OHCI updates, mostly power management
OHCI updates for AT91 series processors:

 - Get ready for at91sam926x processors (ARMv5tej not ARMv4t)

 - Suspend/resume support now behaves properly

 - In "standby" mode, OHCI can be a source of system wakeup events
   (remote wakeup, device connect/disconnect, etc)

And minor cleanups.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-02 16:41:41 -07:00
David Brownell 8b2e76687b USB: AT91 UDC updates, mostly power management
UDC updates for AT91 series processors:

 - Get ready for at91sam926x processors (ARMv5tej not ARMv4t)

 - Suspend/resume support now behaves properly

 - In "standby" mode, UDC can be a source of system wakeup events
   (host resume, device connect/disconnect, etc)

 - Fix IRQ storming issues, seemingly related to clock disabling
   changes that went in a while back

And minor cleanups, especially whitespace.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Victor  <andrew@sanpeople.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-02 16:41:41 -07:00
Anssi Hannula bb3caf7f43 Input: add force feedback driver for PSX-style Zeroplus devices
Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-07-19 01:44:17 -04:00
Anssi Hannula dc76c91214 Input: use new FF interface in the HID force feedback drivers
Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-07-19 01:40:55 -04:00
Anssi Hannula 224ee88fe3 Input: add force feedback driver for PID devices
This replaces the older PID driver which was never completed.

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-07-19 01:40:47 -04:00
Anssi Hannula 806d41b756 Input: move fixp-arith.h to drivers/input
Move fixp-arith.h from drivers/usb/input to drivers/input, as the part of
force feedback support that requires trigonometric functions is being moved
there.

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-07-19 01:40:14 -04:00
Dmitry Torokhov 826d598242 Input: hiddev - use standard list implementation
Fixes Coverity #id 303

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-07-19 01:09:10 -04:00
Dmitry Torokhov cb78623517 Input: HID - fix potential out-of-bound array access
Fixes Coverity #id 978

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-07-15 01:17:54 -04:00
Greg Kroah-Hartman a969888ce9 [PATCH] USB: move usb-serial.h to include/linux/usb/
USB serial outside of the kernel tree can not build properly due to
usb-serial.h being buried down in the source tree.  This patch moves the
location of the file to include/linux/usb and fixes up all of the usb
serial drivers to handle the move properly.

Cc: Sergei Organov <osv@javad.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:25 -07:00
Luiz Fernando N. Capitulino 166ffccfd4 [PATCH] USB: Anydata: Fixes wrong URB callback.
Anydata is using usb_serial_generic_write_bulk_callback() for its
read URB, but it should use usb_serial_generic_read_bulk_callback()
instead (it's a read URB, isn't it?).

 Reported by Jon K Hellan <hellan@acm.org>.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:25 -07:00
David Brownell a353678d31 [PATCH] USB: gadget section fixups
Recent section changes broke gadget builds on some platforms.  This patch
is the best fix that's available until better section markings exist:

 - There's a lot of cleanup code that gets used in both init and exit paths;
   stop marking it as "__exit".

   (Best fix for this would be an "__init_or_exit" section marking, putting
   the cleanup in __init when __exit sections get discarded else in __exit.)

 - Stop marking the use-once probe routines as "__init" since references
   to those routines are not allowed from driver structures.  They're now
   marked "__devinit", which in practice is a net lose.

   (Best fix for this is likely to separate such use-once probe routines
   from the driver structure ... but in general, all busses that aren't
   hotpluggable will be forced to waste memory for all probe-only code.)

In general these broken section rules waste an average of two to four kBytes
per driver of code bloat ... because none of the relevant code can ever be
reused after module initialization.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:24 -07:00
Phil Dibowitz 5501a48c15 [PATCH] USB: another unusual device
Please add the attached device to unusual_devs.h.

Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:24 -07:00
Colin Leroy e1979fef34 [PATCH] USB: Add one VID/PID to ftdi_sio
This patch adds the Testo USB interface to the list of devices
recognized by the ftdi_sio module. This device is based on a FT232BL
chip, and is used as an interface to get data from digital sensors
(thermometer, etc). See http://www.testo.com/

Signed-off-by: Colin Leroy <colin@colino.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:24 -07:00
Lars Jacob 7e3bd120e5 [PATCH] USB: unusual_devs entry for Sony DSC-H5
This patch (as749) extends the unusual_devs entry for the Sony DSC-T1 and
T5 to cover the H5 as well.

From: Lars Jacob <jacob.lars@googlemail.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:24 -07:00
Alan Stern 57b01b1e39 [PATCH] USB: unusual_devs entry for Nokia E61
This patch (as748) adds an unusual_devs entry for the Nokia E61 mobile
phone.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:24 -07:00
Alan Stern 9a01355e17 [PATCH] USB: unusual_devs entry for Nokia N91
This patch (as745) adds an unusual_devs entry for the Nokia N91, just like
the entry for the N80 added a couple of weeks ago.  Apparently Nokia isn't
using very good firmware these days...

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:24 -07:00
Dan Streetman b6c2799dec [PATCH] USB: add ZyXEL vendor/product ID to rtl8150 driver
I just got a "ZyXEL Prestige USB Adapter" that is actually RTL8150
adapter.  Here is the relevant /proc/bus/usb/devices output (after
adding the vendor/product IDs to the driver):

T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#=119 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0586 ProdID=401a Rev= 1.00
S:  Manufacturer=ZyXEL
S:  Product=Prestige USB Adapter
S:  SerialNumber=1027
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=120mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=ff Driver=rtl8150
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=1ms

This patch adds the ZyXEL vendor ID to the rtl8150.c driver.  The
device has absolutely no identifying marks on the outside for model
type, just a serial number, and I can't find anything on ZyXEL's
website, so I called the product ID PRODUCT_ID_PRESTIGE to match the
product string.

Signed-off-by: Dan Streetman <ddstreet@ieee.org>
Acked-by: <petkan@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:24 -07:00
Matthias Urlichs e37de9e0d6 [PATCH] USB: Option driver: new product ID
Yet another "same name, somewhat different hardware" product.

Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:23 -07:00
Navaho Gunleg b857c651e7 [PATCH] USB: add support for WiseGroup., Ltd SmartJoy Dual PLUS Adapter
This patch is to get the WiseGroup.,Ltd SmartJoy Dual Plus PS2-to-USB
Adapter [0x6677:0x8802] correctly detected. It sets the NOGET and
MULTI_INPUT quirks to make 2 joystick nodes appear in stead of only
one.

(As of yet, only confirmed working by myself.)

Signed-off-by: Navaho Gunleg <navahogunleg@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:23 -07:00
Bart Oldeman b2f1b0d464 [PATCH] USB: ipw.c driver fix
The below patch fixes the ipw module in kernel 2.6.17 for me; without
this change it simply does not work at all (all but the first writes are
refused because write_urb_busy is always 1).

This problem was there in 2.6.15 as well, but at that point I used the
(updated) ipw.c, version 0.4, from
http://www.neology.co.za/products/opensource/ipwireless/ which no longer
compiles with 2.6.17. It can be made to after a few changes but
obviously it's easier if the built-in ipw driver works instead of having
to download one from the neology site.

From: Bart Oldeman <bartoldeman@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:23 -07:00
Michal Piotrowski 49e523b907 [PATCH] USB: remove devfs information from Kconfig
Devfs is gone. We can remove that information.

Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:23 -07:00
Christoph Lameter 028d2a39d1 [PATCH] USB: remove empty destructor from drivers/usb/mon/mon_text.c
Remove destructor and call kmem_cache_create with NULL for the destructor.

Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:23 -07:00
Frank Gevaerts b33488eb5c [PATCH] USB: ipaq.c timing parameters
Adds configurable waiting periods to the ipaq connection code. These are
not needed when the pocketpc device is running normally when plugged in,
but they need extra delays if they are physically connected while
rebooting.

There are two parameters :

* initial_wait : this is the delay before the driver attemts to start the
  connection. This is needed because the pocktpc device takes much
  longer to boot if the driver starts sending control packets too soon.

* connect_retries : this is the number of times the control urb is
  retried before finally giving up. The patch also adds a 1 second delay
  between retries.

I'm not sure if the cases where this patch is useful are general enough
to include this in the kernel.

Signed-off-by: Frank Gevaerts <frank.gevaerts@fks.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:23 -07:00
Frank Gevaerts b512504e56 [PATCH] USB: ipaq.c bugfixes
This patch fixes several problems in the ipaq.c driver with connecting
and disconnecting pocketpc devices:

* The read urb stayed active if the connect failed, causing nullpointer
  dereferences later on.

* If a write failed, the driver continued as if nothing happened. Now it
  handles that case the same way as other usb serial devices (fix by
  Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>)

Signed-off-by: Frank Gevaerts <frank.gevaerts@fks.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:23 -07:00
David Brownell b972b68c39 [PATCH] USB: ehci: fix bogus alteration of a local variable
In a rare and all-but-unused path, the EHCI driver could reuse a variable
in a way that'd make trouble.  Specifically, if the first root hub port
gets an overcurrent event (rare) during a remote wakeup scenario (all but
unused in today's Linux, except for folk working with suspend-to-RAM and
similar sleep states), that would look like a fatal error which would shut
down the controller.  Fix by not reusing that variable.

Spotted by Per Hallsmark <saxofon@musiker.nu>
Fixes http://bugzilla.kernel.org/show_bug.cgi?id=6661

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:23 -07:00
Kevin Lloyd 69de51fdda [PATCH] USB: add driver for non-composite Sierra Wireless devices
This patch creates a new driver, sierra.c, that supports the new
non-composite Sierra Wireless WWAN devices. The older Sierra
Wireless and Airprime devices are supported in airprime.c.

Signed-off-by: Kevin Lloyd  <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:23 -07:00
Eric Sesterhenn 053be305d3 [PATCH] USB: fix pointer dereference in drivers/usb/misc/usblcd
coverity spotted (id #185) that we still use urb, if the allocation
fails in the error path. This patch fixes this by returning directly.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:23 -07:00
Kyle McMartin c1b45f247a [PATCH] USB: Kill compiler warning in quirk_usb_handoff_ohci
Move variables only used on !__hppa__ into that #ifndef section. This
cleans up a compiler warning on parisc. Problem pointed out by
Joel Soete.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:22 -07:00
Ian Abbott 224654004c [PATCH] USB serial ftdi_sio: Prevent userspace DoS
This patch limits the amount of outstanding 'write' data that can be
queued up for the ftdi_sio driver, to prevent userspace DoS attacks (or
simple accidents) that use up all the system memory by writing lots of
data to the serial port.

The original patch was by Guillaume Autran, who in turn based it on the
same mechanism implemented in the 'visor' driver.  I (Ian Abbott)
re-targeted the patch to the latest sources, fixed a couple of errors,
renamed his new structure members, and updated the implementations of
the 'write_room' and 'chars_in_buffer' methods to take account of the
number of outstanding 'write' bytes.  It seems to work fine, though at
low baud rates it is still possible to queue up an amount of data that
takes an age to shift (a job for another day!).

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:22 -07:00
Ian Abbott 00d6058ac9 [PATCH] USB serial visor: fix race in open/close
The anti user-DoS mechanism in the USB serial 'visor' driver can fail in
the following way:

visor_open: priv->outstanding_urbs = 0
visor_write: ++priv->outstanding_urbs
visor_close:
visor_open: priv->outstanding_urbs = 0
visor_write_bulk_callback: --priv->outstanding_urbs

So priv->outstanding_urbs ends up as (unsigned long)(-1).  Not good!

I haven't seen this happen with the visor driver as I don't have the
hardware, but I have seen it while testing a patch to implement the same
functionality in the ftdi_sio driver (patch not yet submitted).

The fix is pretty simple: don't reinitialize outstanding_urbs in
visor_open.  (Again, I haven't tested the fix in visor, but I have
tested it in ftdi_sio.)

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:22 -07:00
Phil Dibowitz 5650b4dd14 [PATCH] USB Storage: Uname in PR/SC Unneeded message
This patch adds the kernel version to the usb-storage Protocol/SubClass
unneeded message in order to help us troubleshoot such problems.

Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:22 -07:00
Phil Dibowitz 883d989a7e [PATCH] USB Storage: US_FL_MAX_SECTORS_64 flag
This patch adds a US_FL_MAX_SECTORS_64 and removes the Genesys special-cases
for this that were in scsiglue.c. It also adds the flag to other devices
reported to need it.

Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:22 -07:00
Alan Stern 2030794946 [PATCH] usbcore: fixes for hub_port_resume
This patch (as731) makes a couple of small fixes to the hub_port_resume
routine:

	Don't return status >= 0 when an error occurs;

	Clear the port-change-suspend status indicator after
	resuming a device.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:22 -07:00
Ernis d8840d6021 [PATCH] USB: unusual_devs entry for Samsung MP3 player
This patch (as730) contains an unusual_devs entry for a Samsung MP3
device.

From: Ernis <ernisv@gmail.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:22 -07:00
Davide Perini 0ddc063471 [PATCH] usb-storage: unusual_devs entry for Motorola RAZR V3x
This patch (as725) adds an unusual_devs entry for the Motorola RAZR V3x.

From: Davide Perini <perini.davide@dpsoftware.org>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:22 -07:00
Alan Stern b40b7a905c [PATCH] USB hub: don't return status > 0 from resume
finish_device_resume() in the hub driver isn't careful always to return
a negative code in all the error pathways.  It also doesn't return 0 in
all the success pathways.  This patch (as724) fixes the behavior.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:22 -07:00
Alan Stern eecd11ed47 [PATCH] usb-storage: fix race between reset and disconnect
My recent patch converting usb-storage to use
usb_reset_composite_device() added a bug, a race between reset and
disconnect.  It was necessary to drop the private lock while executing a
reset, and if a disconnect occurs at that time it will cause a crash.

This patch (as722) fixes the problem by explicitly checking for an early
termination after executing each command.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:21 -07:00
Oliver Neukum 3dd2ae81f7 [PATCH] USB: update for acm in quirks and debug
this adds
better debugging output &
an update of the quirk list
to the acm driver

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:21 -07:00
Oliver Bock 9189bfc2df [PATCH] USB: rename Cypress CY7C63xxx driver to proper name and fix up some tiny things
This is a new driver for the Cypress CY7C63xxx mirco controller series.
It currently supports the pre-programmed CYC63001A-PC by AK Modul-Bus
GmbH.  It's based on a kernel 2.4 driver (cyport) by Marcus Maul which I
ported to kernel 2.6 using sysfs. I intend to support more controllers
of this family (and more features) as soon as I get hold of the required
IDs etc. Please see the source code's header for more information.

Signed-off-by: Oliver Bock <o.bock@fh-wolfenbuettel.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:21 -07:00
Zoran Marceta 58a5b0a634 [PATCH] usbfs: use the correct signal number for disconnection
usbfs stores the wrong signal number in the siginfo structure used for
notifying user programs about device disconnect.  This patch (as726)
fixes it.

From: Zoran Marceta <Zoran.Marceta@micronasnit.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:21 -07:00
Matthew Meno 3b92847425 [PATCH] USB: Support for Susteen Datapilot Universal-2 cable in pl2303
The Susteen Datapilot cable
(http://www.susteen.com/productdetail/71/producthl/Notempty) has an
internal pl2303 to communicate with a set of dummy connector-ends that
connect to a variety of cell phones. I've found that it works right out
of the box by simply adding the product/vendor id to the pl2303 driver.

Signed-off-by: Matt Meno <mmeno@idealcorp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:21 -07:00
Pete Zaitcev bd97c4f035 [PATCH] USB: fix visor leaks
This patch fixes blatant leaks in visor driver and makes it report
mode sensible things in ->write_room (this is only needed if your visor
is a terminal though).

It is made to fit into 80 columns with a temporary variable.
Might even save a few instructions...

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:21 -07:00
Pete Zaitcev 34f8e76172 [PATCH] USB: fix usb-serial leaks, oopses on disconnect
This fix addresses two issues:
- Unattached port structures were not freed
- My initial fix for crash when eventd runs a work in a freed port
  did not go far enough

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:21 -07:00
David Miller 92164c5dd1 [PATCH] USB: OHCI hub code unaligned access
I noticed this while debugging something unrelated on
sparc64.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:21 -07:00
Christophe Mariac c0f8d56197 [PATCH] USB: new device ids for ftdi_sio driver
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:21 -07:00
D. Peter Siddons 48437486c6 [PATCH] USB: new device id for Thorlabs motor driver
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:20 -07:00
Peter Moulder 3d86149472 [PATCH] USB: Addition of vendor/product id pair for pl2303 driver
Text from the back of the box, for your information/amusement:

 USB DATA CABLE
   FOR K700 Series

 The USB Cable is an ideal link between your mobile phone and PC. Employing
 the user-friendiy [sic] USB standard,its capacity for rapid data transfer enables functions
 such as synchronization of phone book and calendar,as well as Internet browsing via
 a modem-enabled phone.Autual [sic] connection speed is dependent on phone capacity.

 MADE IN CHINA

From: Peter Moulder <Peter.Moulder@infotech.monash.edu.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:20 -07:00
Lennert Buytenhek a5b7474a03 [PATCH] USB: ohci bits for the cirrus ep93xx
This patch adds OHCI glue bits for the USB host interface in the
Cirrus ep93xx (arm920t) CPU.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:20 -07:00
Daniel Mack d14feb5ee4 [PATCH] USB: au1200: EHCI and OHCI fixes
I received an DBAU1200 eval kit from AMD a few days ago and tried to
enable the USB2 port, but the current linux-2.6 GIT did not even
compile with CONFIG_SOC_1200, CONFIG_SOC_AU1X00, CONFIG_USB_EHCI and
CONFIG_USB_OHCI set.
Furthermore, in ehci-hcd.c, platform_driver_register() was called with
an improper argument of type 'struct device_driver *' which of course
ended up in a kernel oops. How could that ever have worked on your
machines?

Anyway, here's a trivial patch that makes the USB subsystem working
on my board for both OHCI and EHCI.
It also removes the /* FIXME use "struct platform_driver" */.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:20 -07:00
Domen Puncer 18577a6184 [PATCH] USB: au1xxx: compile fixes for OHCI for au1200
Compile fixes for au1200 ohci.

First part looks a bit hackish... but it works for me.

Signed-off-by: Domen Puncer <domen.puncer@ultra.si>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:20 -07:00
Alan Stern d6b7d3b620 [PATCH] usb-storage: wait for URB to complete
We all failed to notice that Franck's recent update to usb-storage allowed
an URB to complete after its context data was no longer valid.  This patch
(as746) makes the driver wait for the URB to complete whenever there's a
timeout.

Although timeouts in usb-storage are relatively uncommon, they do occur.
Without this patch the code in 2.6.18-rc1 will fault within an interrupt
handler, which is not nice at all.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-10 13:24:21 -07:00
Linus Torvalds 060ec6f2fb Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] Fix lh7a40x_udc.c
  [ARM] Fix warning in consistent.c
  [ARM] Fix warnings in arch/arm/kernel/setup.c
  [ARM] Fix ecard.c resource warnings.
  [ARM] Fix ISA IRQ resources
  [ARM] Fix bad asm instruction in proc-arm925.S
  [ARM] More missing proc-macros.S includes
  [ARM] 3708/2: fix SMP build after section ioremap changes
2006-07-03 21:30:03 -07:00
Arjan van de Ven 8e7795ef6b [PATCH] lockdep: annotate USBFS
In usbfs's fs_remove_file() function, the aim is to remove a file or
directory from usbfs. This is done by first taking the i_mutex of the
parent directory of this file/dir via
  mutex_lock(&parent->d_inode->i_mutex);
and then to call either usbfs_rmdir() for a directory or usbfs_unlink()
for a file. Both these functions then take the i_mutex for the
to-be-removed object themselves:
  mutex_lock(&inode->i_mutex);

This is a classical parent->child locking order relationship that the VFS uses
all over the place; the VFS locking rule is "you need to take the parent
first".  This patch annotates the usbfs code to make this explicit and thus
informs the lockdep code that those two locks indeed have this relationship.

The rules for unlink that we already use in the VFS for unlink are to use
I_MUTEX_PARENT for the parent directory, and a normal mutex for the file
itself; this patch follows that convention.

Has no effect on non-lockdep kernels.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-03 15:27:08 -07:00
Ingo Molnar f2eace23e9 [PATCH] lockdep: annotate i_mutex
Teach special (recursive) locking code to the lock validator.  Has no effect
on non-lockdep kernels.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-03 15:27:06 -07:00
Russell King 0f1482fdd7 [ARM] Fix lh7a40x_udc.c
In 3ae5eaec1d, I broke this driver
by missing a comma.  Replace the missing comma.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-07-03 15:32:47 +01:00
Linus Torvalds a8c4c20dfa Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (44 commits)
  [ARM] 3541/2: workaround for PXA27x erratum E7
  [ARM] nommu: provide a way for correct control register value selection
  [ARM] 3705/1: add supersection support to ioremap()
  [ARM] 3707/1: iwmmxt: use the generic thread notifier infrastructure
  [ARM] 3706/2: ep93xx: add cirrus logic edb9315a support
  [ARM] 3704/1: format IOP Kconfig with tabs, create more consistency
  [ARM] 3703/1: Add help description for ARCH_EP80219
  [ARM] 3678/1: MMC: Make OMAP MMC work
  [ARM] 3677/1: OMAP: Update H2 defconfig
  [ARM] 3676/1: ARM: OMAP: Fix dmtimers and timer32k to compile on OMAP1
  [ARM] Add section support to ioremap
  [ARM] Fix sa11x0 SDRAM selection
  [ARM] Set bit 4 on section mappings correctly depending on CPU
  [ARM] 3666/1: TRIZEPS4 [1/5] core
  ARM: OMAP: Multiplexing for 24xx GPMC wait pin monitoring
  ARM: OMAP: Fix SRAM to use MT_MEMORY instead of MT_DEVICE
  ARM: OMAP: Update dmtimers
  ARM: OMAP: Make clock variables static
  ARM: OMAP: Fix GPMC compilation when DEBUG is defined
  ARM: OMAP: Mux updates for external DMA and GPIO
  ...
2006-07-02 15:04:12 -07:00
Thomas Gleixner d54b5caa83 [PATCH] irq-flags: usb: Use the new IRQF_ constants
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-02 13:58:53 -07:00
Linus Torvalds 22a3e233ca Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial:
  Remove obsolete #include <linux/config.h>
  remove obsolete swsusp_encrypt
  arch/arm26/Kconfig typos
  Documentation/IPMI typos
  Kconfig: Typos in net/sched/Kconfig
  v9fs: do not include linux/version.h
  Documentation/DocBook/mtdnand.tmpl: typo fixes
  typo fixes: specfic -> specific
  typo fixes in Documentation/networking/pktgen.txt
  typo fixes: occuring -> occurring
  typo fixes: infomation -> information
  typo fixes: disadvantadge -> disadvantage
  typo fixes: aquire -> acquire
  typo fixes: mecanism -> mechanism
  typo fixes: bandwith -> bandwidth
  fix a typo in the RTC_CLASS help text
  smb is no longer maintained

Manually merged trivial conflict in arch/um/kernel/vmlinux.lds.S
2006-06-30 15:39:30 -07:00
David Quigley 7a01955f99 [PATCH] SELinux: update USB code with new kill_proc_info_as_uid
This patch updates the USB core to save and pass the sending task secid when
sending signals upon AIO completion so that proper security checking can be
applied by security modules.

Signed-off-by: David Quigley <dpquigl@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-30 11:25:37 -07:00
Jörn Engel 6ab3d5624e Remove obsolete #include <linux/config.h>
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-30 19:25:36 +02:00
Milan Svoboda bf7e851108 [PATCH] usb gadget: fixup pxa2xx_udc to include asm/arch/udc.h again
This fixes pxa2xx_udc.c to include asm/arch/udc.h again to fix current
build breakage.

Signed-off-by: Milan Svoboda <msvoboda@ra.rockwell.com>
[ forwarded by David Brownell <david-b@pacbell.net> ]
[ fixed to apply properly by Linus ]
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-29 14:27:22 -07:00
Linus Torvalds 602cada851 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/devfs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/devfs-2.6: (22 commits)
  [PATCH] devfs: Remove it from the feature_removal.txt file
  [PATCH] devfs: Last little devfs cleanups throughout the kernel tree.
  [PATCH] devfs: Rename TTY_DRIVER_NO_DEVFS to TTY_DRIVER_DYNAMIC_DEV
  [PATCH] devfs: Remove the tty_driver devfs_name field as it's no longer needed
  [PATCH] devfs: Remove the line_driver devfs_name field as it's no longer needed
  [PATCH] devfs: Remove the videodevice devfs_name field as it's no longer needed
  [PATCH] devfs: Remove the gendisk devfs_name field as it's no longer needed
  [PATCH] devfs: Remove the miscdevice devfs_name field as it's no longer needed
  [PATCH] devfs: Remove the devfs_fs_kernel.h file from the tree
  [PATCH] devfs: Remove devfs_remove() function from the kernel tree
  [PATCH] devfs: Remove devfs_mk_cdev() function from the kernel tree
  [PATCH] devfs: Remove devfs_mk_bdev() function from the kernel tree
  [PATCH] devfs: Remove devfs_mk_symlink() function from the kernel tree
  [PATCH] devfs: Remove devfs_mk_dir() function from the kernel tree
  [PATCH] devfs: Remove devfs_*_tape() functions from the kernel tree
  [PATCH] devfs: Remove devfs support from the sound subsystem
  [PATCH] devfs: Remove devfs support from the ide subsystem.
  [PATCH] devfs: Remove devfs support from the serial subsystem
  [PATCH] devfs: Remove devfs from the init code
  [PATCH] devfs: Remove devfs from the partition code
  ...
2006-06-29 14:19:21 -07:00
Linus Torvalds 1903ac54f8 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6:
  [PATCH] i386: export memory more than 4G through /proc/iomem
  [PATCH] 64bit Resource: finally enable 64bit resource sizes
  [PATCH] 64bit Resource: convert a few remaining drivers to use resource_size_t where needed
  [PATCH] 64bit resource: change pnp core to use resource_size_t
  [PATCH] 64bit resource: change pci core and arch code to use resource_size_t
  [PATCH] 64bit resource: change resource core to use resource_size_t
  [PATCH] 64bit resource: introduce resource_size_t for the start and end of struct resource
  [PATCH] 64bit resource: fix up printks for resources in misc drivers
  [PATCH] 64bit resource: fix up printks for resources in arch and core code
  [PATCH] 64bit resource: fix up printks for resources in pcmcia drivers
  [PATCH] 64bit resource: fix up printks for resources in video drivers
  [PATCH] 64bit resource: fix up printks for resources in ide drivers
  [PATCH] 64bit resource: fix up printks for resources in mtd drivers
  [PATCH] 64bit resource: fix up printks for resources in pci core and hotplug drivers
  [PATCH] 64bit resource: fix up printks for resources in networks drivers
  [PATCH] 64bit resource: fix up printks for resources in sound drivers
  [PATCH] 64bit resource: C99 changes for struct resource declarations

Fixed up trivial conflict in drivers/ide/pci/cmd64x.c (the printk that
was changed by the 64-bit resources had been deleted in the meantime ;)
2006-06-29 10:49:17 -07:00
Russell King a144a5633c Merge omap tree
* master.kernel.org:/pub/scm/linux/kernel/git/tmlind/linux-omap-upstream: (26 commits)
  ARM: OMAP: Multiplexing for 24xx GPMC wait pin monitoring
  ARM: OMAP: Fix SRAM to use MT_MEMORY instead of MT_DEVICE
  ARM: OMAP: Update dmtimers
  ARM: OMAP: Make clock variables static
  ARM: OMAP: Fix GPMC compilation when DEBUG is defined
  ARM: OMAP: Mux updates for external DMA and GPIO
  ARM: OMAP: Add OMAP_TAG_CAMERA_SENSOR
  ARM: OMAP: Add initial 24xx suspend support
  ARM: OMAP: Update cpufreq support for 24xx
  ARM: OMAP: Add GPMC support for OMAP2
  ARM: OMAP: Fix DMA channel irq handling for omap24xx
  ARM: OMAP: OMAP2 DMA burst support
  ARM: OMAP: Fix 32 kHz timer and modify GP timer to use GPT1
  ARM: OMAP: Port dmtimers to OMAP2 and implement PWM support
  ARM: OMAP: Correct two bugs in arch/arm/mach-omap2/clock.c
  ARM: OMAP: Register the 24xx McSPI device
  ARM: OMAP: Add bitbank SPI driver for Innovator 1510 touchscreen
  ARM: OMAP: Aic23 alsa platform driver code for board-innovator
  ARM: OMAP: Fix GPIO IRQ mask handling
  ARM: OMAP: DMA transfer parameter configuration fix
  ...
2006-06-29 16:23:47 +01:00
Paul Fulghum 817d6d3bce [PATCH] remove TTY_DONT_FLIP
Remove TTY_DONT_FLIP tty flag.  This flag was introduced in 2.1.X kernels
to prevent the N_TTY line discipline functions read_chan() and
n_tty_receive_buf() from running at the same time.  2.2.15 introduced
tty->read_lock to protect access to the N_TTY read buffer, which is the
only state requiring protection between these two functions.

The current TTY_DONT_FLIP implementation is broken for SMP, and is not
universally honored by drivers that send data directly to the line
discipline receive_buf function.

Because TTY_DONT_FLIP is not necessary, is broken in implementation, and is
not universally honored, it is removed.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-28 14:59:05 -07:00
Greg Kroah-Hartman 2427ddd8fa [PATCH] 64bit Resource: convert a few remaining drivers to use resource_size_t where needed
Based on a patch series originally from Vivek Goyal <vgoyal@in.ibm.com>

Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-27 09:24:00 -07:00
Tony Lindgren 7ff879dbcd ARM: OMAP: Fix DMA channel irq handling for omap24xx
- DMA CSR register is cleared by reading on omap1, but on
  omap2 it is cleard by writing to it.

- DMA TOUT interrupt does not exist on omap24xx, rename it

- Add SECURE and MISALIGNED errors by default for omap24xx

- Add defines for external DMA request lines

Signed-off-by: Tony Lindgren <tony@atomide.com>
2006-06-26 16:16:15 -07:00
Linus Torvalds da206c9e68 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial:
  typo fixes
  Clean up 'inline is not at beginning' warnings for usb storage
  Storage class should be first
  i386: Trivial typo fixes
  ixj: make ixj_set_tone_off() static
  spelling fixes
  fix paniced->panicked typos
  Spelling fixes for Documentation/atomic_ops.txt
  move acknowledgment for Mark Adler to CREDITS
  remove the bouncing email address of David Campbell
2006-06-26 13:33:14 -07:00
Greg Kroah-Hartman 331b831983 [PATCH] devfs: Rename TTY_DRIVER_NO_DEVFS to TTY_DRIVER_DYNAMIC_DEV
I've always found this flag confusing.  Now that devfs is no longer around, it
has been renamed, and the documentation for when this flag should be used has
been updated.

Also fixes all drivers that use this flag.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-26 12:25:09 -07:00
Greg Kroah-Hartman f4eaa37017 [PATCH] devfs: Remove the tty_driver devfs_name field as it's no longer needed
Also fixes all drivers that set this field.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-26 12:25:09 -07:00
Linus Torvalds cdf4f383a4 Merge master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
* master.kernel.org:/pub/scm/linux/kernel/git/dtor/input:
  Input: iforce - remove some pointless casts
  Input: psmouse - add support for Intellimouse 4.0
  Input: atkbd - fix HANGEUL/HANJA keys
  Input: fix misspelling of Hangeul key
  Input: via-pmu - add input device support
  Input: rearrange exports
  Input: fix formatting to better follow CodingStyle
  Input: reset name, phys and uniq when unregistering
  Input: return correct size when reading modalias attribute
  Input: change my e-mail address in MAINTAINERS file
  Input: fix potential overflows in driver/input/keyboard
  Input: fix potential overflows in driver/input/touchscreen
  Input: fix potential overflows in driver/input/joystick
  Input: fix potential overflows in driver/input/mouse
  Input: fix accuracy of fixp-arith.h
  Input: iforce - use ENOSPC instead of ENOMEM
  Input: constify drivers/char/keyboard.c
2006-06-26 11:01:58 -07:00
Jesper Juhl f274afc993 Clean up 'inline is not at beginning' warnings for usb storage
Usually we don't care much about 'gcc -W' warnings, but some of us do build
kernels that way to look for problems, and then the fewer warnings we have
to wade through the better. Especially when they are very easy and
non-intrusive to clean up. Which is the case for the following warnings
spewed by drivers/usb/storage/usb.h :

  drivers/usb/storage/usb.h:163: warning: `inline' is not at beginning of
+declaration
  drivers/usb/storage/usb.h:166: warning: `inline' is not at beginning of
+declaration

There's also some precedence for cleaning up these warnings. I've had
a few patches merged in the past that remove exactly this class of
warnings.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-26 19:01:01 +02:00
Akinobu Mita 179e09172a [PATCH] drivers: use list_move()
This patch converts the combination of list_del(A) and list_add(A, B) to
list_move(A, B) under drivers/.

Acked-by: Corey Minyard <minyard@mvista.com>
Cc: Ben Collins <bcollins@debian.org>
Acked-by: Roland Dreier <rolandd@cisco.com>
Cc: Alasdair Kergon <dm-devel@redhat.com>
Cc: Gerd Knorr <kraxel@bytesex.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Frank Pavlic <fpavlic@de.ibm.com>
Acked-by: Matthew Wilcox <matthew@wil.cx>
Cc: Andrew Vasquez <linux-driver@qlogic.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Greg Kroah-Hartman <greg@kroah.com>
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:18 -07:00