Archived
14
0
Fork 0
Commit graph

1776 commits

Author SHA1 Message Date
Richard Purdie
dfcba20067 backlight: Remove unneeded owner field
Remove uneeded owner field from backlight_properties structure.

Nothing uses it and it is unlikely that it will ever be used. The
backlight class uses other means to ensure that nothing references
unloaded code.

Based on a patch from Dmitry Torokhov <dtor@insightbb.com>

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-02-20 08:37:40 +00:00
Linus Torvalds
d43a338e39 Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/dtor/input:
  Input: remove obsolete setup parameters from input drivers
  Input: HIL - fix improper call to release_region()
  Input: hid-lgff - treat devices as joysticks unless told otherwise
  Input: HID - add support for Logitech Formula Force EX
  Input: gpio-keys - switch to common GPIO API
  Input: do not lock device when showing name, phys and uniq
  Input: i8042 - let serio bus suspend ports
  Input: psmouse - properly reset mouse on shutdown/suspend
2007-02-19 13:31:34 -08:00
Linus Torvalds
874ff01bd9 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (25 commits)
  Documentation/kernel-docs.txt update.
  arch/cris: typo in KERN_INFO
  Storage class should be before const qualifier
  kernel/printk.c: comment fix
  update I/O sched Kconfig help texts - CFQ is now default, not AS.
  Remove duplicate listing of Cris arch from README
  kbuild: more doc. cleanups
  doc: make doc. for maxcpus= more visible
  drivers/net/eexpress.c: remove duplicate comment
  add a help text for BLK_DEV_GENERIC
  correct a dead URL in the IP_MULTICAST help text
  fix the BAYCOM_SER_HDX help text
  fix SCSI_SCAN_ASYNC help text
  trivial documentation patch for platform.txt
  Fix typos concerning hierarchy
  Fix comment typo "spin_lock_irqrestore".
  Fix misspellings of "agressive".
  drivers/scsi/a100u2w.c: trivial typo patch
  Correct trivial typo in log2.h.
  Remove useless FIND_FIRST_BIT() macro from cardbus.c.
  ...
2007-02-19 13:29:02 -08:00
Linus Torvalds
59b8175c77 Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (117 commits)
  [ARM] 4058/2: iop32x: set ->broken_parity_status on n2100 onboard r8169 ports
  [ARM] 4140/1: AACI stability add ac97 timeout and retries
  [ARM] 4139/1: AACI record support
  [ARM] 4138/1: AACI: multiple channel support for IRQ handling
  [ARM] 4211/1: Provide a defconfig for ns9xxx
  [ARM] 4210/1: base for new machine type "NetSilicon NS9360"
  [ARM] 4222/1: S3C2443: Remove reference to missing S3C2443_PM
  [ARM] 4221/1: S3C2443: DMA support
  [ARM] 4220/1: S3C24XX: DMA system initialised from sysdev
  [ARM] 4219/1: S3C2443: DMA source definitions
  [ARM] 4218/1: S3C2412: fix CONFIG_CPU_S3C2412_ONLY wrt to S3C2443
  [ARM] 4217/1: S3C24XX: remove the dma channel show at startup
  [ARM] 4090/2: avoid clash between PXA and SA1111 defines
  [ARM] 4216/1: add .gitignore entries for ARM specific files
  [ARM] 4214/2: S3C2410: Add Armzone QT2410
  [ARM] 4215/1: s3c2410 usb device:  per-platform vbus_draw
  [ARM] 4213/1: S3C2410 - Update definition of ADCTSC_XY_PST
  [ARM] 4098/1: ARM: rtc_lock only used with rtc_cmos
  [ARM] 4137/1: Add kexec support
  [ARM] 4201/1: SMP barriers pair needed for the secondary boot process
  ...

