1
0
Fork 0
Commit Graph

1666 Commits (a0cf733b333eeeafb7324e2897448006c693c26c)

Author SHA1 Message Date
John Daiker 7ca46b862f USB Gadget file_storage.c: remove unnecessary casts
Went looking through some usb stuff and found some unnecessary casts in
file_storage.c  This is part of the KernelJanitors TODO list.

Signed-off-by: John Daiker <daikerjohn@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:34 -08:00
Johannes Hölzl 52d67f0b5c USB: Bugfix for aircable: Add module and name to usb_serial_driver
While adding the dynamic-id support to usb serial I found a small bug in
the air cable driver:

Adds module and name information to the usb_serial_driver instance
of aircable. So the aircable driver is correctly shown under
/sys/bus/usb-serial/drivers/aircable and has the module link.

Signed-off-by: Johannes Hölzl <johannes.hoelzl@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:34 -08:00
Johannes Hölzl d9b1b78773 USB serial: add driver pointer to all usb-serial drivers
Every usb serial driver should have a pointer to the corresponding usb driver.
So the usb serial core can add a new id not only to the usb serial driver, but
also to the usb driver.

Also the usb drivers of ark3116, mos7720 and mos7840 missed the flag
no_dynamic_id=1. This is added now.

Signed-off-by: Johannes Hölzl <johannes.hoelzl@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:34 -08:00
Greg Kroah-Hartman 93bacefc4c USB serial: add dynamic id support to usb-serial core
Thanks to Johannes Hölzl <johannes.hoelzl@gmx.de> for fixing a few
things and getting it all working properly.

This adds support for dynamic usb ids to the usb serial core.  The file
"new_id" will show up under the usb serial driver, not the usb driver
associated with the usb-serial driver (yeah, it can be a bit confusing
at first glance...)

This patch also modifies the USB core to allow the usb-serial core to
reuse much of the dynamic id logic.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Johannes Hölzl <johannes.hoelzl@gmx.de>
2007-02-07 15:44:33 -08:00
Sylvain Munaut 495a678fc6 ohci: Add support for OHCI controller on the of_platform bus
PPC embedded systems can have a ohci controller builtin. In the
new model, it will end up as a driver on the of_platform bus,
this patches takes care of them.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:33 -08:00
Sylvain Munaut 5e16fabe5d ohci: Rework bus glue integration to allow several at once
The previous model had the module_init & module_exit function in the
bus glue .c files themselves. That's a problem if several glues need
to be selected at once and the driver is built has module. This case
is quite common in embedded system where you want to handle both the
integrated ohci controller and some extra controller on PCI.

The ohci-hcd.c file now provide the module_init & module_exit and
appropriate driver registering/unregistering is done conditionally,
using #ifdefs.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:33 -08:00
Ole Andre Vadla Ravnas ad55d71a3d rndis_host learns ActiveSync basics
Windows Mobile 5 based devices described as supporting "ActiveSync":

 - Speak RNDIS but lack the CDC and union descriptors.  This patch
   updates the cdc ethernet code to fake ACM descriptors we need.

 - Require RNDIS_MSG_QUERY messages to include a buffer of the size the
   response should generate.  This patch updates the rndis host code to
   pass this will-be-ignored data.

The resulting RNDIS host code has been reported to work with several
WM5 based devices.

(Note that a fancier patch is available at synce.sf.net.)


Some bugfixes, affecting not just ActiveSync:
    (a)	when cleaning up after RNDS init fails, scrub the second interface
	just like cdc_ether does, so disconnect won't oops.
    (b)	handle peripherals that use the pad-to-end-of-packet option; some
	devices can't talk to us if that option doesn't work.
    (c)	when choosing configurations, don't forget about an RNDIS config
	just because the RNDIS driver is dynamically linked.

Cleanup, streamlining, bugfixes, Kconfig, and matching hub driver update.
Also for paranoia's sake, refuse to talk to something that looks like a
real modem instead of RNDIS.

Signed-off-by: Ole Andre Vadla Ravnaas <oleavr@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:33 -08:00
David Brownell 11d5489873 USB: ethernet gadget interop with MCCI Windows driver
It turns out that minor tweaks to the "CDC Subset" support in the Ethernet
gadget driver, just updating a config descriptor, let it be automagically
recognized by a Windows driver supported by MCCI.

