Commit Graph

39780 Commits (deb8ee43a23d48116cb23eb8dd1de2348efb1e80)

Author SHA1 Message Date
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
Stephen Hemminger 4e4bc305e1 sky2: GMAC pause frame
This reverts earlier change that attempted to fix flow control.
Device needs to discard pause frames, otherwise it hangs after a while.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-10-17 10:24:25 -07:00
Stephen Hemminger a052b52f4b sky2: accept multicast pause frames
When using flow control, the PHY needs to accept multicast pause frames.
Without this fix, these frames were getting discarded by the PHY before
doing any flow control.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-10-17 10:24:23 -07:00
Stephen Hemminger 52c89cac67 sky2: version 1.9
Mark version, this has been a lot of patches.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-10-17 10:24:18 -07:00
Stephen Hemminger b6d7773462 sky2: no message on rx fifo overflow
Under high load it is possible to make the receiver FIFO get overloaded.
The driver/hardware recover properly, so there is no reason to fill the log
with lots of extra messages, just update counter.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-10-17 10:24:16 -07:00
Stephen Hemminger 16ad91e1c6 sky2: flow control setting fixes
The result of flow control negotiation should not limit the next
negotiatition. If board is plugged into an old half duplex 10Mbit port,
without pause, then replugged into a gigabit port, it should negotiate
what is desired, not inherit that last negotiation.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-10-17 10:24:13 -07:00
Stephen Hemminger 7800fddcd0 sky2: don't reset PHY twice
Don't need to reset PHY twice on startup.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-10-17 10:24:10 -07:00
Stephen Hemminger 7c74ac1c23 sky2: use duplex result bits
The result of duplex negotiation is avaliable in the phy status
register, so use that to simplify code and avoid rereading the PHY.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-10-17 10:24:08 -07:00
Stephen Hemminger 0edea0f54e sky2: advertising register 16 bits
The advertising bits (from ethtool.h) fit in 16 bits.
2006-10-17 10:24:07 -07:00
Stephen Hemminger 709c6e7bb0 sky2: fiber pause bits
The advertisement bits for flow control are located in
different location on fiber (1000baseX)

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-10-17 10:24:04 -07:00
Stephen Hemminger ebc646f681 sky2: phy irq on shutdown
When PHY is turned off on shutdown, it causes the IRQ to get stuck on.
Make sure and disable the IRQ first, and if IRQ occurs when device
is not running, don't access PHY because that will hang.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-10-17 10:23:56 -07:00
Stephen Hemminger e561a83be5 sky2: turn of workaround timer
The workaround timer is not needed in most systems with proper IRQ
routing and by perodically waking up it adds to laptop power consumption.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-10-17 10:20:51 -07:00