Fix up conflict due to typedef removal in sound/arm/aaci.h
2007-02-19 13:18:39 -08:00
Linus Torvalds
460223d21d Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (39 commits)
  USB: at91-ohci, handle extra at91sam9261 ahb clock
  USB: another id for cp2101 driver
  USB: ueagle-atm.c needs sched.h
  USB: at91_udc, shrink runtime footprint
  usbnet: add missing Kconfig for KC2190 cables
  usbnet: init fault (oops) cleanup, whitespace fixes
  usbnet: recognize SiteCom CN-124
  usb: Remove Airprime device from option.c
  USB: change __init to __devinit for isp116x_probe
  USB: ps3: don't call ps3_system_bus_driver_register on other platforms
  USB: hid-core.c: Removes GTCO CalComp Interwrite IPanel PIDs from blacklist
  USB: kernel-doc fixes
  USB: quirky device for cdc-acm
  USB: cdc-acm: fix incorrect throtteling, make set_control optional
  USB: unconfigure devices which have config 0
  USB: make usb_iso_packet_descriptor.status signed
  USB: fix g_serial small error
  USB: use __u32 rather than u32 in userspace ioctls in usbdevice_fs.h
  USB Storage: US_FL_IGNORE_RESIDUE needed for Aiptek MP3 Player
  USB: Fix misspelled "USBNET_MII" kernel config option.
  ...
2007-02-19 12:59:04 -08:00
Dmitry Torokhov
00a8691ca6 Input: hid-lgff - treat devices as joysticks unless told otherwise
By default threat devices as joysticks with constant force-feedback
effect.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-02-18 01:42:11 -05:00
Valentin Zagura
130b1ab3f3 Input: HID - add support for Logitech Formula Force EX
Signed-off-by: Johann Deneux <johann.deneux@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-02-18 01:41:27 -05:00
Russell King
f69eda00d4 Merge AT91, EP93xx, General devel, PXA, S3C, V6+ and Xscale trees 2007-02-17 20:09:53 +00:00
Robert P. J. Day
405ae7d381 Replace remaining references to "driverfs" with "sysfs".
Globally, s/driverfs/sysfs/g.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-02-17 19:13:42 +01:00
Len Brown
81450b73dd Pull misc-for-upstream into release branch
Conflicts:

	drivers/usb/misc/appledisplay.c

Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16 18:52:41 -05:00
Andrew Victor
ed077bb714 USB: at91-ohci, handle extra at91sam9261 ahb clock
The AT91SAM9261 needs to activate an AHB clock (HCK0) to use the USB Host
controller. Previously clock.c would just enable it at startup, but now
all the unused clocks are automatically disabled.

Based on patch from Nicolas Ferre.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:24 -08:00
Pozsar Balazs
ebaf494e2a USB: another id for cp2101 driver
This patch adds another usb id to the cp2101. It seems to work well.

Please apply, thanks.

Signed-off-by: Pozsar Balazs <pozsy@uhulinux.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:23 -08:00
Randy Dunlap
5371f80a9b USB: ueagle-atm.c needs sched.h
Driver needs sched.h for try_to_freeze().

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:23 -08:00
David Brownell
398acce7af USB: at91_udc, shrink runtime footprint
This is a runtime codespace shrink:  in most cases, platform devices should
put probe() should in the init section, and remove() in the exit section.
And I have no idea why the module init/exit routines were mismarked.
It also moves one function table into read-only data.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:23 -08:00
David Brownell
691895c661 usbnet: add missing Kconfig for KC2190 cables
Hmm, I noticed that support for one of the USB host-to-host cables
never got fully merged ... Kconfig wouldn't show it!  Fixed.

Also, changed the CDC Subset default to 'y' so that more of these
cables will work out-of-the-box.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:22 -08:00
David Brownell
cb1cebbee6 usbnet: init fault (oops) cleanup, whitespace fixes
This cleans up some error handling paths in usbnet device probing;
one of them could cause oopsing, e.g. with some RNDIS devices.

It also removes some extraneous whitespace.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:22 -08:00
David Brownell
6e91f527cd usbnet: recognize SiteCom CN-124
Add Sitecom CN-124 device IDs to ALI M5632 usb host-to-host cable;
device IDs from Francois Barre <francois.barre@gmail.com>

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:22 -08:00
Kevin Lloyd
6160beb5bf usb: Remove Airprime device from option.c
from: Kevin Lloyd <linux@sierrawireless.com>

This patch removes the Airprime 5220 device (branded as Audiovox) from
the option.c driver. This device is already supported by the sierra.c
driver.

This was based off of the option.c driver found in kernel 2.6.20-git11.

Signed-off-by: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:22 -08:00
Prarit Bhargava
5bcd70eba7 USB: change __init to __devinit for isp116x_probe
Change __init to __devinit for isp116x_probe.