This patch adds those descriptors, so systems using PXA 255 processors
(like Gumstix etc) can interop with those commercial MS-Windows drivers.
This is a Good Thing since Microsoft's RNDIS code has bugginess issues,
which are unfortunately compounded by "won't fix" issues as well as "the
published specs are incomplete and wrong" issues.  Being able to talk to
the MCCI driver gives Windows users another connectivity option.  (MCCI
also has CDC Ethernet drivers, which can help most non-PXA processors.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:33 -08:00
Alan Stern 1737bf2c5e usbcore: remove unneeded error check
This patch (as830) removes some unnecessary error checking.  According
to the kerneldoc, schedule_work() can't fail.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:33 -08:00
David Brownell 2360e4aa64 USB: indicate active altsetting in proc/bus/usb/devices file
Update /proc/bus/usb/devices output to report active altsettings.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:33 -08:00
Dan Carpenter 316547fdfa USB: devio.c add missing INIT_LIST_HEAD()
It should hopefully fix the list corruption bug on:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=214402

Add a missing INIT_LIST_HEAD()

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:33 -08:00
Oliver Neukum 2cba72f025 USB: mutexification of rio500
this makes the rio500 misc usb driver use mutexes and turns uninterruptible
sleep into interruptible sleep where the semantics are not affected.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:32 -08:00
Tobias Klauser 4727810705 USB: Remove unneeded void * casts in idmouse.c
The patch removes unneeded void * casts for the following (void *) pointers:
- struct file: private_data

The patch also contains some whitespace and coding style cleanups in the
relevant areas.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:32 -08:00
David Brownell 5f84813774 USB: <linux/usb_ch9.h> becomes <linux/usb/ch9.h>
This moves <linux/usb_ch9.h> to <linux/usb/ch9.h> to reduce some of the
clutter of usb header files.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:32 -08:00
Benjamin Herrenschmidt d728e327d4 USB: Fix EHCI warning
This patch fixes a warning introduced by the big endian MMIO EHCI
support patch on platforms that don't have readl_be/writel_be variants
(though mostly harmless as those are called in an if (0) statement,
but gcc still warns).

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2007-02-07 15:44:32 -08:00
Benjamin Herrenschmidt b32e904d54 USB: Fix OHCI warning
This patch fixes a warning introduces by the split endian OHCI support
patch on platforms that don't have readl_be/writel_be variants (though
mostly harmless as those are called in an if (0) statement, but gcc
still warns).

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:32 -08:00
Benjamin Herrenschmidt 083522d766 USB: Implement support for EHCI with big endian MMIO
This patch implements supports for EHCI controllers whose MMIO
registers are big endian and enables that functionality for
the Toshiba SCC chip. It does _not_ add support for big endian
in-memory data structures as this is not needed for that chip
and I hope it will never be.

The guts of the patch are to convert readl(...) to
ehci_readl(ehci, ...) and similarly for register writes.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:32 -08:00
Benjamin Herrenschmidt 11d1a4aa8d USB: Implement support for "split" endian OHCI
This patch separates support for big endian MMIO register access
and big endian descriptors in order to support the Toshiba SCC
implementation which has big endian registers but little endian
in-memory descriptors.

It simplifies the access functions a bit in ohci.h while at it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:31 -08:00
Benjamin Herrenschmidt 4302a595cd USB: Rework the OHCI quirk mecanism as suggested by David
This patch applies David Brownell's suggestion for reworking the
OHCI quirk mechanism via a table of PCI IDs. It adapts the existing
quirks to use that mechanism.

This also moves the quirks to reset() as suggested by the comment
in there. This is necessary as we need to have the endian properly
set before we try to init the controller.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:31 -08:00
Greg Kroah-Hartman 0873c76485 USB: convert usb class devices to real devices
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:31 -08:00
Greg Kroah-Hartman 7bc3d63562 USB: move usb_device_class class devices to be real devices
This moves the usb class devices that control the usbfs nodes to show up
in the proper place in the larger device tree.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:30 -08:00
Greg Kroah-Hartman 6e8cf7751f USB: add EPIC support to the io_edgeport driver
This patch adds EPiC support to the io_edgeport driver which adds
support for a number of NCR printers:
	- NCR (Axiohm) 7401-K580 printer
	- NCR (TEC) 7401-K590 printer, 7402-K592
	- NCR (TEC) 7167, 7168 printers
	- NCR (TEC) 7197, 7198, F306, F307, F309 printers
	- NCR (Axiohm) 7194 printer
	- NCR (Axiohm) 7158 printer
and a few more.

It is based on the 2.6.19 kernel.

Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2007-02-07 15:44:30 -08:00
Luiz Fernando N. Capitulino 20b2e28fc5 USB: unusual_devs.h for Sony floppy
This patch increases the range for 0x054c:0x002c devices to make
the following Sony USB floppy to work:

T:  Bus=02 Lev=01 Prnt=01 Port=02 Cnt=02 Dev#=  6 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=054c ProdID=002c Rev=20.00
S:  Manufacturer=SONY
S:  Product=USB Floppy
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=04 Prot=00 Driver=usb-storage
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=83(I) Atr=03(Int.) MxPS=   2 Ivl=127ms

Signed-off-by: Marcelo Ricardo Leitner <mrl@mandriva.com>
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:30 -08:00
Kay Sievers f9f852df2f Driver core: add device_type to struct device
This allows us to add type specific attributes, uevent vars and
release funtions.

A subsystem can carry different types of devices like the "block"
subsys has disks and partitions. Both types create a different set
of attributes, but belong to the same subsystem.

This corresponds to the low level objects:
  kobject   -> device       (object/device data)
  kobj_type -> device_type  (type of object/device we are embedded in)
  kset      -> class/bus    (list of objects/devices of a subsystem)

Signed-off-by: Kay Sievers <kay.sievers@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 10:37:14 -08:00
Greg Kroah-Hartman 80f745fb1b USB: add the sysfs driver name to all modules
This adds the module name to all USB drivers, if they are built into the
kernel or not.  It will show up in /sys/modules/MODULE_NAME/drivers/

Cc: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 10:37:12 -08:00
YOSHIFUJI Hideaki / 吉藤英明 e77c2baf75 PEGASUS: Fix typo in Corega products.
s/FEter/FEther/.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:49 -05:00
YOSHIFUJI Hideaki / 吉藤英明 b29cf31d7e ASIX: Add IO-DATA ETG-US2 Support.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:49 -05:00
Soeren Sonnenburg a417a21e10 USB HID: handle multi-interface devices for Apple macbook pro properly
Some HID devices by Apple have both keyboard and mouse interfaces; the
keyboard interface is handled by usbhid, but the mouse (really
touchpad) interface must be handled by the separate 'appletouch'
driver.  Using HID_QUIRK_IGNORE will make hiddev ignore both
interfaces, therefore a new quirk flag to ignore only the mouse
interface is required.

