I was sitting in a train threatened to be blocked by ice. I took this
as a hint to do some more boring work for the common good. Here's
a bit more for coding style.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as844) makes some trivial whitespace fixes to a few files
in usbcore. Oliver did most of the work and Alan added some tidying up.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
According to the Bulk-Only spec, usb-storage is supposed to use the
_first_ bulk-in and bulk-out endpoints it finds, not the _last_. And
while we're at it, we ought to test the direction of the interrupt
endpoint as well. This patch (as842) makes both changes.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Now that port status change notifications are interrupt-driven,
ehci-hcd needs to tell usbcore when a remote-wakeup resume operation
is finished -- we can no longer rely on the core to poll and find
out. This patch (as843) uses the root-hub status timer to force a
poll after the resume is complete.
The patch also changes the test for detecting when the TDRSMDN resume
period has expired. It's necessary to use time_after_eq() instead of
time_after(), since the polling is triggered precisely by a timer.
The same change is made for TDRSTR reset expiration, for consistency.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Switch ehci-hcd to use the new polling scheme, which reports root
hub status changes via the interrupt handler, in an asynchronous
fashion. Doing so disables polling for status changes (whose handler is
rh_timer_func).
Tested on a Geode GX machine, which is now capable of running at =~ 5
timer interrupts per second (in the -rt tree), resulting in significant
power savings.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
this implements autosuspend for usb printers. It compiles and is tested.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Added a kernel module (gtco) to the USB Input subsystem. This kernel
module adds support for all GTCO CalComp USB InterWrite School products.
Signed-off-by: Jeremy A. Roberson <jroberson@gtcocalcomp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch ensures that the device is turned on when inserted into the system.
It also adds more VID/PIDs and matches the N_OUT_URB with the airprime driver.
Signed-off-by: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This identifies the driver for the Atmel HUSB2 Device Controller,
as integrated into the first AVR32 chip, the AT32AP700.
From: Håvard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as837) fixes several mistakes in the AIO interface of the
gadgetfs driver:
The ki_retry method is not supposed to do a put on the kiocb.
The extra call to aio_put_req() causes memory corruption.
(Note: This call was removed before, by patch as691, and then
mysteriously re-introduced later.)
Even if a read transfer is cancelled, we can and should send
to the user all the data that did manage to get transferred.
Testing for AIO cancellation in the I/O completion handler
is both racy and (now) unnecessary. aio_complete() does its
own checking, in a safe manner.
Signed-off-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>
Resolve an initizlization issue that could come up if the userspace
driver wrote invalid descriptors to a dual-speed device.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This resolves a race in gadgetfs associated with changing device/ep0
when processing control requests. The fix is to change that state
earlier, when the control response is issued, so there's no window
in which userspace could see the wrong state; and enlarge the scope
of the spinlock during the ep0 request completion handler.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This simplifies event reading by eliminating arithmetic and being
more direct/obvious, and tweaks some debug messages slightly.
The math elimination will change timings, sometimes enough to
allow a race to appear.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Minor gadgetfs cleanups:
- EP0 state constants become consistently STATE_DEV_* rather than
sometimes omitting the "DEV_"; STATE_EP_* were already consistent.
- Comment that ep0 state is protected by the spinlock, and update
code that was neglecting that rule.
None of this is expected to change behavior.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
- fix an error code returned if a device has been disconnected
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
- take BKL before looking up a driver to associate with a device to make
sure the module is not unloaded after looking up but before association
& bumping module count
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
- introduce a spinlock for serial_table to eliminate the window between
looking up a device and getting a reference
- delay inscription of a new device into serial_table until it is fully
initialised
- make sure disconnect() kills all URBs to avoid leckage across a soft unbind
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
At least the Keyspan USA-19HS USB-to-serial converter supports
two different configurations, one where the input endpoints
have interrupt transfer type and one where they are bulk endpoints.
The default UHCI configuration uses the interrupt input endpoints.
The keyspan driver, OTOH, assumes that the device has only bulk
endpoints (all URBs are initialized by calling usb_fill_bulk_urb
in keyspan.c/ keyspan_setup_urb). This causes the interval field
of the input URBs to have a value of zero instead of one, which
'accidentally' worked with Linux at least up to 2.6.17.11 but
stopped to with 2.6.18, which changed the UHCI support code handling
URBs for interrupt endpoints. The patch below modifies to driver to
initialize its input URBs either as interrupt or as bulk URBs,
depending on the transfertype contained in the associated endpoint
descriptor (only tested with the default configuration) enabling
the driver to again receive data from the serial converter.
Greg K-H reworked the patch.
Signed-off-by: Rainer Weikusat <rweikusat@sncag.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The whole approach is simply wrong. Forking a thread means that
- errors are ignored
- locking is ignored
Doing this correctly would require major surgery for questionable benefit.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This updates the AT91 UDC driver's handling of wakeup events:
- Fix a bug in the original scheme, which was never updated after
the {enable,disable}_irq_wake() semantics were updated to address
refcounting issues (i.e. behave for shared irqs).
- Couple handling of both type of wakeup events, to be more direct. The
controller can be source of wakeup events for cases like bus reset
and USB resume. On some boards, VBUS sensing is also IRQ driven.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as710) adds a sysfs class-device attribute file named
"companion" for EHCI controllers. The file contains a list of port
numbers that are dedicated to the companion controller; by writing a
port number to the file the user can force a high-speed device
attached directly to the computer to run at full speed. (As far as I
know it is not possible to do this for a device attached to an
external hub.) A port is removed from the file by writing the
negative of its port number.
Several users have asked for this facility and it seems like a useful
thing to have. Every now and then one runs across a device which
behaves much better at full speed than at high speed.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as709) changes the way ehci-hcd presents port status
values for ports owned by the companion controller. It no longer
hides the information; in particular, it allows the core to see the
disconnect event that occurs when a full- or low-speed device is
switched over to the companion. This is required for the next patch
in this series.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as708) introduces a local variable to hold the port
status-register address in ehci-hub.c. There's not much improvement
in the object code, but it sure is a lot easier to read.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as841) removes from usbcore a couple of support routines
meant to help with bandwidth allocation. With the changes to uhci-hcd
in the previous patch, these routines are no longer used anywhere.
Also removed is the CONFIG_USB_BANDWIDTH option; it no longer does
anything and is no longer needed since the HCDs now handle bandwidth
issues correctly.
Signed-off-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>
This patch (as840) fixes the bandwidth allocation mechanism in
uhci-hcd. It has never worked correctly.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
USB OHCI driver bus glue for the PS3 game console.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Restructure the ohci_hcd_mod_init error handling code in to better support
the multiple platform drivers. This does not change the functionality.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add the USB HID quirk HID_QUIRK_SONY_PS3_CONTROLLER. This sends an
HID_REQ_GET_REPORT to the the PS3 controller to put the device into
'operational mode'.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
USB EHCI driver bus glue for the PS3 game console.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
this implements enough ethtool support to make NetworkManager happy.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
- implements suspend when the network interface is down
- fixes a typo in comments
- adds debugging output for power management
- fixes a compiler warning
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Gadgetfs had a mode in which endpoint descriptors were written by the user
program before connection. This mode had some bugs, and hasn't seen much
(if any) use. This patch removes that mode, leaving the mode of operation
where the user program waits for endpoint 0 to report a SET_CONFIGURATION,
and only then configures the endpoints.
From: "Phil Endecott" <spam_from_usb_devel@chezphil.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Remove some whitespace bugs in gadgetfs (mostly from someone's
patch updating the AIO support).
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The attached patch fixes the unbalanced calls to enable_irq_wake() and
disable_irq_wake() in the AT91 USB Host driver.
It should resolve these kernel messages:
Unbalanced IRQ x wake disable
BUG: warning at kernel/irq/manage.c:167/set_irq_wake()
(The original code was debugged before a bug in the genirq wakeup irq
logic was fixed by adding the IRQ wake enable/disable refcounting.
Not all code yet uses the bugfixed model.)
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>
This patch (as835) removes from usb-storage the code which sets all
devices to a SCSI level of at least SCSI-2. The original reasons for
doing this no longer apply, and in fact it prevents certain kinds of
ATA pass-thru commands from being used.
The patch also marks CB and CBI devices that are SCSI-0 (legacy SCSI)
as being single-LUN, since the combined SCSI-over-USB transport
protocol has no way to convey LUN information to these devices.
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>
Isochronous queues don't need a dummy TD because the Queue Header
isn't managed by the hardware. This patch (as836) removes the
unnecessary dummy TDs.
The patch also fixes a long-standing typo in a comment (a "don't" was
missing -- potentially very confusing!).
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as768) improves the debugging checks for the uhci-hcd
frame list. The number of entries displayed is limited to 10, and the
driver now checks for the correct Skeleton QH link value at the end of
each chain of Isochronous TDs. The code to compute these link values
is now used in two spots, so it is moved into its own separate
subroutine.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
I overlooked one. Setting the flag and killing the URBs must be under the lock
so that no URB is submitted after usb_kill_urb()
Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds a new, "binary" API in addition to the old, text API usbmon
had before. The new API allows for less CPU use, and it allows to capture
all data from a packet where old API only captured 32 bytes at most. There
are some limitations and conditions to this, e.g. in case someone constructs
a URB with 1GB of data, it's not likely to be captured, because even the
huge buffers of the new reader are finite. Nonetheless, I expect this new
capability to capture all data for all real life scenarios.
The downside is, a special user mode application is required where cat(1)
worked before. I have sample code at http://people.redhat.com/zaitcev/linux/
and Paolo Abeni is working on patching libpcap.
This patch was initially written by Paolo and later I tweaked it, and
we had a little back-and-forth. So this is a jointly authored patch, but
I am submitting this I am responsible for the bugs.
Signed-off-by: Paolo Abeni <paolo.abeni@email.it>
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Add support for Logitech Momo racing wheel (046d:ca03) to hid force
feedback.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
* '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
...
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
This patch set adds generic abstract layer support for acpi video driver to
have generic user interface to control backlight and output switch control by
leveraging the existing backlight sysfs class driver, and by adding a new
video output sysfs class driver.
This patch:
Add dev argument for backlight_device_register to link the class device to
real device object. The platform specific driver should find a way to get the
real device object for their video device.
[akpm@osdl.org: build fix]
[akpm@osdl.org: fix msi-laptop.c]
Signed-off-by: Luming Yu <Luming.yu@intel.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Let CONFIG_USB_HID imply CONFIG_HID. Making it only dependent might confuse
users to choose CONFIG_HID, but no particular HID transport drivers.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Run this:
#!/bin/sh
for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do
echo "De-casting $f..."
perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f
done
And then go through and reinstate those cases where code is casting pointers
to non-pointers.
And then drop a few hunks which conflicted with outstanding work.
Cc: Russell King <rmk@arm.linux.org.uk>, Ian Molton <spyro@f2s.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Greg KH <greg@kroah.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Paul Fulghum <paulkf@microgate.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Karsten Keil <kkeil@suse.de>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Ian Kent <raven@themaw.net>
Cc: Steven French <sfrench@us.ibm.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Neil Brown <neilb@cse.unsw.edu.au>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
All kcalloc() calls of the form "kcalloc(1,...)" are converted to the
equivalent kzalloc() calls, and a few kcalloc() calls with the incorrect
ordering of the first two arguments are fixed.
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Adam Belay <ambx1@neo.rr.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Greg KH <greg@kroah.com>
Cc: Mark Fasheh <mark.fasheh@oracle.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This modifies Makefiles and Kconfigs to properly reflect the creation of
generic HID layer.
It also removes the dependency of BROKEN, which was introduced by the
first patch in series (see the comment). Also updates credits.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
pb_fnmode parameter has to be passed to usbhid, both for compatibility reasons
and also because it logically belongs there.
Also removes empty hid-input.c file in drivers/usb/input.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
hid_input_report() was needlessly USB-specific in USB HID. This patch
makes the function independent of HID implementation and fixes all
the current users. Bluetooth patches comply with this prototype.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
- hiddev is USB-only (agreed with Marcel Holtmann that Bluetooth currently
doesn't need it, and future planned interface (rawhid) will be more flexible
and usable)
- both HID and USB-hid can be now compiled as modules (wasn't possible before
hiddev was fully separated from generic HID layer)
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
- 'dev' in struct hid_device changed from struct usb_device to
struct device and fixed all the users
- renamed functions which are part of USB HID API from 'hid_*' to
'usbhid_*'
- force feedback initialization moved from common part into USB-specific
driver
- added usbhid.h header for USB HID API users
- removed USB-specific fields from struct hid_device and moved them
to new usbhid_device, which is pointed to by hid_device->driver_data
- fixed all USB users to use this new structure
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The "big main" split of USB HID code into generic HID code and
USB-transport specific HID handling.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch is a part of generic HID layer introduction. USB HID is
disabled, so that the code split and changes could be introduced in a
way that is reviewable (i.e. separate patches), but not to break git
bisect by uncompilable kernel throughout different stages of the code
splitup and changes. The last patch of this series enables HID again.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is the grungy swap all the occurrences in the right places patch that
goes with the updates. At this point we have the same functionality as
before (except that sgttyb() returns speeds not zero) and are ready to
begin turning new stuff on providing nobody reports lots of bugs
If you are a tty driver author converting an out of tree driver the only
impact should be termios->ktermios name changes for the speed/property
setting functions from your upper layers.
If you are implementing your own TCGETS function before then your driver
was broken already and its about to get a whole lot more painful for you so
please fix it 8)
Also fill in c_ispeed/ospeed on init for most devices, although the current
code will do this for you anyway but I'd like eventually to lose that extra
paranoia
[akpm@osdl.org: bluetooth fix]
[mp3@de.ibm.com: sclp fix]
[mp3@de.ibm.com: warning fix for tty3270]
[hugh@veritas.com: fix tty_ioctl powerpc build]
[jdike@addtoit.com: uml: fix ->set_termios declaration]
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Acked-by: Peter Oberparleiter <oberpar@de.ibm.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (76 commits)
[ARM] 4002/1: S3C24XX: leave parent IRQs unmasked
[ARM] 4001/1: S3C24XX: shorten reboot time
[ARM] 3983/2: remove unused argument to __bug()
[ARM] 4000/1: Osiris: add third serial port in
[ARM] 3999/1: RX3715: suspend to RAM support
[ARM] 3998/1: VR1000: LED platform devices
[ARM] 3995/1: iop13xx: add iop13xx support
[ARM] 3968/1: iop13xx: add iop13xx_defconfig
[ARM] Update mach-types
[ARM] Allow gcc to optimise arm_add_memory a little more
[ARM] 3991/1: i.MX/MX1 high resolution time source
[ARM] 3990/1: i.MX/MX1 more precise PLL decode
[ARM] 3986/1: H1940: suspend to RAM support
[ARM] 3985/1: ixp4xx clocksource cleanup
[ARM] 3984/1: ixp4xx/nslu2: Fix disk LED numbering (take 2)
[ARM] 3994/1: ixp23xx: fix handling of pci master aborts
[ARM] 3981/1: sched_clock for PXA2xx
[ARM] 3980/1: extend the ARM Versatile sched_clock implementation from 32 to 63 bit
[ARM] 3979/1: extend the SA11x0 sched_clock implementation from 32 to 63 bit period
[ARM] 3978/1: macro to provide a 63-bit value from a 32-bit hardware counter
...
Move process freezing functions from include/linux/sched.h to freezer.h, so
that modifications to the freezer or the kernel configuration don't require
recompiling just about everything.
[akpm@osdl.org: fix ueagle driver]
Signed-off-by: Nigel Cunningham <nigel@suspend2.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: Linus Torvalds <torvalds@osdl.org>
Replace all uses of kmem_cache_t with struct kmem_cache.
The patch was generated using the following script:
#!/bin/sh
#
# Replace one string by another in all the kernel sources.
#
set -e
for file in `find * -name "*.c" -o -name "*.h"|xargs grep -l $1`; do
quilt add $file
sed -e "1,\$s/$1/$2/g" $file >/tmp/$$
mv /tmp/$$ $file
quilt refresh
done
The script was run like this
sh replace kmem_cache_t "struct kmem_cache"
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
SLAB_DMA is an alias of GFP_DMA. This is the last one so we
remove the leftover comment too.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
SLAB_KERNEL is an alias of GFP_KERNEL.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
SLAB_ATOMIC is an alias of GFP_ATOMIC
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
SLAB_NOIO is an alias of GFP_NOIO with a single instance of use.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Conflicts:
drivers/pcmcia/ds.c
Fix up merge failures with Linus's head and fix new compile failures.
Signed-Off-By: David Howells <dhowells@redhat.com>
Fix up arch-specific work items where possible to use the new work_struct and
delayed_work structs.
Three places that enqueue bits of their stack and then return have been marked
with #error as this is not permitted.
Signed-Off-By: David Howells <dhowells@redhat.com>
Conflicts:
drivers/infiniband/core/iwcm.c
drivers/net/chelsio/cxgb2.c
drivers/net/wireless/bcm43xx/bcm43xx_main.c
drivers/net/wireless/prism54/islpci_eth.c
drivers/usb/core/hub.h
drivers/usb/input/hid-core.c
net/core/netpoll.c
Fix up merge failures with Linus's head and fix new compilation failures.
Signed-Off-By: David Howells <dhowells@redhat.com>
struct pcmcia_device *p_dev->conf.ConfigBase and .Present are set in almost
all PCMICA driver right at the beginning, using the same calls but slightly
different implementations. Unfiy this in the PCMCIA core.
Includes a small bugfix ("drivers/net/pcmcia/xirc2ps_cs.c: remove unused
label") from and Signed-off-by Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (103 commits)
usbcore: remove unused argument in autosuspend
USB: keep count of unsuspended children
USB hub: simplify remote-wakeup handling
USB: struct usb_device: change flag to bitflag
OHCI: make autostop conditional on CONFIG_PM
USB: Add autosuspend support to the hub driver
EHCI: Fix root-hub and port suspend/resume problems
USB: create a new thread for every USB device found during the probe sequence
USB: add driver for the USB debug devices
USB: added dynamic major number for USB endpoints
USB: pegasus error path not resetting task's state
USB: endianness fix for asix.c
USB: build the appledisplay driver
USB serial: replace kmalloc+memset with kzalloc
USB: hid-core: canonical defines for Apple USB device IDs
USB: idmouse cleanup
USB: make drivers/usb/core/driver.c:usb_device_match() static
USB: lh7a40x_udc remove double declaration
USB: pxa2xx_udc recognizes ixp425 rev b0 chip
usbtouchscreen: add support for DMC TSC-10/25 devices
...
Thanks to several earlier patches, usb_autosuspend_device() and
usb_autoresume_device() are never called with a second argument other
than 1. This patch (as819) removes the now-redundant argument.
It also consolidates some common code between those two routines,
putting it into a new subroutine called usb_autopm_do_device(). And
it includes a sizable kerneldoc update for the affected functions.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as818b) simplifies autosuspend processing by keeping track
of the number of unsuspended children of each USB hub. This will
permit us to avoid a good deal of unnecessary work all the time; we
will no longer have to create a bunch of workqueue entries to carry
out autosuspend requests, only to have them fail because one of the
hub's children isn't suspended.
The basic idea is simple. There already is a usage counter in the
usb_device structure for preventing autosuspends. The patch just
increments that counter for every unsuspended child. There's only one
tricky part: When a device disconnects we need to remember whether it
was suspended at the time (leave the counter alone) or not (decrement
the counter).
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as817) simplifies the remote-wakeup processing in the hub
driver. Now instead of using a specialized code path, it relies on
the standard USB resume routines. The hub_port_resume() function does
an initial get_port_status() to see whether the port has already
resumed itself (as it does when a remote-wakeup request is sent).
This will slow down handling of other resume events slightly, but not
enough to matter.
The patch also changes the hub_port_status() routine, making it return
an error if a short reply is received.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as816) changes an existing flag in the usb_device
structure to a bitflag, preparing the way for more bitflags to come
in the future.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Unlike UHCI, OHCI does not exert any DMA load on the system when no
devices are connected. Consequently there is no advantage to doing
an autostop other than the power savings, so we shouldn't compile the
necessary code unless CONFIG_PM is enabled.
This patch (as820) makes the root-hub suspend and resume routines
conditional on CONFIG_PM. It also prevents autostop from activating
if the device_may_wakeup flag isn't set; some people use this flag to
alert the driver about Resume-Detect bugs in the hardware.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as742b) adds autosuspend/autoresume support to the USB hub
driver. The largest aspect of the change is that we no longer need a
special flag for root hubs that want to be resumed. Now every hub is
autoresumed whenever khubd needs to access it.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as738b) fixes numerous problems in the controller/root-hub
suspend/resume/remote-wakeup support in ehci-hcd:
The bus_resume() routine should wake up only the ports that
were suspended by bus_suspend(). Ports that were already
suspended should remain that way.
The interrupt mask is used to detect loss of power in the
bus_resume() routine (if the mask is 0 then power was lost).
However bus_suspend() always sets the mask to 0. Instead the
mask should retain its normal value, with port-change-detect
interrupts disabled if remote wakeup is turned off.
The interrupt mask should be reset to its correct value at the
end of bus_resume() regardless of whether power was lost.
bus_resume() reinitializes the operational registers if power
was lost. However those registers are not in the aux power
well, hence they can lose their values whenever the controller
is put into D3. They should always be reinitialized.
When a port-change interrupt occurs and the root hub is
suspended, the interrupt handler should request a root-hub
resume instead of starting up the controller all by itself.
There's no need for the interrupt handler to request a
root-hub resume every time a suspended port sends a
remote-wakeup request.
The pci_resume() method doesn't need to check for connected
ports when deciding whether or not to reset the controller.
It can make that decision based on whether Vaux power was
maintained.
Even when the controller does not need to be reset,
pci_resume() must undo the effect of pci_suspend() by
re-enabling the interrupt mask.
If power was lost, pci_resume() must not call ehci_run().
At this point the root hub is still supposed to be suspended,
not running. It's enough to rewrite the command register and
set the configured_flag.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Might speed up some systems. If nothing else, a bad driver should not
take the whole USB subsystem down with it.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch is an update for Greg K-H's proposed usbfs2:
http://sourceforge.net/mailarchive/message.php?msg_id=19295229
It creates a dynamic major for USB endpoints and fixes
the endpoint minor calculation.
Signed-off-by: Sarah Bailey <saharabeara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
there is an error path in the pegasus driver which can leave
the task in TASK_UNINTERRUPTIBLE. Depending on when it
schedules next, this can be bad.
Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
the latest update for asix.c reverted some endianness fixes. This
reinstates them.
Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
We do already have both the code and a config option, so why not build
this driver? ;-)
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Use canonical defines for the Apple USB device IDs.
Also add the Geyser IV devices missing in my previous patch.
Signed-off-by: Julien BLACHE <jb@jblache.org>
Acked-by: Dmitry Torokhov <dtor@insightbb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Just digging through code and found these needless variable initializations. So here is the patch.
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Make the pxa2xx_udc driver recognize a newer revision of the IXP425 chip.
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>
Adds support for the DMC TSC-10 and TSC-25 usb touchscreen controllers.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch contains the following possible cleanups:
- make the needlessly global ftdi_release_platform_dev() static
- remove the unused usb_ftdi_elan_read_reg()
- proper prototypes for the following functions:
- usb_ftdi_elan_read_pcimem()
- usb_ftdi_elan_write_pcimem()
Note that the misplaced prototypes for the latter ones in
drivers/usb/host/u132-hcd.c were buggy. Depending on the calling
convention of the architecture calling one of them could have turned
your stack into garbage.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch makes the needlessly global "u132_hcd_wait" static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
If at some point cypress_init() fails deregister
only the resources that were registered until that point.
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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 spam 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.
Note that the bulk of these reports seem to be with VIA southbridges, but
I think some were with Intel ones.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
EHCI hooks for high speed electrical tests of the root hub ports.
The expectation is that a usermode program actually triggers the test,
making the same control request it would make for an external hub.
Tests for peripheral upstream ports would issue a different request.
In all cases, the hardware needs re-initialization before it could
be used "normally" again (e.g. unplug/replug, rmmod/modprobe).
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The net2280 driver is too eager to send zero-length packets when
IN tokens are received on ep0. No such packet should be sent (the
driver should NAK) before the gadget driver has queued the proper
response. Otherwise deferred responses are impossible.
This patch (as823) makes net2280 avoid sending ZLPs for IN transfers
on ep0 until a response has been submitted, and avoids stalling when an
OUT packet is received before a request has been submitted for an OUT
transfer on ep0.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Possible memleak fix on error path. The changes:
- out_kfree2 and out_free_urb replaced
- missing scsi_host_put() added
Here it goes:
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The mass storage device from Digitech designed for Flash Cards, as found
on (for example) the GNX4 device has issues with residue, similar to the
bug report at http://kerneltrap.org/node/6297. This patch adds the
faulty storage device to unusual_devs.h, this not only reduces the noise
in dmesg but also increases the transfer speeds by a factor of 7x for me
(89kB/s -> 637kB/s).
T: Bus=02 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#= 4 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1210 ProdID=0003 Rev= 1.00
S: Manufacturer=DigiTech HMG
S: Product=DigiTech Mass Storage
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50
Driver=usb-storage
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
Signed-off-by: Jaco Kroon <jaco@kroon.co.za>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as821) fixes a compiler warning when CONFIG_PM isn't on
("usb_autosuspend_work" defined but not used).
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> 2006/11/11, Adrian Bunk <bunk@stusta.de>:
> > The Coverity checker spotted the following in
> > drivers/usb/serial/aircable.c:
> >
> > <-- snip -->
> >
> > ...
> > static void aircable_read(void *params)
> > {
> > ...
Hi everyone,
Sorry for the long time response but here is the patch, I think this way should
work, if anyone has any suggestion let me know. What I do now is, in case I
don't have the tty available I reschedule the work, I have tried it and it
works with no problem, I even tried removing the device, and didn't find
anything strange.
Signed-off-by: Naranjo Manuel <naranjo.manuel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
All the other root-hub suspend or resume log messages, in ohci-hcd or
any of the other host controller drivers, use the debug priority
level. This patch (as815) makes the one single exception behave like
all the rest.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch makes the needlessly global wacom_sys_irq() static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Several functions in USB core overlap with global functions.
The linker appears to do the right thing, but it is bad practice and makes
debugging harder.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Minor cleanup/clarification in the ethernet gadget driver, using standard
calls to test for Ethernet multicast and broadcast addresses.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as809b) moves the declaration of the hub driver's private
data structure from hub.h into the hub.c source file. Lots of other
files import hub.h; they have no need to know about the details of the
hub driver's private data.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fix STATUS_PACKETS_* macros, where "&&" was mistakenly used where
"&" should have.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as814) adds usb_autopm_set_interface() to the autosuspend
API. It also provides convenient wrapper routines,
usb_autopm_enable() and usb_autopm_disable(), for drivers that want
to specify directly whether autosuspend should be allowed.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as813) gathers together common code for USB interface
autosuspend/autoresume.
It also adds some simple checking at the time an autosuspend request
is made, to see whether the request will fail. This way we don't
add a workqueue entry when it would end up doing nothing.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
We have no benefits of having the usb_endpoint_* functions as functions,
but making them inline saves text and data segment sizes:
text data bss dec hex filename
14893634 3108770 1108840 19111244 1239d4c vmlinux.func
14893185 3108566 1108840 19110591 1239abf vmlinux.inline
This is the result of a 2.6.19-rc3 kernel compiled with GCC 4.1.1 without
CONFIG_MODULES, CONFIG_CC_OPTIMIZE_FOR_SIZE, CONFIG_REGPARM options set.
USB support is fully enabled (while most of the other drivers are not),
and that kernel has most of the USB code ported to use the endpoint
functions.
That happens because a call to those functions are expensive (in terms
of bytes), while the function's size is smaller or have the same 'size' of
the call.
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as811) removes some stale testing code from the root-hub
resume routine in ohci-hcd. It also adds a spin_lock_irq() call that
inadvertently got left out of an error pathway.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
replace open coded kmemdup() to save some screen space,
and allow inlining/not inlining to be triggered by gcc.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as808b) moves the Root Hub Status Change interrupt-disable
code in ohci-hcd back into the interrupt handler proper, to avoid the
chance of adverse interactions with mediocre hardware implementations.
It also deletes the root-hub status timer from within the interrupt-enable
routine. There's no need to poll for status any more once interrupts are
re-enabled.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as806) fixes a compiler warning when ohci-hcd is built
with CONFIG_PM turned off.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as804) makes USB driver matching ignore the interface
class, subclass, and protocol if the device class is Vendor Specific.
Drivers can override this policy by specifying a Vendor ID as part
of the match; then vendor-specific matches are allowed.
Linus Walleij has reported a problem this patch fixes. When a
particular mass-storage device is switched from mass-storage mode to
Media Transfer Protocol, the interface class remains set to mass-storage
and usb-storage binds to it erroneously, even though the device class
changes to Vendor-Specific.
This may cause a problem for some drivers until their match records can
be updated to include Vendor IDs. But if it does, then those records
were broken to begin with.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The USB HID driver doesn't include any code to handle a STALL on the
interrupt endpoint. While this may be uncommon, it does happen
sometimes. This patch (as805) adds a fix.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Wireless USB Host Controllers accept a large number of devices per
host, which shows up as a large number of ports in its root hub.
When the number of ports in a hub device goes over 16, the activation
of the hub fails with the cryptic message in klogd.
hub 2-0:1.0: activate --> -22
Following this further, it was seen that:
hub_probe()
hub_configure()
generates pipe number
pseudo allocates buffer 'maxp' bytes in size using usb_maxpacket()
The endpoint descriptor for a root hub interrupt endpoint is
declared in
drivers/usb/core/hcd.c:hs_rh_config_descriptor and declares it
to be size two (supporting 15 devices max).
hub_activate()
usb_hcd_submit_urb()
rh_urb_enqueue()
urb->pipe is neither int nor ctl, so it errors out
rh_queue_status()
Returns -EINVAL because the buffer length is smaller
than the minimum needed to report all the hub port
bits as in accordance with USB2.0[11.12.3]. There has
to be trunc((PORTS + 1 + 7) / 8) bytes of space at
least.
Alan Stern confirmed that the reason for reading maxpktsize and not
the right amount is because some hubs are known to return more data
and thus cause overflow.
So this patch simply changes the code to make the interrupt endpoint's
max packet size be at least the minimum required by USB_MAXCHILDREN
(instead of a fixed magic number) and add documentation for that. This
way we are always ahead of the limit.
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Current Wireless USB host hardware (Intel i1480 for example) allows up
to 22 devices to connect, thus bringing up the max number of children
in the WUSB Host Controller to 22 'fake' ports. Upcoming hardware
might raise that limit.
Makes almost no difference to go to 31, as the bit arrays are
byte-aligned (plus an extra bit in general), so 22 bits fit in 4 bytes
as 31 do.
As well, the only other array that depends on USB_MAXCHILDREN is
'struct usb_hub->indicator'. By declaring it 'u8' instead of 'enum
hub_led_mode', we reduce the size of each entry from 4 bytes (in i386)
to 1, which will add as we when are doubling USB_MAXCHILDREN
(with 16 the size of that array is 64 bytes, with 31 would be 128; by
using u8 that goes down to 31 bytes).
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
A number of configuration file changes.
These are mainly to replace references to ARCH_AT91RM9200 and
ARCH_AT91SAM9261 with the common/generic ARCH_AT91. That way we don't
need to mention every specific AT91 processor explicitly.
Also adds the configuration option for AT91SAM9260-EK and AT91SAM9261-EK
boards.
Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Fix various .c/.h typos in comments (no code changes).
Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Fix various Kconfig typos.
Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
This is a bug. When checking for ati_remote->outbuf we free freeing
ati_remote->inbuf so we end up freeing ati_remote->inbuf twice.
Also the checks for 'ati_remote->inbuf != NULL' and 'ati_remote->outbuf !=
NULL' are redundant as usb_buffer_free() does this.
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Acked-by: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Small readability improvement for appletouch: use canonical names
instead of raw USB IDs for some of the devices.
Signed-off-by: Julien BLACHE <jb@jblache.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The new Core2 Duo MacBook Pro has a new keyboard+trackpad named
"Geyser IV".
According to the Info.plist in the OS X kext, it looks like the Geyser
IV trackpad is identical to the Geyser III trackpad: same IOClass
(AppleUSBGrIIITrackpad), same acceleration tables.
Signed-off-by: Julien BLACHE <jb@jblache.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Change a bit the finger detection method used by the appletouch
driver to reduce touchpad "jumpiness":
- Adjust the method for detecting multiple fingers. Previously, it
recognized a new finger when a low sensor reading is followed by
a high sensor reading. The new method checks for 'humps' in the
sensor readings, so there doesn't necessarily have to be a low
sensor between two high sensors for two fingers to be triggered.
This allows detecting presence of two fingers on the touchpad
even when they touch each other.
- Change absolute coordinate calculation to us to get rid of "jumps".
Instead of using full value from a sensor once it passes the
threshold subtract theshold value from the reading.
- Allow adjusting threshold value via module parameter.
The patch doesn't seem to affect the Powerbooks but does greatly improve
the touchpad behaviour on the MacBooks.
Signed-off-by: Jason Parekh <jasonparekh@gmail.com>
Signed-off-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Adds support for HTC Smart Phones in modem mode (as opposed to sync
mode). Loads and works with pppd on my T-Mobile SDA.
Signed-off-by: Alex Sanks <alex@sanks.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
usb_get_device_descriptor() used to convert several descriptor fields to host
CPU's byte order. Now that it doesn't convert them anymore, update the
documentation to reflect this.
Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
For some reason the unusual_devs.h entry for Sony Ericsson P990i had
three identical copies in a wrong place in the file in addition to the
correct entry.
Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The new Core2 Duo MacBook Pro have a new keyboard+trackpad device.
The following patch adds the needed HID quirk for the Fn key.
Signed-off-by: Julien BLACHE <jb@jblache.org>
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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>
similar to the version in adbhid_input_register(): The '<>' key and the
'^°' key on a german keyboard is swapped. Provide correct keys to
userland, external USB keyboards will not work correctly when the
'badmap'/'goodmap' workarounds from xkeyboard-config are used.
It is expected that distributions drop the badmap/goodmap part from
keycodes/macintosh in the xkeyboard-config package.
This is probably 2.6.18.x material, if major distros settle on 2.6.18.
Signed-off-by: Olaf Hering <olh@suse.de>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
When a suspended OHCI controller sees a port's status change, it sets
both the Root-Hub-Status-Change and the Resume-Detect bits in the
Interrupt Status register. Processing both these bits, the driver
tries to resume the root hub twice!
This patch (as807) fixes the bug by ignoring RD if RHSC is set. It
also prints a slightly more informative log message when a
remote-wakeup event occurs.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Recently this entry's bcd scope was narrowed so as not to falsly apply
to bcd's other than 0x0110. But while it breaks those of a larger bcd,
it is still needed for those of a smaller bcd - so this changes the
lower bcd limit to 0x0000.
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Please add a usb pid to the ftdi_sio driver. The pid is used by dmx4all
dmx-interfaces (for stage lighting).
The interfaces are using the usb-id 0403:c850. I added the id to the driver
and it works perfectly. I added a patch for linux 2.6.18.1, too.
From: Frank Sievertsen <frank@sievertsen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Adds the vendor and prodcut id for a RFID construction kit from the
Elektor Electronics magazine, september 2006.
From: Kjell Myksvoll <kmyksvo@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as822) prevents the OHCI autostop mechanism from kicking in
if the root hub is not able or not allowed to issue wakeup requests.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Logitech USB Receiver (046d:c101) has two interfaces. The first one
contains fields from HID_UP_KEYBOARD and HID_UP_LED, and the other one
contains fields from HID_UP_CONSUMER and HID_UP_LOGIVENDOR. This device
is used with multiple wireless Logitech products, including UltraX Media
Remote.
All fields on both interfaces are either keys or leds. All fields in the
first interface are marked as Absolute, while the fields in the second
interface are marked as Relative. Marking the keys as relative causes
hidinput_hid_event() to send release events right after key press
events.
The device has EV_REP set, so the userspace expects the device to send
repeat events if a key is held down. However, as hidinput_hid_event()
sends release events immediately, repeat events are not sent at all. In
fact, the userspace has no way of knowing if a key is being held down.
Fix this by adding a quirk for 046d:c101 which changes relative keys to
absolute ones.
Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Fix mcs7830 patch
The recent mcs7830 update to make the MII support sharable goofed various
pre-existing configurations in two ways:
- it made the usbnet infrastructure reference MII symbols even
when they're not needed in the kernel being built
- it didn't enable MII along with the mcs7830 minidriver
This patch fixes these two problems.
However, there does seem to be a Kconfig reverse dependency bug in that MII
gets wrongly enabled in some cases (like USBNET=y and USBNET_MII=n); I think
I've noticed that same problem in other situations too. So the result can
mean kernels being bloated by stuff that's needlessly enabled ... better
than wrongly being disabled, but contributing to bloat.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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>
Adding additional USB vendor/product ID's for XBOX pads provided by the
XBOX Linux team.
Signed-off-by: Dominic Cerquetti <binary1230@yahoo.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Remove complaint from newer GCCs; they don't like forward function
declarations except in top-level contexts.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch add AIRcable USBto USB-HID blacklist, makes some little
changes things in the Kconfig to make AIRcable USB look as all the rest
of drivers. And it removes the readme part that was on
Documentation/usb/usb-serial.txt because it is not needed anymore.
Signed-off-by: Naranjo Manuel Francisco <naranjo.manuel@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
this has been confirmed to fix suspend problems with usblp.
Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if urb submission fails due to a transient error here eg. ENOMEM
, the driver is dead. This fixes it.
Regards
Oliver
Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
use the endpoint address from the endpoint descriptor instead of the hardcoding
it to 0x81. at least some ITM based screen use a different address and don't work
without this.
Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Cc: Ralf Lehmann <ralf@lehmann.cc>
Cc: J.P. Delport <jpdelport@csir.co.za>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The new version of sierra.c has introduced tables for the 1 port and 3
port variants. The device id i added in my last patch needs to be added
to the 3 port table.
Signed-off-by: Jan Luebbe <jluebbe@lasnet.de>
Cc: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
3 new VID/PID combinations (registered with Silicon Laboratories Inc.)
added for devices made by Lipowsky Industrie Elektronik GmbH all using
the CP2102 usb-to-serial converter (Baby-JTAG, Baby-LIN, HARP-1).
Signed-off-by: Bjorn Schneider <schneider@lipowsky.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Adam Kropelin had posted 32-bit fix in June 2005 about two weeks after I
originally had posted my fixes for big endian support. Adam has a UPS
device which reports LINEV using 32-bits.
Added comments to describe the limitations of the code.
extract() is the same version I posted earlier and tested in user space.
Made similar changes to implement() routine. I've written (and will
shortly post) a test for implement(). Code tested on C3600 (parisc) with
USB keyboard/mouse attached.
I've dropped test_implement.c and a few other user space test programs on
http://iou.parisc-linux.org/~grundler/tests/
-rw-r--r-- 1 grundler grundler 1750 Oct 18 09:13 test_extract.c
-rw-r--r-- 1 grundler grundler 561 Jan 25 2006 test_ffs.c
-rw-r--r-- 1 grundler users 7175 Apr 8 2005 test_fls.c
-rw-r--r-- 1 grundler grundler 206 Sep 1 15:52 test_gettimeofday.c
-rw-r--r-- 1 grundler grundler 1886 Oct 19 09:20 test_implement.c
-rw-r--r-- 1 grundler users 2707 Jun 4 2005 test_unaligned.c
I would appreciate if someone else would look at the output of
test_implement.c to make it does The Right Thing.
Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Dmitry Torokhov <dtor@mail.ru>
Acked-By: Adam Kropelin <akropel1@rochester.rr.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The protocol in this entry is needed for some versions of the device but
not others. This adds the NEED_OVERRIDE flag to prevent it complaining
to users who don't need it.
Signed-off-by: Phil Dibowitz <phil@ipom.com>
As reported by Peter Kucmeroski and Jason Ganovsky.
Cc: Peter Kucmeroski <PKucmeroski@novell.com>
Cc: Jason Ganovsky <JGanovsky@novell.com>
Cc: Kevin Lloyd <klloyd@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This was apparently missed by the move to the generic IRQ code.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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>
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>
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>
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>