Resolves MODPOST warning:

WARNING: drivers/usb/host/isp116x-hcd.o - Section mismatch: reference to
.init.text:isp116x_probe from .data.rel.local between 'isp116x_driver' (at
offset 0x0) and 'isp116x_hc_driver'

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:22 -08:00
Ishizaki Kou
48fda45120 USB: ps3: don't call ps3_system_bus_driver_register on other platforms
ps3_system_bus_driver_register is PS3 platform specific function.
On other platforms, it triggers WARN_ON in kref_get.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:22 -08:00
Jeremy Roberson
7426fa8081 USB: hid-core.c: Removes GTCO CalComp Interwrite IPanel PIDs from blacklist
Removes our GTCO CalComp Interwrite IPanels from the hid-core.c blacklist
because the HID Driver properly handles them.

Signed-off-by: Jeremy A. Roberson <jroberson@gtcocalcomp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:22 -08:00
Randy Dunlap
892705a1e1 USB: kernel-doc fixes
Fix kernel-doc warnings and in USB core.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:21 -08:00
Oliver Neukum
9be8456c00 USB: quirky device for cdc-acm
here's a quirklist entry reported by Stephen Murphy.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:21 -08:00
Oliver Neukum
ca79b7b415 USB: cdc-acm: fix incorrect throtteling, make set_control optional
this is Joris' fixes reshuffelled and features renamed as David requested.

- acm_set_control is not mandatory, honour that
- throtteling is reset upon open
- throtteling is read consistently when processing input data

Signed-off-by: Joris van Rantwijk <jorispubl@xs4all.nl>
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:21 -08:00
Alan Stern
3f141e2aed USB: unconfigure devices which have config 0
Some USB devices do have a configuration 0, in contravention of the
USB spec.  Normally 0 is supposed to indicate that a device is
unconfigured.

While we can't change what the device is doing, we can change usbcore.
This patch (as852) allows usb_set_configuration() to accept a config
value of -1 as indicating that the device should be unconfigured.  The
request actually sent to the device will still contain 0 as the value.
But even if the device does have a configuration 0, dev->actconfig
will be set to NULL and dev->state will be set to USB_STATE_ADDRESS.

Without some sort of special-case handling like this, there is no way
to unconfigure these non-compliant devices.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:21 -08:00
Bryan O'Donoghue
8356f3113d USB: fix g_serial small error
A SET_LINE_CODING control request should return a zero length packet
as an ACK to the host, during the status phase of a USB transaction.

The return value of gs_setup_class() is treated as the number of
bytes to write in the status phase of the control request, by
gs_setup(). For this case, the value returned by gs_setup_class should
be zero for SET_LINE_CODING but, right now, appears to be
sizeof(struct usb_cdc_line_coding).

However, if after doing the memcpy of the line coding descriptor we
set the variable "ret" to be zero, we should return the appropiate ZLP
to the host as an ACK in the status phase of the control request.
I've tested this out using Linux as both host and slave and confirmed
that the following small change fixes the spurious return of
sizeof(struct usb_cdc_line_coding)/wLength bytes in the status phase
of a USB_CDC_REQ_SET_LINE_CODING request. It's not a huge bug but, it
is worth fixing.

Signed-off-by: Bryan O'Donoghue <bodonoghue@codehermit.ie>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:20 -08:00
Dylan Taft
a7e555b699 USB Storage: US_FL_IGNORE_RESIDUE needed for Aiptek MP3 Player
Device will not work as a mass storage device without US_FL_IGNORE_RESIDUE.

I bought this mp3 player that takes SD cards here

http://www.aiptek.com/Merchant2/merchant.mvc?Screen=PROD&Product_Code=AX4&Category_Code=MP3&Store_Code=AS

I can provide the errors in dmesg, if necessary, but this flag was
determined as necessary by doing a quick google on the errors that were
shown in dmesg.

Signed-off-by: Dylan Taft <d13f00l@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:20 -08:00
Robert P. J. Day
0207c808d0 USB: Fix misspelled "USBNET_MII" kernel config option.
Fix the misspelling of "USBNET_MII" to "USB_USBNET_MII".

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:20 -08:00
Zheng XiaoJun
3f9b4076f7 USB: input: HID: add CIDC USB device to HID blacklist
Add CIDC USB device to HID blacklist since it is actually a USB token
and has its own driver.