Signed-off-by: Soeren Sonnenburg <kernel@nn7.de>
Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-02-05 10:06:01 +01:00
Jiri Kosina 43c7bf0472 USB HID: fix bogus comment in hid_get_class_descriptor()
The comment in hid_get_class_descriptor() says a very obvious thing
and is also violating codingstyle. Just remove it.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-02-05 10:00:43 +01:00
Jiri Kosina 8235ca3c05 USB HID: remove hid_find_field_by_usage()
The unused hid_find_field_by_usage() function has been commented out for
a pretty long time. Remove it completely.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-02-05 10:00:42 +01:00
Jiri Kosina 7c37914600 HID: API - fix leftovers of hidinput API in USB HID
hidinput_{open,close}() functions do not belong to usbhid, but
to the generic HID layer. Move them, and fix hooks in struct
hid_device, so that now the callbacks are done to transport-specific
_open() functions, but not input_open() functions.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-02-05 10:00:40 +01:00
Jiri Kosina c080d89ad9 HID: hid debug from hid-debug.h to hid layer
hid-debug.h contains a lot of code, and should not therefore
be a header.

This patch moves the code to generic hid layer as .c source, and
introduces CONFIG_HID_DEBUG to conditionally compile it, instead
of playing with #define DEBUG and including hid-debug.h.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-02-05 10:00:38 +01:00
Anssi Hannula 20eb127906 hid: force feedback driver for PantherLord USB/PS2 2in1 Adapter
Add a force feedback driver for PantherLord USB/PS2 2in1 Adapter,
0810:0001. The device identifies itself as "Twin USB Joystick".

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-02-05 10:00:05 +01:00
Anssi Hannula 5556feae1c hid: quirk for multi-input devices with unneeded output reports
Add new quirk HID_QUIRK_SKIP_OUTPUT_REPORTS to skip output reports
when enumerating reports on a hid-input device. Add this quirk and
HID_QUIRK_MULTI_INPUT to 0810:0001.

PantherLord Twin USB Joystick, 0810:0001 has separate input reports
for 2 distinct game controllers in the same interface, so it needs
HID_QUIRK_MULTI_INPUT. However, the device also contains one output
report per controller which is used to control the force feedback
function, and we do not want those to appear as separate input
devices as well. The simplest approach seems to be to add a quirk to
skip output reports on 0810:0001, and allow the force feedback
driver to handle those.

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-02-05 10:00:04 +01:00
Anssi Hannula c4146067fd hid: allow force feedback for multi-input devices
Allow hid devices with HID_QUIRK_MULTI_INPUT to have force feedback.
This was previously disabled because there were not any force
feedback drivers for such devices. This will change with my upcoming
patch.

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-02-05 10:00:02 +01:00
Al Viro 886ae1fa13 [PATCH] fix rtl8150
That code doesn't do what its author apparently thought it would do...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-03 20:37:37 -08:00
Jiri Kosina 76398f9667 HID: fix pb_fnmode and move it to generic HID
The apple powerbook people are used to switch the pb_fnmode
setting at runtime through writing to sysfs, altering the
module parameter value. This was broken for them in 2.6.20-rc1
when generic HID layer was introduced, as the pb_fnmode flag
was made per-hiddevice, instead of global variable.

This patch moves the pb_fnmode module parameter from usbhid module
to hid module, but apart from that retains backward compatibility
with respect to changing the mode through sysfs.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-01-30 15:05:27 +01:00
Jiri Kosina ad2905f065 USB HID: fix hid_blacklist clash for 0x08ca/0x0010
commit d8c8a39316 introduced a clash in
hid_blacklist for 0x08ca/0x0010 (GTCO vs. AIPTEK). As the vendor of
GTCO device doesn't seem to be interested in supporting their legacy
HW with this conflicting ids, it is OK to remove it.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-01-25 18:31:23 +01:00
Al Viro c3ea6729fe [PATCH] funsoft: ktermios fix
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-01-23 11:09:49 -08:00
Manuel Osdoba 39559b4ff8 USB: unusual_devs.h entry for nokia 6233
In appendix a patch for the nokia 6233 mobile phone is included.
The patch is against 2.6.20-rc5. It is my first patch. Hopefully it has
the right format. The code makes my nokia 6233 on my computer work.


From: Manuel Osdoba <manuel.osdoba@tu-ilmenau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-01-22 11:55:17 -08:00
Petr Stetiar caaf26325d USB: Fix for typo in ohci-ep93xx.c
Attached patch fixes typo in USB driver reported by Chase Douglas on linux-cirrus mailing
list. http://www.freelists.org/archives/linux-cirrus/12-2006/msg00003.html

Signed-off-by: Petr Stetiar <ynezz@true.cz>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-01-22 11:55:17 -08:00
Greg Kroah-Hartman b1bf4f412b USB: disable USB_MULTITHREAD_PROBE
Disable the USB_MULTITHREAD_PROBE option because it causes crashes on
people's machines and they never remember to actually read the config
help files.

No one likes this, everyone hates it, I'm going to go eat worms...

The full logic will be ripped out later.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-01-22 11:55:17 -08:00
garrett_damore@tadpole.com 53e8f84dc6 USB: add vendor/device id for Option GT Max 3.6 cards
This fixes http://bugzilla.kernel.org/show_bug.cgi?id=7814


Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-01-22 11:55:16 -08:00
Pete Zaitcev 379885a9b2 USB: unusual_devs.h for 0x046b:ff40
American Megatrends did something wrong in their floppy emulator. It breaks
with both kinds of MODE SENSE which our stack sends. Alan and I tried a few
tweaks, and got LUNs sensed right, but US_FL_NO_WP_DETECT is still needed.