Signed-off-by: Zheng XiaoJun <zhengxiaojun@hsic.com.cn>
Cc: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:20 -08:00
Adrian Bunk
d0b4e31093 USB: USB_RTL8150 must select MII
USB_RTL8150 must select MII to avoid link errors.

Stolen from a patch by Randy Dunlap.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:20 -08:00
Oliver Neukum
61bf54b71d USB Storage: indistinguishable devices with broken and unbroken firmware
there's a USB mass storage device which exists in two version. One
reports the correct size and the other does not. Apart from that they
are identical and cannot be told apart. Here's a heuristic based on the
empirical finding that drives have even sizes.


Signed-off-by: Oliver Neukum <oneukum@suse.de>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:19 -08:00
Oliver Neukum
5b06470816 USB: fix autosuspend race in skeleton driver
as the skeleton driver was made ready for autosuspend a race condition
was introduced. The reference to get device must be gotten before the
autosuspend counter is upped, as this operation may sleep, dropping BKL.
Dropping BKL means that the pointer to the device may become invalid.
Here's the fix.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:19 -08:00
David Hollis
57e4f041bf USB: asix - Fix endian issues in asix_tx_fixup()
The attached patch fixes endian issues in asix_tx_fixup() that prevented
AX88772 and AX88178 devices from working on big-endian systems.  With
the attached patch, all three chips are reported to work on big endian.

Signed-off-by: David Hollis <dhollis@davehollis.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:19 -08:00
Alan Stern
db90e7a15c USB: fix concurrent buffer access in the hub driver
This patch (as849) fixes a bug in the USB hub driver.  A single
pre-allocated buffer is used for all port status reads, but nothing
guarantees exclusive use of the buffer.  A mutex is added to provide
this guarantee.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:19 -08:00
Pete Zaitcev
af59cf404f USB: Fix error cleanup path in airprime
Fix up the error processing path: in usb_submit_urb failed, we forgot
to free buffers. Also, don't free buffers in read callback: less error
prone, 21 LOC less, no need to comment so much. N.B. write path is ok
to do kfree.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:18 -08:00
Alan Stern
8c774fe8a0 EHCI: add debugging message to ehci_bus_suspend
This patch (as848) adds a useful little debugging message to let us
know when ehci-hcd's bus_suspend method runs.  The other HCDs have
similar messages; now ehci-hcd doesn't need to feel left out.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:18 -08:00
Alan Stern
12f1ff8351 usbcore: small changes to hub driver's suspend method
This patch (as847) makes some small changes to the hub driver's
suspend method:

	For root hubs, the status URB should be unlinked and other
	activity stopped _before_ the bus_suspend method is called.

	The test for hdev->bus being NULL has been removed, since
	it can never succeed.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:18 -08:00
Robert P. J. Day
7fe89e9cc8 USB: Fix apparent typo CONFIG_USB_CDCETHER.
Replace the apparent typo CONFIG_USB_CDCETHER with
CONFIG_USB_NET_CDCETHER.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:18 -08:00
Joris van Rantwijk
253ca92328 USB: add flow control to usb-serial generic driver.
I added two fields to struct usb_serial_port to keep track of the
throttle state. Other usb-serial drivers typically use private data for
such things, but the generic driver can not really do that because some
of its code is also used by other drivers (which may have their own
private data needs).

As it is, I am not sure that this patch is useful in all scenarios.
It is certainly helpful for low-bandwidth devices that can hold their
data in response to throttling. But for devices that pump data in
real-time as fast as possible (webcam, A/D converter, etc), throttling
may actually cause more data loss.

From: Joris van Rantwijk <jorispubl@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:18 -08:00
Alan Stern
b544d7499c USB: unusual_devs update for Sony P990i phone
This patch (as846) adds the IGNORE_RESIDUE flag to the unusual_devs
entry for Sony-Ericsson's P990i phone.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:17 -08:00
Thomas Bächler
af3bd202a3 USB: Teac HD-35PU patch to unusual_devs.h
Hi, one of my users has two USB hard drives that need the following
patch, otherwise there are I/O errors similar to those here:
http://bugme.osdl.org/show_bug.cgi?id=3223

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:17 -08:00
YOSHIFUJI Hideaki
2d94b981c7 USB: PL2303: Willcom WS002IN Support.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:17 -08:00
Oliver Neukum
6957e1ac9c USB: fix needless failure under certain conditions
in devices.c we have a piece of code for dealing with losing in a race.
If we indeed lose the race we don't care whether our own memory allocation
worked. The check for that is so early that we return early even if we
don't have to.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:17 -08:00
Josh Triplett
c5999f0da7 USB: In init_endpoint_class, use PTR_ERR to obtain an errno value, not IS_ERR
init_endpoint_class calls class_create, and checks the result for an error
with IS_ERR; however, if true, it then returns the result of IS_ERR (a
boolean) rather than PTR_ERR (the actual errno).

Signed-off-by: Josh Triplett <josh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:17 -08:00
Greg Kroah-Hartman
df23fa01ac USB: Driver to charge USB blackberry devices
A simple driver to turn on the charging capability of a USB BlackBerry
device when it is plugged into the machine.  It does not bind to the
device, so all userspace programs can still sync properly with it.

Note, if CONFIG_USB_SUSPEND is enabled, it can play havoc with this
device as the power to the port will be shut down.  This device id will
have to be added to the global blacklist table when it is created.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:17 -08:00
Alan Stern
8903795a52 EHCI: turn off remote wakeup during shutdown
This patch (as850b) disables remote wakeup (and everything else!) on
all EHCI ports when the shutdown() method is called.  If remote wakeup
is left active then some systems will reboot instead of powering off.
This fixes Bugzilla #7828.

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>
2007-02-16 15:32:17 -08:00
Thomas Gleixner
38515e908b [PATCH] Scheduled removal of SA_xxx interrupt flags fixups
The obsolete SA_xxx interrupt flags have been used despite the scheduled
removal.  Fixup the remaining users.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Roland Dreier <rolandd@cisco.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Greg KH <greg@kroah.com>
Cc: Dave Airlie <airlied@linux.ie>
Cc: James Simmons <jsimmons@infradead.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-14 08:09:54 -08:00
Tim Schmielau
cd354f1ae7 [PATCH] remove many unneeded #includes of sched.h
After Al Viro (finally) succeeded in removing the sched.h #include in module.h
recently, it makes sense again to remove other superfluous sched.h includes.
There are quite a lot of files which include it but don't actually need
anything defined in there.  Presumably these includes were once needed for
macros that used to live in sched.h, but moved to other header files in the
course of cleaning it up.

To ease the pain, this time I did not fiddle with any header files and only
removed #includes from .c-files, which tend to cause less trouble.

Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
configs in arch/arm/configs on arm.  I also checked that no new warnings were
introduced by the patch (actually, some warnings are removed that were emitted
by unnecessarily included header files).

Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-14 08:09:54 -08:00
Arjan van de Ven
00977a59b9 [PATCH] mark struct file_operations const 6
Many struct file_operations in the kernel can be "const".  Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data.  In addition it'll catch accidental writes at compile time to
these shared resources.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:45 -08:00
Michael Hanselmann
2ca48ed5cc [PATCH] null pointer dereference in appledisplay driver
Commit 40b20c257a by Len Brown introduced
a null pointer dereference in the appledisplay driver. This patch fixes
it.

Signed-off-by: Michael Hanselmann <linux-kernel@hansmi.ch>
Cc: Len Brown <lenb@kernel.org>
Cc: Greg KH <greg@kroah.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:27 -08:00
Linus Torvalds
d68798374b Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: remove scan_keyb driver
  Input: i8042 - fix AUX IRQ delivery check
  Input: wistron - add support for Fujitsu-Siemens Amilo D88x0
  Input: inport - use correct config option for ATIXL
  Input: HIL - handle erros from input_register_device()
  Input: tsdev - schedule removal
  Input: add Atlas button driver
  Input: ads7846 - be more compatible with the hwmon framework
  Input: ads7846 - detect pen up from GPIO state
  Input: ads7846 - select correct SPI mode
  Input: ads7846 - switch to using hrtimer
  Input: ads7846 - optionally leave Vref on during differential measurements
  Input: ads7846 - pluggable filtering logic
  Input: gpio-keys - keyboard driver for GPIO buttons
  Input: hid-ff - add support for Logitech Momo racing wheel
  Input: i8042 - really suppress ACK/NAK during panic blink
  Input: pc110pad - return proper error