I set the firmware bracket to 1.00 exactly, in case AMI or Sun fix it with a
firmware update. Hey, you never know.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-01-22 11:55:16 -08:00
Oliver Neukum 8d2bad8788 USB: make usbhid ignore Imation Disc Stakka
on request of the sourceforge project for this device, a kind of
robotized CD storage, it should be ignored by the generic driver.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-01-22 11:55:16 -08:00
Daniel Gollub deb31f1764 USB: rndis_host: fix crash while probing a Nokia S60 mobile
Bug fix for driver rndis_host which fixes rndis_host probing certain
Nokia S60 (Series 60) mobiles. While the rndis_host get probed by usbnet
and tries to bind the Nokia mobile the bind is going to fail. The
rndis_host module tries to release the device, in a wrong way, which
cause the oops.

Fixes Bugzilla #7201

Signed-off-by: Daniel Gollub <dgollub@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-01-22 11:46:55 -08:00
Andres Salomon d0ffff8fdd USB: asix: Detect internal PHY and enable/use accordingly
Different AX88772 dongles use different PHYs; the chip is capable of using
both a primary and secondary PHY, and supports an internal and external PHY.

It appears that some DUB-E100 devices use the internal PHY, so trying to use
an external one will not work (note that this is different across revisions,
as well; the "A" and "B" revs of the DUB-E100 use different PHYs!).  The data
sheet for the AX88772 chip specifies that the internal PHY id will be 0x10,
so if that's read from the EEPROM, we should use that rather than attempting
to use an external PHY.

Thanks to Mitch Bradley for pointing this out!

Signed-off-by: Andres Salomon <dilinger@debian.org>
Cc: David Hollis <dhollis@davehollis.com>
Cc: Chris Ball <cjb@laptop.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-01-22 11:46:55 -08:00
Daniel Ritz c9d8c2b324 usbtouchscreen: make ITM screens report BTN_TOUCH as zero when not touched
ITM screens send invalid x/y data when not touched. this was fixes a while ago
but the problem is if the screen is not touched anymore the driver never does
not report BTN_TOUCH as zero. fix it by sending the report with the last valid
coordinates when pressure is released.

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Cc: J.P. Delport <jpdelport@csir.co.za>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-01-22 11:46:55 -08:00
Jeremy Roberson d8c8a39316 hid-core.c: Adds GTCO CalComp Interwrite IPanel PIDs to blacklist
Adds GTCO CalComp Interwrite IPanels to the hid-core.c blacklist.

Signed-off-by: Jeremy A. Roberson <jroberson@gtcocalcomp.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-01-21 22:18:03 +01:00
Anssi Hannula be8209753b HID: put usb_interface instead of usb_device into hid->dev to fix udevinfo breakage
The commit 4916b3a57f introduced a
hid regression between 2.6.19 and 2.6.20-rc1. The device put in
input_dev->cdev is now of type usb_device instead of usb_interface.

Before:
> # readlink -f /sys/class/input/input6/event4/device
> /sys/devices/pci0000:00/0000:00:10.0/usb2/2-1/2-1:1.1
After:
> # readlink -f /sys/class/input/input3/event3/device
> /sys/devices/pci0000:00/0000:00:10.0/usb1/1-1

This causes breakage:
> # udevinfo -q all -n /dev/input/event3
> P: /class/input/input3/event3
> N: input/event3
> S: input/by-path/pci-1-1--event-
> E: ID_SERIAL=noserial
> E: ID_PATH=pci-1-1-

No ID_MODEL, ID_VENDOR, ID_REVISION, ID_TYPE etc etc.

Fix this by assigning the intf->dev into hid->dev, and fixing
all the users.

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-01-21 22:18:01 +01:00
Adrian Friedli 694400641b HID: GEYSER4_ISO needs quirk
I've got a newer MacBook with core2duo. Two keys on the keyboard are
swapped, "unswaping" works with the same trick as GEYSER3_ISO.

Signed-off-by: Adrian Friedli <masteradi@gmx.ch>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-01-21 22:17:50 +01:00
Russell King e7c4e1a58f HID: fix some ARM builds due to HID brokenness - make USB_HID depend on INPUT
We have USB_HID _newly_ selected in configurations which didn't
have it before, which overrides CONFIG_HID and builds HID without
input support.

Nevertheless, here's a patch to solve more of the same that my original
patch attempted to solve.  The original patch is still required.  Seems
to solve the final instance of this problem here.

Signed-off-by: Russell King <rmk+lkml@arm.linux.org.uk>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-01-21 22:17:47 +01:00
David Miller 88bf7b391d [PATCH] really fix funsoft driver
Fix void cast and re-enable on sparc.

Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2007-01-11 18:18:21 -08:00
David Hollis 14e51f28ad USB: asix: Fix AX88772 device PHY selection
A small typo in ax88772_bind() prevents the device from selecting the
proper PHY, leaving the device useless.  The attached patch fixes this.
If this patch can be added to the 2.6.19.x series as well, that would be
helpful for end-users.

Signed-off-by: David Hollis <dhollis@davehollis.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-01-05 12:19:10 -08:00
Martin Williges 4f45d0387b USB: usblp.c - add Kyocera Mita FS 820 to list of "quirky" printers
This patch gets the Kyocera FS-820 working with cups 1.2 via usb again. It
adds the printer to the list of "quirky" printers. The printer seems not
answer to ID requests some seconds after plugging in. Patch is based on
linux-2.6.19.1.

Background:
As far as I could see (strace, usbmon), the Kyocera FS-820 answers to ID
requests only a few seconds after plugging it in. This applies to detecting
it with cups and is also true for the printing itself, which is initiated
with an ID request. Since I have little usb knowledge, maybe someone can
interpret the data, especially the fist bulk transfer - why request 8192
bytes? This is the second version of the patch.