2007-02-11 11:50:24 -08:00
Alexey Dobriyan
b653d081c1 [PATCH] proc: remove useless (and buggy) ->nlink settings
Bug: pnx8550 code creates directory but resets ->nlink to 1.

create_proc_entry() et al will correctly set ->nlink for you.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Corey Minyard <minyard@acm.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Greg KH <greg@kroah.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:32 -08:00
Andrew Morton
fc0ecff698 [PATCH] remove invalidate_inode_pages()
Convert all calls to invalidate_inode_pages() into open-coded calls to
invalidate_mapping_pages().

Leave the invalidate_inode_pages() wrapper in place for now, marked as
deprecated.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:31 -08:00
Robert P. J. Day
c376222960 [PATCH] Transform kmem_cache_alloc()+memset(0) -> kmem_cache_zalloc().
Replace appropriate pairs of "kmem_cache_alloc()" + "memset(0)" with the
corresponding "kmem_cache_zalloc()" call.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: Roland McGrath <roland@redhat.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Greg KH <greg@kroah.com>
Acked-by: Joel Becker <Joel.Becker@oracle.com>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Cc: Jan Kara <jack@ucw.cz>
Cc: Michael Halcrow <mhalcrow@us.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Cc: James Morris <jmorris@namei.org>
Cc: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:27 -08:00
Jiri Slaby
b963a8441c [PATCH] Char: tty_wakeup cleanup
tty_wakeup cleanup

- remove wake_up_interruptible(&tty->write_wait) surrounding
  tty_wakup(tty);
- substitute tty->ldisc.write_wakeup(tty) + wake_up() by tty_wakeup(tty);

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Acked-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:26 -08:00
Dmitry Torokhov
b22364c8ee Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2007-02-10 01:26:32 -05:00
Michael Hanselmann
d78112e1f1 ACPI: video: Fix null pointer in appledisplay driver
commit "ACPI: video: Add dev argument for backlight_device_register"
519ab5f2be
broke the apple display driver.

Signed-off-by: Michael Hanselmann <linux-kernel@hansmi.ch>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-10 00:47:44 -05:00
Al Viro
68f50e5255 [PATCH] hci_{read,write}l() does force casts to wrong type for no reason
readl() et.al. expect iomem pointer, so WTF force-cast it to normal one???

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-09 09:14:08 -08:00
Al Viro
53ebb3b826 [PATCH] trivial usb endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-09 09:14:08 -08:00
Al Viro
72401339b5 [PATCH] ps3 usb missed the addition of new argument to ps3_alloc_io_irq()
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-09 08:28:48 -08:00
Milan Svoboda
32f3f49910 [ARM] 4141/1: consolidate functions that handles gpio in pxa2xx_udc
This patch renames pxa_gpio_set/get functions defined in drivers/usb/gadget/pxa2xx_udc.h to udc_gpio_set/get.

These functions are moved from drivers/usb/gadget/pxa2xx_udc.h to include/asm-arm/arch-pxa2xx/udc.h

Creates new functions: udc_gpio_to_irq, udc_gpio_init_vbus, udc_gpio_init_pullup in include/asm-arm/arch-pxa2xx/udc.h. These functions are used in drivers/usb/gadget/pxa2xx_udc.c instead of direct low-level (pxa2xx only) functions.

Creates all these udc_gpio_* functions in include/asm-arm/arch-ixp4xx/udc.h. This implementation has no real code because ixp4xx doesn't use vbus - only vbus uses all these gpio functions (and because ixp4xx misses any function which converts number of gpio pin into it's irq).

This is next step to make pxa2xx_udc fully work on ixp4xx platform.

Signed-off-by: Milan Svoboda <msvoboda@ra.rockwell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-02-08 14:56:51 +00:00
Andrew Victor
b2c6561605 [ARM] 4145/2: AT91: Add support for AT91SAM9263 processor
Add support for the Atmel AT91SAM9263 processor.  It is similar to the
AT91SAM9260 but with more integrated peripherals, 5 GPIO banks, etc.

Original patch from Nicolas Ferre.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-02-08 14:55:24 +00:00
Linus Torvalds
c96e2c9207 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (70 commits)
  USB: remove duplicate device id from zc0301
  USB: remove duplicate device id from usb_storage
  USB: remove duplicate device id from keyspan
  USB: remove duplicate device id from ftdi_sio
  USB: remove duplicate device id from visor
  USB: a bit more coding style cleanup
  usbcore: trivial whitespace fixes
  usb-storage: use first bulk endpoints, not last
  EHCI: fix interrupt-driven remote wakeup
  USB: switch ehci-hcd to new polling scheme
  USB: autosuspend for usb printer driver
  USB Input: Added kernel module to support all GTCO CalComp USB InterWrite School products
  USB: Sierra Wireless auto set D0
  USB: usb ethernet gadget recognizes HUSB2DEV
  USB: list atmel husb2_udc gadget controller
  USB: gadgetfs AIO tweaks
  USB: gadgetfs behaves better on userspace init bug
  USB: gadgetfs race fix
  USB: gadgetfs simplifications
  USB: gadgetfs cleanups
  ...
2007-02-07 19:23:21 -08:00
Linus Torvalds
f2aca47dc3 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (28 commits)
  sysfs: Shadow directory support
  Driver Core: Increase the default timeout value of the firmware subsystem
  Driver core: allow to delay the uevent at device creation time
  Driver core: add device_type to struct device
  Driver core: add uevent vars for devices of a class
  SYSFS: Fix missing include of list.h in sysfs.h
  HOWTO: Add a reference to Harbison and Steele
  sysfs: error handling in sysfs, fill_read_buffer()
  kobject: kobject_put cleanup
  sysfs: kobject_put cleanup
  sysfs: suppress lockdep warnings
  Driver core: fix race in sysfs between sysfs_remove_file() and read()/write()
  driver core: Change function call order in device_bind_driver().
  driver core: Don't stop probing on ->probe errors.
  driver core fixes: device_register() retval check in platform.c
  driver core fixes: make_class_name() retval checks
  /sys/modules/*/holders
  USB: add the sysfs driver name to all modules
  SERIO: add the sysfs driver name to all modules
  PCI: add the sysfs driver name to all modules
  ...
2007-02-07 19:22:26 -08:00
Linus Torvalds
7677ced48e Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (116 commits)
  sk98lin: planned removal
  AT91: MACB support
  sky2: version 1.12
  sky2: add new chip ids
  sky2: Yukon Extreme support
  sky2: safer transmit timeout
  sky2: TSO support for EC_U
  sky2: use dev_err for error reports
  sky2: add Wake On Lan support
  fix unaligned exception in /drivers/net/wireless/orinoco.c
  Remove unused kernel config option DLCI_COUNT
  z85230: spinlock logic
  mips: declance: Driver model for the PMAD-A
  Spidernet: Rework RX linked list
  NET: turn local_save_flags() + local_irq_disable() into local_irq_save()
  NET-3c59x: turn local_save_flags() + local_irq_disable() into local_irq_save()
  hp100: convert pci_module_init() to pci_register_driver()
  NetXen: Added ethtool support for user level tools.
  NetXen: Firmware crb init changes.
  maintainers: add atl1 maintainers
  ...
2007-02-07 19:21:56 -08:00
Greg Kroah-Hartman
ab6c41a498 USB: remove duplicate device id from usb_storage
As pointed out by Kay Sievers <kay.sievers@suse.de>

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:40 -08:00
Greg Kroah-Hartman
33c6b7e99f USB: remove duplicate device id from keyspan
As pointed out by Kay Sievers <kay.sievers@suse.de>

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:40 -08:00
Greg Kroah-Hartman
210b197579 USB: remove duplicate device id from ftdi_sio
As pointed out by Kay Sievers <kay.sievers@suse.de>

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:40 -08:00
Greg Kroah-Hartman
9da88d78bc USB: remove duplicate device id from visor
As pointed out by Kay Sievers <kay.sievers@suse.de>

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:40 -08:00
Oliver Neukum
1a68f71d4f USB: a bit more coding style cleanup
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>
2007-02-07 15:44:40 -08:00
Oliver Neukum
9251644ab3 usbcore: trivial whitespace fixes
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>
2007-02-07 15:44:40 -08:00
Alan Stern
1096f780d0 usb-storage: use first bulk endpoints, not last
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>
2007-02-07 15:44:40 -08:00
Alan Stern
629e4427aa EHCI: fix interrupt-driven remote wakeup
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>
2007-02-07 15:44:39 -08:00
Marcelo Tosatti
1d619f128b USB: switch ehci-hcd to new polling scheme
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>
2007-02-07 15:44:39 -08:00
Oliver Neukum
d053218408 USB: autosuspend for usb printer driver
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>
2007-02-07 15:44:39 -08:00
Jeremy Roberson
a19ceb56cb USB Input: Added kernel module to support all GTCO CalComp USB InterWrite School products
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>
2007-02-07 15:44:39 -08:00
Kevin Lloyd
e43062dd20 USB: Sierra Wireless auto set D0
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>
2007-02-07 15:44:39 -08:00
Hvard Skinnemoen
ef3ff462a3 USB: usb ethernet gadget recognizes HUSB2DEV
Define DEV_CONFIG_CDC when compiling for HUSB2DEV.

From: Hvard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:39 -08:00
Hvard Skinnemoen
1f5b9cc9e4 USB: list atmel husb2_udc gadget controller
This identifies the driver for the Atmel HUSB2 Device Controller,
as integrated into the first AVR32 chip, the AT32AP700.

From: Hvard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:39 -08:00
Alan Stern
49631ca7f3 USB: gadgetfs AIO tweaks
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>
2007-02-07 15:44:39 -08:00
David Brownell
ce46794f77 USB: gadgetfs behaves better on userspace init bug
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>
2007-02-07 15:44:39 -08:00
David Brownell
5b89db02a5 USB: gadgetfs race fix
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>
2007-02-07 15:44:38 -08:00
David Brownell
0864c7a928 USB: gadgetfs simplifications
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>
2007-02-07 15:44:38 -08:00
David Brownell
7489d14943 USB: gadgetfs cleanups
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>
2007-02-07 15:44:38 -08:00
Oliver Neukum
3ff4fd94c8 USB: race fixes for usb-serial, step 3
- 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>
2007-02-07 15:44:38 -08:00
Oliver Neukum
4b10f0f3a0 USB: race fixes for usb-serial, step 2
- 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>
2007-02-07 15:44:38 -08:00
Oliver Neukum
34ef50e5b1 USB: race fixes for usb-serial step 1
- 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>
2007-02-07 15:44:38 -08:00
Rainer Weikusat
fdcba53e2d fix for bugzilla #7544 (keyspan USB-to-serial converter)
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>
2007-02-07 15:44:38 -08:00
Oliver Neukum
3ede760f0e USB: total removal of multithreaded probing in usb
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>
2007-02-07 15:44:38 -08:00
David Brownell
66e56ce75e USB: at91_udc wakeup event updates
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>
2007-02-07 15:44:37 -08:00
Alan Stern
57e06c1137 EHCI: force high-speed devices to run at full speed
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>
2007-02-07 15:44:37 -08:00
Alan Stern
625b5c9a00 EHCI: don't hide ports owned by the companion
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>
2007-02-07 15:44:37 -08:00
Alan Stern
e6316565e5 EHCI: local variable for port status register
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>
2007-02-07 15:44:37 -08:00
Alan Stern
896fbd7199 usbcore: remove unused bandwith-related code
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>
2007-02-07 15:44:37 -08:00
Alan Stern
3ca2a3211e UHCI: fix bandwidth allocation
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>
2007-02-07 15:44:37 -08:00
Geoff Levand
6a6c957eba USB: ps3 ohci bus glue
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>
2007-02-07 15:44:37 -08:00
Benjamin Herrenschmidt
de44743b03 USB: ohci error handling cleanup
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>
2007-02-07 15:44:37 -08:00
Geoff Levand
4a1a4d8b87 USB: ps3 controller hid quirk
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>
2007-02-07 15:44:36 -08:00
Geoff Levand
ad75a41085 USB: ps3 ehci bus glue
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>
2007-02-07 15:44:35 -08:00
Oliver Neukum
b3ebd52221 USB: better ethtool support for kaweth
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>
2007-02-07 15:44:35 -08:00