usbmon output of printing an email without patch:
tail -F /tmp/printlog.txt
c636e140 3374734463 S Bi:002:02 -115 8192 <
c9d43b40 3374734494 S Ci:002:00 s a1 00 0000 0000 03ff 1023 <
c9d43b40 3379732301 C Ci:002:00 -104 0
c636e140 3379733294 C Bi:002:02 -2 0
[...repeating...]

with patch:
tail -F /tmp/printlog.txt
d9cb82c0 3729790131 S Ci:002:00 s a1 00 0000 0000 03ff 1023 <
d9cb82c0 3729791725 C Ci:002:00 0 91 = 005b4944 3a46532d 3832303b 4d46473a
 4b796f63 6572613b 434d443a 50434c58 df956320 3732493190 S Bo:002:01 -115
 1347 = 1b252d31 32333435 5840504a 4c0a4050 4a4c2053 4554204d 414e5541
 4c464545 [...more data...]

Signed-off-by: Martin Williges <kernel@zut.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-01-05 12:19:10 -08:00
Andrew Morton c067dfc650 sisusb_con warning fixes
x86_64:

drivers/usb/misc/sisusbvga/sisusb_con.c: In function 'sisusbcon_putc':
drivers/usb/misc/sisusbvga/sisusb_con.c:405: warning: cast from pointer to integer of different size
drivers/usb/misc/sisusbvga/sisusb_con.c: In function 'sisusbcon_putcs':
drivers/usb/misc/sisusbvga/sisusb_con.c:440: warning: cast from pointer to integer of different size
drivers/usb/misc/sisusbvga/sisusb_con.c: In function 'sisusbcon_clear':
drivers/usb/misc/sisusbvga/sisusb_con.c:494: warning: cast from pointer to integer of different size
drivers/usb/misc/sisusbvga/sisusb_con.c: In function 'sisusbcon_bmove':
drivers/usb/misc/sisusbvga/sisusb_con.c:566: warning: cast from pointer to integer of different size
drivers/usb/misc/sisusbvga/sisusb_con.c: In function 'sisusbcon_switch':
drivers/usb/misc/sisusbvga/sisusb_con.c:614: warning: cast from pointer to integer of different size
drivers/usb/misc/sisusbvga/sisusb_con.c: In function 'sisusbcon_scroll_area':
drivers/usb/misc/sisusbvga/sisusb_con.c:941: warning: cast from pointer to integer of different size

Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-01-05 12:19:10 -08:00
Sarah Bailey c07be136a8 USB: Fixed bug in endpoint release function.
Error handling in usb_create_ep_files() is not correct unless
the minor number is freed in ep_device_release().

Signed-off-by: Sarah Bailey <saharabeara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-01-05 12:19:09 -08:00
Pete Zaitcev ad1428c96e USB storage: fix ipod ejecting issue
This patch from Pete fixes the 'ejecting problem' on yet another ipod. Please applyt.


Signed-off-by: Pete Zaitcev <zaitcev@yahoo.com>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-01-05 12:19:09 -08:00
Phil Dibowitz f1cd4ad202 USB Storage: unusual_devs: add supertop drives
This combines patches from Alan Stern and Robert Schedel for two "Super Top"
drives that need the IGNORE_RESIDUE flag but have different vendor IDs.

Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-01-05 12:19:09 -08:00
David Brownell e6a6e472f5 USB: omap_udc build fixes (sync with linux-omap)
Resync the omap_udc driver with the latest from the Linux-OMAP tree.
Changes include DMA API updates (it builds again!), clock/pm updates,
minor bugfixes, whitespace.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-01-05 12:19:09 -08:00
Andrew Morton 6a3c3d4952 USB: funsoft is borken on sparc
drivers/usb/serial/funsoft.c: In function `funsoft_ioctl':
drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer
drivers/usb/serial/funsoft.c:35: error: request for member `c_iflag' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_iflag' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_iflag' in something not a structure or union
drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name'
drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer
drivers/usb/serial/funsoft.c:35: error: request for member `c_oflag' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_oflag' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_oflag' in something not a structure or union
drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name'
drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer
drivers/usb/serial/funsoft.c:35: error: request for member `c_cflag' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_cflag' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_cflag' in something not a structure or union
drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name'
drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer
drivers/usb/serial/funsoft.c:35: error: request for member `c_lflag' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_lflag' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_lflag' in something not a structure or union
drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name'
drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer
drivers/usb/serial/funsoft.c:35: error: request for member `c_line' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_line' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_line' in something not a structure or union
drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name'
drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer
drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union
drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer
drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union
drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name'
drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer
drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union
drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name'
drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer
drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union
drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name'
drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer
drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union
drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name'

Cc: David Clare <david@funsoft.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-01-05 12:19:09 -08:00
Miguel Angel Alvarez 8c1527132c USB: fix interaction between different interfaces in an "Option" usb device
Just the serial port in the first interface should control DTR and RTS
lines. This way, the closing of the rest of the ports does not produce a=
hangup in the communication.

Signed-off-by: Miguel Angel Alvarez <ma.alvarez@ziv.es>
Signed-off-by: Matthias Urlichs <matthias@urlichs.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-01-05 12:19:08 -08:00
Alan Stern 25c77b3294 UHCI: support device_may_wakeup
This patch (as831) adds device_may_wakeup() support to uhci-hcd; it
has been lacking for a long time.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-01-05 12:19:08 -08:00
Alan Stern c80a70d53f UHCI: make test for ASUS motherboard more specific
Instead of matching all motherboards whose name contains "A7V8X" for a
remote-wakeup hardware bug, this patch (as829) matches only those
boards whose name is exactly equal to "A7V8X".  Later motherboards
don't seem to have the bug.

(In fact, it's possible that only one motherboard in the world has the
bug.  With only one user reporting problems, it's hard to tell.)

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-01-05 12:19:08 -08:00
Jiri Kosina 69e4d94818 HID: fix help texts in Kconfig
The help text for CONFIG_HID might imply for someone that
it's necessary to enable it for any keyboard or mouse
attached to the system. This is obviously not correct, so
fix it to avoid confusing the users.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-01-04 11:43:35 +01:00
Soeren Sonnenburg 10f549fa15 [PATCH] make fn_keys work again on power/macbooks
The apple fn keys don't work anymore with 2.6.20-rc1.

The reason is that USB_HID_POWERBOOK appears in several files although
USB_HIDINPUT_POWERBOOK is the thing to be used.

The patch fixes this.

Cc: Greg KH <greg@kroah.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:55:55 -08:00
Linus Torvalds 18ed1c0513 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (68 commits)
  ACPI: replace kmalloc+memset with kzalloc
  ACPI: Add support for acpi_load_table/acpi_unload_table_id
  fbdev: update after backlight argument change
  ACPI: video: Add dev argument for backlight_device_register
  ACPI: Implement acpi_video_get_next_level()
  ACPI: Kconfig - depend on PM rather than selecting it
  ACPI: fix NULL check in drivers/acpi/osl.c
  ACPI: make drivers/acpi/ec.c:ec_ecdt static
  ACPI: prevent processor module from loading on failures
  ACPI: fix single linked list manipulation
  ACPI: ibm_acpi: allow clean removal
  ACPI: fix git automerge failure
  ACPI: ibm_acpi: respond to workqueue update
  ACPI: dock: add uevent to indicate change in device status
  ACPI: ec: Lindent once again
  ACPI: ec: Change #define to enums there possible.
  ACPI: ec: Style changes.
  ACPI: ec: Acquire Global Lock under EC mutex.
  ACPI: ec: Drop udelay() from poll mode. Loop by reading status field instead.
  ACPI: ec: Rename gpe_bit to gpe
  ...
2006-12-22 18:46:56 -08:00
Greg Kroah-Hartman c305290503 USB Storage: remove duplicate Nokia entry in unusual_devs.h
How many times are we going to merge this entry...

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 11:46:03 -08:00
Eric Smith 11e82730cc [PATCH] usb serial: add support for Novatel S720/U720 CDMA/EV-DO modems
Add USB vendor/device IDs for Novatel Wireless S720 and U720 CDMA/EV-DO
modems to airprime.c.

Signed-off-by: Eric Smith <eric@brouhaha.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 11:29:18 -08:00
Andrew Morton a5176b7897 [PATCH] USB: Nokia E70 is an unusual device
Taken from http://bugzilla.kernel.org/show_bug.cgi?id=7508

When the Nokia E70 Phone is plugged in to the USB port, I get:

end_request: I/O error, dev sda, sector 1824527
sd 0:0:0:0: SCSI error: return code = 0x10070000
end_request: I/O error, dev sda, sector 1824535
sd 0:0:0:0: SCSI error: return code = 0x10070000

The fix is to add these lines to drivers/usb/storage/unusual_devs.h:

Cc: <honkkis@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 11:29:04 -08:00
Chris Frey df251b8bfc USB: fix to usbfs_snoop logging of user defined control urbs
When sending CONTROL URB's using the usual CONTROL ioctl, logging works
fine, but when sending them via SUBMITURB, like VMWare does, the
control fields are not logged.  This patch fixes that.

I didn't see any major changes to devio.c recently, so this patch should apply
cleanly to even the latest kernel.  I can resubmit if it doesn't.

From: Chris Frey <cdfrey@foursquare.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:28 -08:00
Wojtek Kaniewski bfb7fb79e9 USB: at91_udc: Additional checks
This patch performs additional checks in at91_udc, just in case of
some spurious interrupts or device enumeration.

Signed-off-by: Wojtek Kaniewski <wojtekka@toxygen.net>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
Wojtek Kaniewski 943c441948 USB: at91_udc: Cleanup variables after failure in usb_gadget_register_driver()
This patch zeroes some variables when usb_gadget_register_driver()
fails. gadgetfs does a dummy registration to get the name of the USB
driver and then waits for user-land driver. If someone plugs the cable
in the meantime, bad things happen, because at91_udc has been left in
inconsistent state.

Signed-off-by: Wojtek Kaniewski <wojtekka@toxygen.net>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
Wojtek Kaniewski bc92c32aa2 USB: at91_udc: allow drivers that support high speed
This patch allows gadget drivers that support high speed (e.g. gadgetfs)
to work properly with at91_udc.

Fix suggested by Milan Svoboda in
http://marc.theaimsgroup.com/?l=linux-usb-devel&m=115822184711817

Signed-off-by: Wojtek Kaniewski <wojtekka@toxygen.net>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
Tony Olech 4b87361d49 USB: u132-hcd/ftdi-elan: add support for Option GT 3G Quad card
ELAN's U132 is a USB to CardBus OHCI controller adapter,
    designed specifically for CardBus 3G data cards to
    function in machines without a CardBus slot.
The "ftdi-elan" module is a USB client driver, that detects
    a supported CardBus OHCI controller plugged into the
    U132 adapter and thereafter provides the conduit for
    for access by the "u132-hcd" module.
The "u132-hcd" module is a (cut-down OHCI) host controller
    that supports a single OHCI function of the CardBus 
    card inserted into the U132 adapter.

The problem with the initial implementation is that when
the CardBus card inserted into the U132 adapter has multiple
functions (and a CardBus card can support up to 4 functions),
it was the first function that was arbitrarily choosen.

The first batch of 3G cards tested, like the Merlin Qualcomm
V620, have two functions each supporting a seperate USB OHCI
host controller, of which it was that first function that is
wired up to the 3G modem.

Then along comes the Vodafone Mobile Connect 3G/GPRS data card,
aka "Option GT 3G Quad" as printed on it's rear or "Option N.V.
GlobeTrotter Fusion Quad Lite" as read with "lspci -v". And it
has the meaningful functionality in the second CardBus function.

That presents a problem because it was the "ftdi-elan" module
alone that knows how to communicate to the embedded CardBus slot
and the "u132-hcd" module alone that knows how to access the
pcmcia configuration and CardBus accessible memory space. And
of course, the information about attached (internally hardwired)
devices is contained within USB configuration embedded somewhere
within the CardBus card.

If only the "u132-hcd" module probe() interface could return a
result code that propagated back to the instigating function
platform_device_register() then the "ftdi-elan" module could
try an alternative CardBus function.     However in spite of
the recent changes to the drivers/base/ routines that moved 
device_attach() from bus_add_device() to bus_attach_device()
both of those routines lose the "failed to attach" 0 result
code and thus the calling routine, namely device_add() is
incapable of propaging the "failed to attach" condition back
to platform_device_add() and consequently back to the caller
of platform_device_register()

Experiments show that patching bus_attach_device() to return
ENODEV fails with the kernel locking up very early during
boot. But, however, if the patch is restricted to calls from
platform_device_add() then it does seem to work.

Unfortunately, until the kernel's drivers/base is properly
modified to propagate -ENODEV back to the caller of
platform_device_register(), it is necessary to "fix" the
"ftdi-elan" module by importing knowledge from the 
"u132-hcd" module. This is the reason for the duplicated
functionality introduced in this patch.

Signed-off-by: Tony Olech <tony.olech@elandigitalsystems.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
Andrew Victor 29ba4b533b USB: at91_udc, misc fixes
This is an update to the AT91 USB Device (Gadget) driver.

Adds support for the Atmel AT91SAM9260 and AT91SAM9261 processors.  The
only difference is how they handle the pullup pin.
[Patch from Patrice Vilchez]

Need to clear any pending USB Device interrupts before registering the
interrupt handler.  The bootloader might have been using the USB Device
port.   [Patch from Peer Georgi]

VBUS detection is handled by a GPIO interrupt which only triggers on a
change. Is is therefore necessary to read the current VBUS state
explicitly at startup.  [Patch from Peer Georgi]


Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
Andrew Victor ffd3326bf6 USB: at91 udc, support at91sam926x addresses
This is an update to the AT91 USB Device (Gadget) driver.

The base I/O address provided in the platform_device resources is now
ioremap()'ed instead of using a statically mapped memory area.  This
helps portability to the newer AT91sam926x processors.

The major change is that we now have to pass a 'struct at91_udc'
parameter to at91_udp_read() and at91_udp_write().

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
Vitaly Wool 5151d04068 USB: OHCI support for PNX8550
OHCI HCD (Host Controller Driver) for USB. Bus Glue for PNX8550.

Signed-off-by: Vitaly Wool <vitalywool@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
Takamasa Ohtake 23d10a9e37 USB: ohci handles hardware faults during root port resets
I have found a problem where the root_port_reset() goes into an infinite
loop and stalls the kernel.

This happens when a hardware fault inside the machine occurs during a small
timing window.  In case of USB device connection, if a USB device responds to
hcd_submit_urb(), and later the controller fails before root_port_reset(),
root_port_reset() will loop infinitely because ohci_readl() will always
return "-1".  Such a failure can include ejecting a CardBus OHCI controller.

The probability of this problem is low, but it will increase if PnP type
usage is frequent.  The attached patch can solve this problem and I believe
that it is better to fix this problem.

Signed-off-by: Takamasa Ohtake <ohtake-txa@necst.nec.co.jp>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
Andrew Victor ee269d98a9 USB: ohci at91 warning fix
Remove a warning about an unused variable in the OHCI bus glue for at91.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
David Brownell dd9048af41 USB: ohci whitespace/comment fixups
This is an OHCI cleanup patch ... it removes a lot of erroneous whitespace
(space before tab, at end of line) as well as the obsolete inline changelog.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:26 -08:00
David Brownell 6bea476cf6 USB: gadget driver unbind() is optional; section fixes; misc
Allow gadget drivers to omit the unbind() method.  When they're
statically linked, that's an appropriate memory saving tweak.

Similarly, provide consistent/simpler handling for a should-not-happen
error case:  removing a peripheral controller driver when a gadget
driver is still loaded.  Such code dates back to early versions of the
first implementation of the gadget API, and has never been triggered.

Includes relevant section annotation fixs for gmidi.c, file_storage.c,
and serial.c; we don't yet have an "init or exit" annotation.  Also
some whitespace fixes in gmidi.c (space at EOL, before tabs, etc).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:26 -08:00
Alan Stern 5f8364b7d6 UHCI: module parameter to ignore overcurrent changes
Certain boards seem to like to issue false overcurrent notifications,
for example on ports that don't have anything connected to them.  This
looks like a hardware error, at the level of noise to those ports'
overcurrent input signals (or non-debounced VBUS comparators).  This
surfaces to users as truly massive amounts of syslog spam from khubd
(which is appropriate for real hardware problems, except for the
volume from multiple ports).

Using this new "ignore_oc" flag helps such systems work more sanely,
by preventing such indications from getting to khubd (and spamming
syslog).  The downside is of course that true overcurrent errors will
be masked; they'll appear as spontaneous disconnects, without the
diagnostics that will let users troubleshoot issues like
short-circuited cables.  In addition, controllers with no devices
attached will be forced to poll for new devices rather than relying on
interrupts, since each overcurrent event would generate a new
interrupt.

This patch (as826) is essentially a copy of David Brownell's ignore_oc
patch for ehci-hcd, ported to uhci-hcd.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:26 -08:00
Andrew Morton fe1ec341df USB: Nokia E70 is an unusual device
Taken from http://bugzilla.kernel.org/show_bug.cgi?id=7508

When the Nokia E70 Phone is plugged in to the USB port, I get:

end_request: I/O error, dev sda, sector 1824527
sd 0:0:0:0: SCSI error: return code = 0x10070000
end_request: I/O error, dev sda, sector 1824535
sd 0:0:0:0: SCSI error: return code = 0x10070000

The fix is to add these lines to drivers/usb/storage/unusual_devs.h:

Cc: <honkkis@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:26 -08:00
Burman Yan 66eb2e93b9 USB AUERSWALD: replace kmalloc+memset with kzalloc
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:26 -08:00
Ping Cheng 071e0a2aee USB: fix Wacom Intuos3 4x6 bugs
Fixes Intuos3 4x6 bugs

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:26 -08:00
Johann Wilhelm ab19589055 usb-gsm-driver: Added VendorId and ProductId for Huawei E220 USB Modem
Added VendorId and ProductId for Huawei E220 USB Modem

Signed-off-by: Johann Wilhelm <johann.wilhelm@student.tugraz.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:25 -08:00
Johann Wilhelm 16c76865df usb-storage: Ignore the virtual cd-drive of the Huawei E220 USB Modem
This prevents the kernel from detecting the virtual cd-drive with the
Windows drivers.

Signed-off-by: Johann Wilhelm <johann.wilhelm@student.tugraz.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:25 -08:00
Petko Manolov 5859271ebd USB: rtl8150 new device id
This one adds another vendor ID to rtl8150 driver.  Please apply.


Signed-off-by: Petko Manolov <petkan@nucleusys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:25 -08:00
Jeff Garzik abc9404bb0 USB: fix ohci.h over-use warnings
When u132-hcd is built, it includes local header ohci.h, which appears
to have been intended only for use by ohci-hcd.

This throws warnings about functions which are defined and not used.
The warnings thrown are because three small functions are implemented in
the header, but not declared 'inline', a rather strange affair.

Since these functions are small, let's go ahead and define them as
'inline', just like the inline functions surrounding them.  This makes
things more consistent, and kills the warnings.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:25 -08:00
David Clare c2585d9625 USB: Prevent the funsoft serial device from entering raw mode
Added a device specific ioctl function to prevent the disabling of canonical
mode.  EINVAL is returned for any TCSETSF ioctl that doesn't have ICANON set.
This patch is for 2.6.17 or later kernels.

When "hwinfo --modem" is executed it opens the funsoft USB serial device and
disables canonical mode.  The device is kept this way until hwininfo has
finished probing any modems on a system.  The funsoft device expects to be
running in canonical mode.  Switching the device to raw mode can cause
incomplete data packets and device timeouts.

Signed-off-by: David Clare <david@funsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:25 -08:00
Johannes Hoelzl e05998d50d Add Baltech Reader ID to CP2101 driver
this patch adds the Baltech Reader ID to the list of USB IDs in the
CP2101 driver.

From: Johannes Hoelzl <johannes.hoelzl@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:25 -08:00
Oliver Neukum 8e42266965 USB: mutexification of usblp
this patch:
- converts usblp fully to mutex
- makes sleeping interruptible where EINTR can be returned anyway

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:13:23 -08:00
Alan b1cff285ae usb serial: Eliminate bogus ioctl code
Several drivers have bogus ioctl code that tries unneccessarily to
override the standard processing. In the three cases here the actual code
is not only wrong but also not required as they implement the proper
set_termios method as well.

Remove the junk.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:13:23 -08:00
Oliver Neukum 337445313f USB: removing ifdefed code from gl620a
as David has objected to the patch against the gl620a driver,
here's a patch implementing David' suggestion of removing the incomplete
ifdefed code from the gl620a driver.


Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2006-12-20 10:13:23 -08:00
Jan Capek ec434e9b43 USB: ftdi_sio - MachX product ID added
below is a patch for the ftdi_sio driver to include a new device ID for
CCS MachX PIC programmer.


From: Jan Capek <jan@ccsinfo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:13:23 -08:00
Eagle Jones 87f28bde94 USB: airprime: add device id for dell wireless 5500 hsdpa card
Added the device id (0x413c, 0x8115) for the Dell wireless HSDPA 5500,
which is a rebranded Novatel EU730.

Signed-off-by: Eagle Jones <eagle@newdream.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:13:23 -08:00
Oliver Neukum 96ca014d53 USB: fix transvibrator disconnect race
in disconnect you set the interface's private data to NULL. In your IO
methods you unconditionally follow the pointer into never never land.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:13:23 -08:00
Sean Young 6a7255e1df USB: Fix oops in PhidgetServo
The PhidgetServo causes an Oops when any of its sysfs attributes are read
or written too, making the driver useless.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:13:22 -08:00
Len Brown 9774f33841 merge linus into test branch 2006-12-20 02:53:13 -05:00