Commit graph

2676 commits

Author SHA1 Message Date
Kevin Lloyd 228426edac USB: sierra driver - add update dtr logic
The following improvements were made:
 - Fixed control line issue where asserting DTR on ep5 would close ep2
 - Added support for calc_num_ports (will help support future composite
   devices)

Signed-off-by: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:35:00 -08:00
Harald Welte 20734345b3 USB: ftdi_sio: Support for more JTAG adaptors
[PATCH] ftdi_sio: add support for more FTDI based JTAG adaptors

There are more devices similar to the Olimex JTAG adaptor, in that the first
port of the FT2232C is used for JTAG, and only the second port is available as
UART.

I have thus renamed ftdi_olimex_{probe,quirk} to ftdi_jtag_{probe,quirk} and
added vendor/product ID's for the OpenMoko Neo1973 Debug Board as well as the
OOCDlink device.

I've also updated the KERN_INFO message sent to userspace to remove the word
'olimex' and an extra '\n' that was causing an empty line in dmesg.

Signed-off-by: Harald Welte <laforge@openmoko.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:35:00 -08:00
Alan Cox d5f5bcd425 USB: io_ti: clean up termios handling
Don't pass NULL into termios functions when calling them internally
Remove all the crap which then checks for NULL which can't occur now
Clear CMSPAR as it is not supported
Report the baud rate back to the caller properly (See FIXME someone with
the docs)

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:35:00 -08:00
Alan Cox 537699ef53 USB: ti_usb: termios cleanups
Remove internal NULL passing in termios code
Remove all the if checks it causes
Encode the baud rate back properly
Clear CMSPAR as it is not supported

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:35:00 -08:00
Alan Cox 65d063ab21 USB: mos7720: clean up termios
Remove lots of NULL checks that can no longer occur
Encode the baud rate back into the termios (again someone with docs see
FIXME to improve this further)

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:59 -08:00
David Brownell e057a35aa1 USB: fix HCD Kconfig goofage
Add a missing dependency which goofs up the xconfig display.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:59 -08:00
David Brownell 1440e0967d USB: gadget: at91_udc minor fix (there is no number six)
Fix a small glitch noted by Yannick Cote.  There is no endpoint number
six, so if a (broken) host wrongly tried to change or read status of
that endpoint, the driver could access reserved register space.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Yannick Cote <yanick@yanos.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:59 -08:00
Oliver Neukum e58679805d USB: fix NULL pointer dereference on drivers/usb/serial/whiteheat.c
Am Sonntag, 16. Dezember 2007 05:23:47 schrieb Andrew Morton:
> On Sat, 15 Dec 2007 07:08:52 -0800 (PST) bugme-daemon@bugzilla.kernel.org wrote:
> 
> > http://bugzilla.kernel.org/show_bug.cgi?id=9573
 
> > There's a null pointer dereference on drivers/usb/serial/whiteheat.c as
> > follows:
> > 
> > (1) line 613:  the test "if (port->tty)" implies that null is a legal value
> >     for "port->tty" at that point
> > 
> > (2) neither firm_open nor firm_purge initialize "port->tty"

drivers/usb/serial/usb-serial::serial_open() sets port->tty
The check for NULL is bogus. This patch removes the check.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:58 -08:00
David Brownell e7b13ec923 USB: gadget: ethernet error path potential oops fix
Fix potential (never-observed) oops on rare error path,
bugzilla #9594.  Fix uses the same test as used earlier.

Also make the adjacent "else" block look like an "else" block
instead of hiding like a bug.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:58 -08:00
David Brownell 340ba5f9ce USB: ehci potential oops fix on ARC/TDI cores
Kernel bugzilla entry #9569 reports a potential OOPS in some code
supporting the integrated root hub TT support used on ARC/TDI
derived cores.  (This seems to have been a longstanding issue.)

This patch cleans up usage of urb->dev->tt to avoid that potential
oops and also fixes some overly long lines.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:58 -08:00
Tzachi Perelstein e96ffe2f9d USB: add Marvell Orion USB host support
Some glue bits for the on-chip USB host controller in the Marvell Orion
family of ARM SoCs, which is basically EHCI compatible.

Signed-off-by: Tzachi Perelstein <tzachi@marvell.com>
Reviewed-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:58 -08:00
Marcin Slusarz f570728f89 USB: ehci-hcd: fix sparse warning about shadowing 'status' symbol
fix warning:
drivers/usb/host/ehci-hcd.c:832:8: warning: symbol 'status' shadows an earlier one
drivers/usb/host/ehci-hcd.c:790:71: originally declared here

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:58 -08:00
Marcin Slusarz 0354c1acd8 USB: usb/storage/initializers.c: fix signedness difference
fix warnings:
drivers/usb/storage/initializers.c:83:26: warning: incorrect type in argument 5 (different signedness)
drivers/usb/storage/initializers.c:83:26:    expected unsigned int *act_len
drivers/usb/storage/initializers.c:83:26:    got int *<noident>
drivers/usb/storage/initializers.c:89:26: warning: incorrect type in argument 5 (different signedness)
drivers/usb/storage/initializers.c:89:26:    expected unsigned int *act_len
drivers/usb/storage/initializers.c:89:26:    got int *<noident>

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:57 -08:00
David Brownell 30bf54e62a USB: PS3: Fix EHCI ISO transfer bug
This adds a workaround for an issue reported with ISO transfers
on some EHCI controllers, most recently with VIA KT800 and PS3
EHCI silicon.

The issue is that the silicon doesn't necessarily seem to be done
using ISO DMA descriptors (itd, sitd) when it marks them inactive.
(One theory is that the ill-defined mechanism where hardware caches
periodic transfer descriptors isn't invalidating their state...)
With such silicon, quick re-use of those descriptors makes trouble.
Waiting until the next frame seems to be a sufficient workaround.

This patch ensures that the relevant descriptors aren't available
for immediate re-use.  It does so by not recycling them until after
issuing the completion callback which would reuse them by enqueueing
an URB and thus (re)allocating ISO DMA descriptors.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Cc: Masashi Kimoto <Masashi_Kimoto@hq.scei.sony.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:57 -08:00
Joe Perches dc0d5c1e5c USB: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:57 -08:00
Dmitry Baryshkov d4a8d46d91 USB: gadget: pxa2xx_udc supports inverted vbus
Some boards (like e.g. Tosa) invert the VBUS-detection signal:
it's low when a host is supplying VBUS, and high otherwise.
Allow specifying whether gpio_vbus value is inverted.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:57 -08:00
Andrew Morton 26e109b0a9 USB: testing driver: don't free a locked mutex
Dopey thing to do and lockdep will (or should) warn.

Spotted by Daniel Walker.

Cc: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Cc: Daniel Walker <dwalker@mvista.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:57 -08:00
Matthias Kaehlcke 1cfab028af USB: testing driver: convert dev->sem to mutex
USB testing driver: convert semaphore dev->sem to the mutex API

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:56 -08:00
Nick Piggin 041509db39 USB: mon nopage
Convert USB mon driver from nopage to fault.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Acked-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:56 -08:00
Alan Cox d0fab0ddf3 USB: mct232: speed, new termios and compliance cleanups
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:56 -08:00
Alan Cox e7806e366b USB: keyspan_pda: clean up speed handling
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:56 -08:00
Alan Cox 3ec466b496 USB: belkin_sa: clean up for new style termios and speed handling, plus style
A tester with actual hardware would be useful

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:56 -08:00
Sarah Sharp fcf9e55e06 USB: pl2303: Add autosuspend support to pl2303 usb serial converter.
Signed-off-by: Sarah Sharp <saharabeara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:56 -08:00
Sarah Sharp 3e152505a5 USB: pl2303: Move pl2303 vendor specific init to probe function.
Without this fix, the pl2303 usb-serial adapter would not suspend properly
unless it had been opened first.  A pl2303 type_1 chip will still break if the
system is hibernated while the RS-232 connector is powered by another system.
This was broken before, and a reset resume does not fix it.  All other suspend
and autosuspend scenarios work with ATEN pl2303 adaptors with HX and type_1 chips.

Signed-off-by: Sarah Sharp <saharabeara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:55 -08:00
Sarah Sharp eb44da0b3a USB: pl2303: Cleanup FISH and SOUP macros in pl2303 driver.
Replace the FISH and SOUP macros that violated the macro guidelines in CodingStyle.
Turn them into function calls with clearer variable names.

Signed-off-by: Sarah Sharp <saharabeara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:55 -08:00
Alan Stern caf29f6265 USB: dummy_hcd: change the default power budget
This patch (as1025) changes the default power budget for dummy-hcd to
500 mA and makes it a preprocessor parameter for easier testing.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:55 -08:00
Alan Stern 07d29b63ef USB: EHCI: add separate IAA watchdog timer
This patch (as1028) was mostly written by David Brownell; I made only
a few changes (extra log info and a small bug fix -- which might
account for why David's version had to be reverted).  It adds a new
watchdog timer to the ehci-hcd driver to be used exclusively for
detecting lost or missing IAA notifications.

Previously a shared timer had been used, which may have led to some
problems as reported by Christian Hoffmann.

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>
2008-02-01 14:34:55 -08:00
Alan Stern 2e2eb83ffd USB: add usbfs stubs for suspend and resume
This patch (as1022b) adds stub methods for suspend and resume to the
usbfs driver.  There isn't much they can do since there's no way to
inform a user task about the events.  But it's important to have the
stubs, because an upcoming change to usbcore will automatically unbind
drivers that don't have those methods when a suspend occurs.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:54 -08:00
Matthias Kaehlcke 241ca64fc5 USB: Edgeport USB Serial Converter: convert es_sem to mutex
Edgeport USB Serial Converter: convert semaphore es_sem to the
mutex API

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:53 -08:00
Alan Stern 852c4b43bd USB: updates to usb_reset_composite_device()
This patch (as1023) updates the code in usb_reset_composite_device():

	Some local variable declarations are moved to inner loops.

	The interface locks are not acquired.  This isn't necessary
	any more; its only reason was to prevent an interface from
	being suspended or resumed during the reset.  But now
	interface power management is controlled by the USB device
	lock, not by the interface lock.

	The check for whether the interface is registered is removed.
	There doesn't seem to be any reason for checking; a driver
	for a non-registered interface deserves to be informed of
	device resets just as much as any other.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:53 -08:00
Alan Stern 885e97478b USB: repair USBDEVFS_CONNECT ioctl
For as long as I've known about it, the USBDEVFS_CONNECT ioctl hasn't
done what it's supposed to.  The current code reprobes _all_ the
unbound USB interfaces; this patch (as1021) makes it reprobe only the
interface for which it was called.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:53 -08:00
Benjamin Herrenschmidt badef81922 usb: Remove OHCI useless masking/unmasking of WDH interrupt
The OHCI driver's IRQ handler, while processing a WDH interrupt, masks
and unmasks it.  I believe this is both broken (the write may still be
posted during the donelist processing it's trying to safeguard) and
useless as this IRQ may not be reissued until it's acked (unless this
legacy code is an uncommented workaround for some chip erratum).

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:53 -08:00
Tony Jones 694cc2087e USB: convert ehci debug files to use debugfs instead of sysfs
We should not have multiple line files in sysfs, this moves the data to
debugfs instead, like the UHCI driver.

Signed-off-by: Tony Jones <tonyj@suse.de>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:53 -08:00
Tony Jones 684c19e0d9 USB: convert ohci debug files to use debugfs instead of sysfs
We should not have multiple line files in sysfs, this moves the data to
debugfs instead, like the UHCI driver.

Signed-off-by: Tony Jones <tonyj@suse.de>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:52 -08:00
Greg Kroah-Hartman f2a383e4de USB: always announce a device has been added to the system
Distros (like SuSE) want to know this information, to make it easier
to handle support issues.  Might as well let everyone benefit from this.
This is also enabled whenever CONFIG_USB_DEBUG is enabled, to help with
debugging.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:52 -08:00
Alan Stern 5933101718 USB: dummy_hcd: don't register drivers on the platform bus
This patch (as1017) makes dummy_hcd behave more like the other USB
peripheral controller drivers by no longer registering its
gadget driver on the platform bus.  Doing that has always been a
mistake, since a usb_gadget_driver isn't a platform_driver.  Instead
the gadget driver is left unregistered in sysfs.

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>
2008-02-01 14:34:52 -08:00
Balaji Rao 90da096ee4 USB: force handover port to companion when hub_port_connect_change fails
This patch hands over the port to the companion when the
hub_port_connect_change fails.

Signed-off-by: Balaji Rao <balajirrao@gmail.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:52 -08:00
Patrik Sevallius eb0be47dbb USB: usb peripheral controller driver oops avoidance
I'm having problem with oopses when rebooting, if I modprobe g_serial
and rmmod g_serial and do a reboot I get an oops in device_shutdown().
The reason seems to be that usb_gadget_unregister_driver() doesn't do
enough cleanup.  With this at91_udc patch I don't get the oops.

Signed-off-by: Patrik Sevallius <patrik.sevallius@enea.com>
[ Same bug was in other peripheral controller drivers; fixed ]
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:52 -08:00
Andre Haupt 7b62cc8668 USB: cyberjack: remove a unnecessary variable.
This also fixes a sparse warning that symbol 'result' shadows an earlier one.

Signed-off-by: Andre Haupt <andre@bitwigglers.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:51 -08:00
Sarah Sharp f0fbd5b9ba USB: Prepare serial core for autosuspend.
Claim the interface for a USB to serial converter when the tty is open,
and release the interface when the tty is closed.

If a driver doesn't provide a resume function, use the generic resume
instead.

Make sure the generic resume function does not submit the URBs if we're
coming back from autosuspend.  On autoresume, we know that the open
function will be called next, which will attempt to submit the URBs.  If
we submit them in the resume function, the open will fail.

This works for:
 - autosuspend
 - suspending with the tty open or closed
 - hibernate with the tty closed

A hibernate (or a suspend that causes the USB subsystem to lose power)
has issues.  If you have the tty open when you hibernate, a new tty will
be created when the device re-enumerates during resume.

Signed-off-by: Sarah Sharp <sarah.a.sharp@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:51 -08:00
David Brownell 00274921a0 USB: gadget code switches to pr_err() and friends
We now have pr_err(), pr_warning(), and friends ... start using
them in the gadget stack instead of printk(KERN_ERR) and friends.
This gives us shorter lines and somewhat increased readability.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:51 -08:00
Alan Stern 269954e542 USB: don't change HC power state for a FREEZE
This patch (as1016) prevents PCI-based host controllers from
undergoing a power-state change during a FREEZE or a PRETHAW.  Such
changes are needed only during a SUSPEND.

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>
2008-02-01 14:34:51 -08:00
Alan Stern 4145ed6dc5 USB: make ksuspend_usbd thread non-freezable
This patch (as1012b) makes the ksuspend_usbd kernel thread
non-freezable.  Since the PM core has been changed to lock all devices
during a system sleep, the thread no longer needs to be frozen.  It
won't interfere with a system sleep because before trying to resume a
root hub device, it acquires the device's lock.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:51 -08:00
Julia Lawall a6a01369fd USB: Drop unnecessary continue in a few drivers
Continue is not needed at the bottom of a loop.

The semantic patch implementing this change is as follows:

@@
@@

for (...;...;...) {
   ...
   if (...) {
     ...
-   continue;
   }
}

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:51 -08:00
Aristeu Rozanski c87d6a4f67 USB: usb_serial_console: allocate fake tty and termios before calling driver open() method
The usb serial method set_termios() is called for the first time from
open() method in order to set up the termios structure with the default
device's settings, ignoring the current settings. Once it's initialized,
the next set_termios() calls will update the device with the
tty->termios settings.
Currently USB serial console code calls the driver open() method without
a tty and after that will allocate a fake tty and termios so the command
line arguments can be applied to the device
(console=ttyUSB0,115200,...). This makes the driver overwrite the
termios with the default settings and not applying the command line
options.

This patch changes usb_console_setup() to allocate the fake tty and
termios before the open() method is called.

Tested successfully with a pl2303

Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:50 -08:00
Aristeu Rozanski 9a6b1efa6f USB: usb_serial: clean tty reference in the last close
When a usb serial adapter is used as console, the usb serial console
driver bumps the open_count on the port struct used but doesn't attach
a real tty to it (only a fake one temporaly). If this port is opened later
using the regular character device interface, the open method won't
initialize the port, which is the expected, and will receive a brand new
tty struct created by tty layer, which will be stored in port->tty.

When the last close is issued, open_count won't be 0 because of the
console usage and the port->tty will still contain the old tty value. This
is the last ttyUSB<n> close so the allocated tty will be freed by the
tty layer. The usb_serial and usb_serial_port are still in use by the
console, so port_free() won't be called (serial_close() ->
usb_serial_put() -> destroy_serial() -> port_free()), so the scheduled
work (port->work, usb_serial_port_work()) will still run. And
usb_serial_port_work() does:
(...)
        tty = port->tty;
        if (!tty)
                return;

        tty_wakeup(tty);
which causes (manually copied):

Faulting instruction address: 0x6b6b6b68
Oops: Kernel access of bad area, sig: 11 [#1]
PREEMPT PowerMac
Modules linked in: binfmt_misc ipv6 nfs lockd nfs_acl sunrpc dm_snapshot dm_mirror dm_mod hfsplus uinput ams input_polldev genrtc cpufreq_powersave i2c_powermac therm_adt746x snd_aoa_codec_tas snd_aoa_fabric_layout snd_aoa joydev snd_aoa_i2sbus snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_page_alloc pmac_zilog serial_core evdev ide_cd cdrom snd appletouch soundcore snd_aoa_soundbus bcm43xx firmware_class usbhid ieee80211softmac ff_memless firewire_ohci firewire_core ieee80211 ieee80211_crypt crc_itu_t sungem sungem_phy uninorth_agp agpart ssb
NIP: 6b6b6b68 LR: c01b2108 CTR: 6b6b6b6b
REGS: c106de80 TRAP: 0400   Not tainted  (2.6.24-rc2)
MSR: 40009032 <EE,ME,IR,DR>  CR: 82004024  XER: 00000000
TASK = c106b4c0[5] 'events/0' THREAD: c106c000
GPR00: 6b6b6b6b c106df30 c106b4c0 c2d613a0 00009032 00000001 00001a00 00000001
GPR08: 00000008 00000000 00000000 c106c000 42004028 00000000 016ffbe0 0171a724
GPR16: 016ffcf4 00240e24 00240e70 016fee68 016ff9a4 c03046c4 c0327f50 c03046fc
GPR24: c106b6b9 c106b4c0 c101d610 c106c000 c02160fc c1eac1dc c2d613ac c2d613a0
NIP [6b6b6b68] 0x6b6b6b68
LR [c01b2108] tty_wakeup+0x6c/0x9c
Call Trace:
[c106df30] [c01b20e8] tty_wakeup+0x4c/0x9c (unreliable)
[c106df40] [c0216138] usb_serial_port_work+0x3c/0x78
[c106df50] [c00432e8] run_workqueue+0xc4/0x15c
[c106df90] [c0043798] worker_thread+0xa0/0x124
[c106dfd0] [c0048224] kthread+0x48/0x84
[c106dff0] [c00129bc] kernel_thread+0x44/0x60
Instruction dump:
XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
Slab corruption: size-2048 start=c2d613a0, len=2048
Redzone: 0x9f911029d74e35b/0x9f911029d74e35b.
Last user: [<c01b16d8>](release_one_tty+0xbc/0xf4)
050: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b
Prev obj: start=c2d60b88, len=2048
Redzone: 0x9f911029d74e35b/0x9f911029d74e35b.
Last user: [<c00f30ec>](show_stat+0x410/0x428)
000: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b
010: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b

This patch avoids this, clearing port->tty considering if the port is
used as serial console or not

Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:50 -08:00
Aristeu Rozanski 27680d232b USB: usb_serial_console: fix command line parsing
Currently usb serial console support ignores the device and always use
ttyUSB0.

Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:50 -08:00
Oliver Bock d09d6a3514 USB: cypress_cy7c63: updated contact/usage information
here's a minor update to the cypress_cy7c63 driver
providing new contact and usage information.


From: Oliver Bock <bock@tfh-berlin.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:50 -08:00
Craig W. Nadler 25a010c8c1 USB: add Printer Gadget Driver
G_PRINTER: Adds a USB printer gadget driver for use in printer firmware.

This adds a USB printer gadget driver for use in printer firmware.
The printer gadget channels data between the USB host and a userspace
program driving the print engine. The user space program reads and
writes the device file /dev/g_printer to receive or send printer data.
It can use ioctl calls to the device file to get or set printer status.

Signed-off-by: Craig W. Nadler <craig@nadler.us>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:49 -08:00
Joe Perches fec8de3aad USB: Add missing "space" to printk messages
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:49 -08:00
Yoshihiro Shimoda 8c73aff6d3 USB: m66592-udc: Add support for SH7722 USBF
Add support for SuperH SH7722 USB Function.

M66592 is similar to SH7722 USBF. It can support SH7722 USBF by
changing several M66592 code.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:48 -08:00
Matthias Kaehlcke 9da0068a49 USB: TI 3410/5052 USB Serial: convert td_open_close_lock to mutex
TI 3410/5052 USB Serial: convert semaphore td_open_close_lock to the mutex
API.

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:48 -08:00
Kyungmin Park 527ea73eae USB: device DMA support on OMAP2
The current omap udc dosen't support the DMA mode and it has some problem
at setup time on OMAP2 with previous patch file.  I found that the code
assumes bulk out required the big data transfer.  But MODE SELECT(6) sent
the only 24 bytes.  it makes a problem.  So I implement the small packets
handling for it.

It is tested with both linux and windows.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:48 -08:00
Adrian Bunk 568fdade14 USB: usb/mon/mon_bin.c: cleanups
- make the needlessly global struct mon_fops_binary static
- #if 0 the unused mon_bin_mmap() and related code

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg KH <greg@kroah.com>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:48 -08:00
Jeff Garzik d8d42233d4 USB: s3c2410_udc: minor irq handler cleanups
- 'irq' argument is merely used in place of a constant; replace its usage
  with that constant.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:48 -08:00
Fernando Luis Vazquez Cao 63bfb1f18a USB: sis FB driver: *_ioctl32_conversion functions do not exist in recent kernels
Remove dead code while at it.

Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Cc: Greg KH <greg@kroah.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:47 -08:00
Alain Degreffe 60a8fc0171 USB: add iuu_phoenix driver
Signed-off-by: Alain Degreffe <eczema@ecze.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:47 -08:00
Bartlomiej Zolnierkiewicz c74e809565 USB: isd200: don't include <linux/ide.h>
Now that commit 3794ade5b2 removed
incorrect dependency on CONFIG_IDE we can fix the driver to not
include <linux/ide.h>:

* add ATA_REG_{ERROR,LCYL,HCYL,STATUS}_OFFSET defines and use them
  instead of IDE_{ERROR,LCYL,HCYL,STATUS}_OFFSET from <linux/ide.h>

* remove no longer needed <linux/ide.h> include

* remove incorrect comment added by the last commit:
  - isd200.c is not the only user of struct hd_driveid besides IDE
    (see drivers/block/xsysace.c and arch/um/drivers/ubd_kern.c)

Cc: Alan Cox <alan@redhat.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:47 -08:00
Oliver Neukum 1365baf724 USB: autosuspend for cdc-acm
Here we go. This patch implements suspend/resume and autosuspend
for the CDC ACM driver.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:47 -08:00
Tony Jones 5a3201b280 USB: Convert from class_device to device for USB core
Convert from class_device to device for drivers/usb/core.

Signed-off-by: Tony Jones <tonyj@suse.de>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:46 -08:00
Greg Kroah-Hartman de6f92b9ee USB: handle idVendor of 0x0000
Some crazy devices in the wild have a vendor id of 0x0000.  If we try to
add a module alias with this id, we just can't do it due to a check in
the file2alias.c file.  Change the test to verify that both the vendor
and product ids are 0x0000 to show a real "blank" module alias.

Note, the module-init-tools package also needs to be changed to properly
generate the depmod tables.

Cc: Janusz <janumix@poczta.fm>
Cc: stable <stable@kernel.org>
Cc: Jon Masters <jcm@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:46 -08:00
Jan Andersson 6ce4560a39 usb: fix usbtest halt check on big endian systems
usbtest did not swap the received status information when checking for
a non-zero value and failed to discover halted endpoints on big endian
systems.

Cc: stable <stable@kernel.org>
Signed-off-by: Jan Andersson <jan@gaisler.com>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:46 -08:00
Grant Grundler 4b24f91c24 USB: storage: Add unusual_dev for HP r707
Add "FIX_CAPACITY" entry for HP Photosmart r707 Camera in "Disk" mode.
Camera will wedge when /lib/udev/vol_id attempts to access the last sector,
EIO gets reported to dmesg, and block device is marked "offline" (it is).
Reproduced vol_id behavior with:
	"dd if=/dev/sda of=/dev/null skip=60800 count=1"

Cc: stable <stable@kernel.org>
Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:46 -08:00
Nate Carlson ab91d346c8 USB: Variant of the Dell Wireless 5520 driver
I've got a Dell wireless 5520 card with a different USB ID - specifically, 8136
instead of 8137. Attached a small patch to add support, and the output of an
'ati3'.

If we could get this in, that'd be sweet.  ;)  Thanks!

nc@knight:~/tmp/linux-2.6.24-rc8/drivers/usb/serial$ lsusb | grep 8136
	Bus 001 Device 005: ID 413c:8136 Dell Computer Corp.
nc@knight:~/tmp/linux-source-2.6.23/drivers/usb/serial$ cu -l ttyUSB0 -s 115200
	Connected.
	ati3
	Manufacturer: Novatel Wireless Incorporated
	Model: Expedite EU860D MiniCard
	Revision: 10.10.04.01-01  [2007-04-11 14:07:19]
	IMEI: 011186000228043
	+GCAP: +CGSM,+DS,+ES

From: Nate Carlson <natecars@natecarlson.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:46 -08:00
Oliver Neukum 0cc1a51ff3 USB: use GFP_NOIO in reset path
this function will run in the context of the scsi error handler thread.
It must use GFP_NOIO instead of GFP_KERNEL to avoid a possible
deadlock.

Cc: stable <stable@kernel.org>
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:45 -08:00
Ed Beroset 4bb0ef193b USB: ftdi driver - add support for optical probe device
Added support for the Elster Unicom III Optical Probe.
The device ID has already been added to the usb.ids file.

Cc: stable <stable@kernel.org>
Signed-off-by: Ed Beroset <beroset@mindspring.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:45 -08:00
Akira Tsukamoto 57833ea6b9 USB: pl2303: add support for RATOC REX-USB60F
pl2303: add support for RATOC REX-USB60F

This patch adds support for RATOC REX-USB60F Serial Adapters,
which is widely used in Japan recently.

Cc: stable <stable@kernel.org>
Signed-off-by: Akira Tsukamoto <akirat@rd.scei.sony.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:45 -08:00
Daniel Kozák 94cb373a75 USB: remove duplicate entry in Option driver and Pl2303 driver for Huawei modem
Remove entry for Huawei E620 UMTS/HSDPA card (ID: 12d1:1001) in pl2303 driver
Option driver is use instead

Cc: stable <stable@kernel.org>
Signed-off-by: Daniel Kozák <kozzi11@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:45 -08:00
Bruno Redondi e3e73c90e5 USB: sierra: add support for Onda H600/Zte MF330 datacard to USB Driver for Sierra Wireless
Added support for Onda H600/Zte MF330 GPRS/UMTS/HSDPA datacard

Cc: stable <stable@kernel.org>
Signed-off-by: Bruno Redondi <bruno.redondi@altarisoluzione.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:45 -08:00
Franco Lanza 34910434a2 USB: ftdi-sio: Patch to add vendor/device id for ATK_16IC CCD
little patches only to add vendor/device id of ATK_16IC CCD cam for
astronomy.

From: Franco Lanza <nextime@nexlab.it>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:45 -08:00
Peter Stark 42f8aa9456 USB: ftdi_sio - enabling multiple ELV devices, adding EM1010PC
I work with a group of people on a free home automation tool called
FHEM.  Some of the users own more than one USB-serial device by ELV. The
ftdi_sio driver has most of the ELV devices disabled by default and
needs to be re-enabled every time you get a new kernel. Additionally a
new device (EM 1010 PC - enegry monitor) is missing in the list.
Currently our users have to follow the instructions we provide at
http://www.koeniglich.de/fhem/linux.html ... However, to some users it
is too complicated to compile their own kernel module.

We are aware that you can specify one additional device using the
vendor/product option of the module. But lot's of users own more than
one device.

Cc: stable <stable@kernel.org>
Signed-off-by: Peter Stark <peter.stark@t-online.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:44 -08:00
Manish Katiyar da28762372 USB : correct comments in usb/core/notify.c
This patch corrects the wrong function name mentioned in the comments
of usb_unregister_notify function.

Signed-off-by: Manish Katiyar <mkatiyar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:44 -08:00
Kevin Lloyd 6835b32c38 USB: sierra driver - add devices
The following improvements were made:
 - Added new product support: MC5725, AC 880 U, MP 3G (UMTS & CDMA)

Cc: stable <stable@kernel.org>
Signed-off-by: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:44 -08:00
Damien Stuart cc311ee7d2 USB: Adding YC Cable USB Serial device to pl2303
This simply adds the "YC Cable" as a vendor and its pl2303-based
USB<->Serial adapter as a product.  This particular adapter is sold by
Radio Shack.  I've done limited testing on a few different systems with
no issues.

Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:43 -08:00
Jessica L. Blank 62aad3ab11 USB: Sierra - Add support for Aircard 881U
Adds the appropriate vendor and device IDs for the AirCard 881U to
sierra.c. (This device is often rebadged by AT&T as the USBConnect 881).

Cc: stable <stable@kernel.org>
Signed-off-by: Jessica L Blank <j@twu.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:43 -08:00
Piotr Roszatycki 002e8f2c80 USB: add support for 4348:5523 WinChipHead USB->RS 232 adapter
add support for:

  4348:5523 WinChipHead USB->RS 232 adapter with Prolifec PL 2303 chipset

[ mingo@elte.hu: merged it and nursed it upstream ]

Cc: stable <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:43 -08:00
Craig Shelley 5de8b3acda USB: CP2101 New Device IDs
Six new device IDs for CP2101 driver.

Cc: stable <stable@kernel.org>
Signed-off-by: Craig Shelley <craig@microtron.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:43 -08:00
Li Yang 2336a98679 usb gadget: fix fsl_usb2_udc potential OOPS
For fsl_usb2_udc driver, ep0 also has a descriptor.  Current code is
misleading and contains a logical mistake.  Here is the patch to fix it.

 http://bugzilla.kernel.org/show_bug.cgi?id=9595

Cc: stable <stable@kernel.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:43 -08:00
Alan Cox 3004e5379a USB: keyspan: Fix oops
If we get a data URB back from the hardware after we have put the tty to
bed we go kaboom. Fortunately all we need to do is process the URB
without trying to ram its contents down the throat of an ex-tty.

Cc: stable <stable@kernel.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:42 -08:00
Takashi Iwai 9004acc70e [ALSA] Remove sound/driver.h
This header file exists only for some hacks to adapt alsa-driver
tree.  It's useless for building in the kernel.  Let's move a few
lines in it to sound/core.h and remove it.
With this patch, sound/driver.h isn't removed but has just a single
compile warning to include it.  This should be really killed in
future.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31 17:29:48 +01:00
Paul Mackerras bd45ac0c5d Merge branch 'linux-2.6' 2008-01-31 11:25:51 +11:00
Boaz Harrosh 30b0c37b27 [SCSI] implement scsi_data_buffer
In preparation for bidi we abstract all IO members of scsi_cmnd,
that will need to duplicate, into a substructure.

- Group all IO members of scsi_cmnd into a scsi_data_buffer
  structure.
- Adjust accessors to new members.
- scsi_{alloc,free}_sgtable receive a scsi_data_buffer instead of
  scsi_cmnd. And work on it.
- Adjust scsi_init_io() and  scsi_release_buffers() for above
  change.
- Fix other parts of scsi_lib/scsi.c to members migration. Use
  accessors where appropriate.

- fix Documentation about scsi_cmnd in scsi_host.h

- scsi_error.c
  * Changed needed members of struct scsi_eh_save.
  * Careful considerations in scsi_eh_prep/restore_cmnd.

- sd.c and sr.c
  * sd and sr would adjust IO size to align on device's block
    size so code needs to change once we move to scsi_data_buff
    implementation.
  * Convert code to use scsi_for_each_sg
  * Use data accessors where appropriate.

- tgt: convert libsrp to use scsi_data_buffer

- isd200: This driver still bangs on scsi_cmnd IO members,
  so need changing

[jejb: rebased on top of sg_table patches fixed up conflicts
and used the synergy to eliminate use_sg and sg_count]

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-30 13:03:40 -06:00
Russell King 0ff66f0c7a Merge branch 'pxa-plat' into devel
* pxa-plat: (53 commits)
  [ARM] 4762/1: Basic support for Toradex Colibri module
  [ARM] pxa: fix mci_init functions returning -1
  [ARM] 4737/1: Refactor corgi_lcd to improve readability + bugfix
  [ARM] 4747/1: pcm027: support for pcm990 baseboard for phyCORE-PXA270
  [ARM] 4746/1: pcm027: network support for phyCORE-PXA270
  [ARM] 4745/1: pcm027: default configuration
  [ARM] 4744/1: pcm027: add support for phyCORE-PXA270 CPU module
  [NET] smc91x: Make smc91x use IRQ resource trigger flags
  [ARM] pxa: add default config for littleton
  [ARM] pxa: add basic support for Littleton (PXA3xx Form Factor Platform)
  [ARM] 4664/1: Add basic support for HTC Magician PDA phones
  [ARM] 4649/1: Base support for pxa-based Toshiba e-series PDAs.
  [ARM] pxa: skip registers saving/restoring if entering standby mode
  [ARM] pxa: fix PXA27x resume
  [ARM] pxa: Avoid fiddling with CKEN register on suspend
  [ARM] pxa: Add PXA3 standby code hooked into the IRQ wake scheme
  [ARM] pxa: Add zylonite MFP wakeup configurations
  [ARM] pxa: program MFPs for low power mode when suspending
  [ARM] pxa: make MFP configuration processor independent
  [ARM] pxa: remove un-used pxa3xx_mfp_set_xxx() functions
  ...

Conflicts:

	arch/arm/mach-pxa/ssp.c

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28 13:21:38 +00:00
Russell King d0d42df2a4 Merge branches 'at91', 'ep93xx', 'iop', 'kprobes', 'ks8695', 'misc', 'msm', 's3c2410', 'sa1100' and 'vfp' into devel
* at91: (24 commits)
  [ARM] 4615/4: sam926[13]ek buttons updated
  [ARM] 4765/1: [AT91] AT91CAP9A-DK board support
  [ARM] 4764/1: [AT91] AT91CAP9 core support
  [ARM] 4738/1: at91sam9261: Remove udc pullup enabling in board initialisation
  [ARM] 4761/1: [AT91] Board-support for NEW_LEDs
  [ARM] 4760/1: [AT91] SPI CS0 errata on AT91RM9200
  [ARM] 4759/1: [AT91] Buttons on CSB300
  [ARM] 4758/1: [AT91] LEDs
  [ARM] 4757/1: [AT91] UART initialization
  [ARM] 4756/1: [AT91] Makefile cleanup
  [ARM] 4755/1: [AT91] NAND update
  [ARM] 4754/1: [AT91] SSC library support
  [ARM] 4753/1: [AT91] Use DMA_BIT_MASK
  [ARM] 4752/1: [AT91] RTT, RTC and WDT peripherals on SAM9
  [ARM] 4751/1: [AT91] ISI peripheral on SAM9263
  [ARM] 4750/1: [AT91] STN LCD displays on SAM9261
  [ARM] 4734/1: at91sam9263ek: include IRQ for Ethernet PHY
  [ARM] 4646/1: AT91: configurable HZ, default to 128
  [ARM] 4688/1: at91: speed-up irq processing
  [ARM] 4657/1: AT91: Header definition update
  ...

* ep93xx:
  [ARM] 4671/1: ep93xx: remove obsolete gpio_line_* operations
  [ARM] 4670/1: ep93xx: implement IRQT_BOTHEDGE gpio irq sense type
  [ARM] 4669/1: ep93xx: simplify GPIO code and cleanups
  [ARM] 4668/1: ep93xx: implement new GPIO API

* iop:
  [ARM] 4770/1: GLAN Tank: correct physmap_flash_data width field
  [ARM] 4732/1: GLAN Tank: register rtc-rs5c372 i2c device
  [ARM] 4708/1: iop: update defconfigs for 2.6.24

* kprobes:
  ARM kprobes: let's enable it
  ARM kprobes: special hook for the kprobes breakpoint handler
  ARM kprobes: prevent some functions involved with kprobes from being probed
  ARM kprobes: don't let a single-stepped stmdb corrupt the exception stack
  ARM kprobes: add the kprobes hook to the page fault handler
  ARM kprobes: core code
  ARM kprobes: instruction single-stepping support

* ks8695:
  [ARM] 4603/1: KS8695: debugfs interface to view pin state
  [ARM] 4601/1: KS8695: PCI support

* misc:
  [ARM] remove duplicate includes
  [ARM] CONFIG_DEBUG_STACK_USAGE
  [ARM] 4689/1: small comment wrap fix
  [ARM] 4687/1: Trivial arch/arm/kernel/entry-common.S comment fix
  [ARM] 4666/1: ixp4xx: fix sparse warnings in include/asm-arm/arch-ixp4xx/io.h
  [ARM] remove reference to non-existent MTD_OBSOLETE_CHIPS
  [SERIAL] 21285: Report baud rate back via termios
  [ARM] Remove pointless casts from void pointers,
  [ARM] Misc minor interrupt handler cleanups
  [ARM] Remove at91_lcdc.h
  [ARM] ARRAY_SIZE() cleanup
  [ARM] Update mach-types

* msm:
  [ARM] msm: dma support for MSM7X00A
  [ARM] msm: board file for MACH_HALIBUT (QCT MSM7200A)
  [ARM] msm: irq and timer support for ARCH_MSM7X00A
  [ARM] msm: core platform support for ARCH_MSM7X00A

* s3c2410: (33 commits)
  [ARM] 4795/1: S3C244X: Add armclk and setparent call
  [ARM] 4794/1: S3C24XX: Comonise S3C2440 and S3C2442 clock code
  [ARM] 4793/1: S3C24XX: Add IRQ->GPIO pin mapping function
  [ARM] 4792/1: S3C24XX: Remove warnings from debug-macro.S
  [ARM] 4791/1: S3C2412: Make fclk a parent of msysclk
  [ARM] 4790/1: S3C2412: Fix parent selection for msysclk.
  [ARM] 4789/1: S3C2412: Add missing CLKDIVN register values
  [ARM] 4788/1: S3C24XX: Fix paramet to s3c2410_dma_ctrl if S3C2410_DMAF_AUTOSTART used.
  [ARM] 4787/1: S3C24XX: s3c2410_dma_request() should return the allocated channel number
  [ARM] 4786/1: S3C2412: Add SPI FIFO controll constants
  [ARM] 4785/1: S3C24XX: Add _SHIFT definitions for S3C2410_BANKCON registers
  [ARM] 4784/1: S3C24XX: Fix GPIO restore glitches
  [ARM] 4783/1: S3C24XX: Add s3c2410_gpio_getpull()
  [ARM] 4782/1: S3C24XX: Define FIQ_START for any FIQ users
  [ARM] 4781/1: S3C24XX: DMA suspend and resume support
  [ARM] 4780/1: S3C2412: Allow for seperate DMA channels for TX and RX
  [ARM] 4779/1: S3C2412: Add s3c2412_gpio_set_sleepcfg() call
  [ARM] 4778/1: S3C2412: Add armclk and init from DVS state
  [ARM] 4777/1: S3C24XX: Ensure clk_set_rate() checks the set_rate method for the clk
  [ARM] 4775/1: s3c2410: fix compilation error if only s3c2442 cpu is selected
  ...

* sa1100:
  [ARM] sa1100: add clock source support

* vfp:
  [ARM] 4584/2: ARMv7: Add Advanced SIMD (NEON) extension support
  [ARM] 4583/1: ARMv7: Add VFPv3 support
  [ARM] 4582/2: Add support for the common VFP subarchitecture
2008-01-28 13:21:21 +00:00
David Brownell 6d16bfb5e8 i2c/tps65010: move header to <linux/i2c/...>
Move the tps65010 header file from the OMAP arch directory to the
more generic <linux/i2c/...> directory, and remove the spurious
dependency of this driver on OMAP.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-01-27 18:14:49 +01:00
Jean Delvare 05c7abaeb3 i2c: Kill rogue driver IDs
I2C driver IDs are optional, so if you don't need one, just omit it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-01-27 18:14:47 +01:00
Jean Delvare 2cdddeb8d7 i2c: normal_i2c can be made const (remaining drivers)
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-01-27 18:14:47 +01:00
Grant Likely 66ffbe490b [POWERPC] mpc5200: normalize compatible property bindings
Update MPC5200 drivers to also look for compatible properties in the
form "fsl,mpc5200-*" to better conform to open firmware generic names
recommended practice as published here:

http://www.openfirmware.org/1275/practice/gnames/gnamv14a.html

This patch should *not* break compatibility with older device trees
which do not use the 'fsl,' prefix.  The drivers will still bind against
the older names also.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2008-01-26 15:26:01 -07:00
eric miao e77ec1898f [ARM] USB: update to allow pxa27x ohci driver to support pxa3xx
Signed-off-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-26 15:07:53 +00:00
eric miao a8bcf4108d [ARM] USB: update pxa27x ohci driver to use clk support
Signed-off-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-26 15:07:53 +00:00
Andrew Victor 2b3b3516b6 [ARM] 4764/1: [AT91] AT91CAP9 core support
Add support for Atmel's AT91CAP9 Customizable Microcontroller family.
  <http://www.atmel.com/products/AT91CAP/Default.asp>

Signed-off-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-26 15:01:13 +00:00
Linus Torvalds 9b73e76f3c Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (200 commits)
  [SCSI] usbstorage: use last_sector_bug flag universally
  [SCSI] libsas: abstract STP task status into a function
  [SCSI] ultrastor: clean up inline asm warnings
  [SCSI] aic7xxx: fix firmware build
  [SCSI] aacraid: fib context lock for management ioctls
  [SCSI] ch: remove forward declarations
  [SCSI] ch: fix device minor number management bug
  [SCSI] ch: handle class_device_create failure properly
  [SCSI] NCR5380: fix section mismatch
  [SCSI] sg: fix /proc/scsi/sg/devices when no SCSI devices
  [SCSI] IB/iSER: add logical unit reset support
  [SCSI] don't use __GFP_DMA for sense buffers if not required
  [SCSI] use dynamically allocated sense buffer
  [SCSI] scsi.h: add macro for enclosure bit of inquiry data
  [SCSI] sd: add fix for devices with last sector access problems
  [SCSI] fix pcmcia compile problem
  [SCSI] aacraid: add Voodoo Lite class of cards.
  [SCSI] aacraid: add new driver features flags
  [SCSI] qla2xxx: Update version number to 8.02.00-k7.
  [SCSI] qla2xxx: Issue correct MBC_INITIALIZE_FIRMWARE command.
  ...
2008-01-25 17:19:08 -08:00
Hans de Goede 23c3e290fb [SCSI] usbstorage: use last_sector_bug flag universally
This patch sets the last_sector_bug flag to 1 for all USB disks. This is
needed to makes the cardreader on various HP multifunction printers work.

Since the performance impact is negible we set this flag for all USB disks to
avoid an unusual_devs.h nightmare.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Acked-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-25 16:50:31 -06:00
Greg Kroah-Hartman 15147ffd57 USB: use proper call to driver_create_file
Don't try to call the "raw" sysfs_create_file when we already have a
helper function to do this kind of work for us.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24 20:40:33 -08:00
Alan Cox a5569a565f keyspan: fix oops
If we get a data URB back from the hardware after we have put the tty to
bed we go kaboom.  Fortunately all we need to do is process the URB without
trying to ram its contents down the throat of an ex-tty.

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@akpm@linux-foundation.org>
2008-01-21 19:39:41 -08:00
James Bottomley 465ff3185e [SCSI] relax scsi dma alignment
This patch relaxes the default SCSI DMA alignment from 512 bytes to 4
bytes.  I remember from previous discussions that usb and firewire have
sector size alignment requirements, so I upped their alignments in the
respective slave allocs.

The reason for doing this is so that we don't get such a huge amount of
copy overhead in bio_copy_user() for udev.  (basically all inquiries it
issues can now be directly mapped).

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-11 18:29:22 -06:00
Boaz Harrosh 48c23d3e37 [SCSI] isd200: use one-element sg list in issuing commands
- This patch should be commited before:
    usb: transport - convert to accessors and !use_sg code path removal

  - isd200_action() was still using direct liniar pointers in issuing
    commands to the USB transport level. This is no longer supported,
    use one-element scatterlist instead.
  - Adjustment of command's length in the case of scsi-to-ata translation
    is now restored before return to queuecommand, since other wise it can
    leak BIOs.
  - isd200_action() return Error on unknown requests. Used to print an error
    but still try to send garbage cdb.
  - convert few places to scsi data accessors.
  - Todo: This file will need to be changed when scsi_cmnd changes to
    scsi_data_buffer or any other solution.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Acked-by: Matthew Dharm <mdharm-scsi@one-eyed-alien.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-11 18:22:38 -06:00
Boaz Harrosh 6d416e6173 [SCSI] usb: transport - convert to accessors and !use_sg code path removal
- This patch depends on:
    usb: transport.c use scsi_eh API in REQUEST_SENSE execution

  - Use scsi data accessors and remove of !use_sg code path.
  - New usb_stor_bulk_srb() for use by drivers

[jejb: updated with corrective fix.

had a bug in residual handling in the new usb_stor_bulk_srb()
function.  Found by Gabriel C. in -mm tree.

Tested-by: Gabriel C <nix.or.die@googlemail.com>
]

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Acked-by: Matthew Dharm <mdharm-scsi@one-eyed-alien.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-11 18:22:38 -06:00
Boaz Harrosh 4776e99ebb [SCSI] usb: shuttle_usbat - convert to accessors and !use_sg code path removal
- functions that received char* but where passed scatterlist* mostly
   were changed to receive void*
 - Use scsi data accessors and remove of !use_sg code path

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Acked-by: Matthew Dharm <mdharm-scsi@one-eyed-alien.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-11 18:22:37 -06:00
Boaz Harrosh 41c2497b18 [SCSI] usb: freecom & sddr09 - convert to accessors and !use_sg cleanup
- Use scsi data accessors and remove of !use_sg code path
 - This patch is dependent on cleanup patch to usb transport.c/h

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Acked-by: Matthew Dharm <mdharm-scsi@one-eyed-alien.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-11 18:22:36 -06:00
Boaz Harrosh dd829d2302 [SCSI] usb: protocol - convert to accessors and !use_sg code path removal
- Use scsi data accessors and remove of !use_sg code path

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Acked-by: Matthew Dharm <mdharm-scsi@one-eyed-alien.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-11 18:22:36 -06:00
Alan Cox bf5e5834bf pl2303: Fix mode switching regression
Cleaning out all the incorrect 'no change made' checks for termios
settings showed up a problem with the PL2303. The hardware here seems to
lose sync and bits if you tell it to make no changes. This shows up with
a real world application.

To fix this the driver check for meaningful hardware changes is restored
but doing the tests correctly and as a tty layer function so it doesn't
get duplicated wrongly everywhere if other drivers turn out to need it.

Signed-off-by: Alan Cox <alan@redhat.com>
Tested-by: Mirko Parthey <mirko.parthey@informatik.tu-chemnitz.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-08 16:16:34 -08:00
Martin Kusserow 014840ec57 USB: New device ID for the CP2101 driver
attached please find a new device ID for CP2101 driver. This device is a
usb stick from Dynastream to communicate with ANT wireless devices which
I suppose is fairly similar to the ANT dev board having product id 0x1003.

From: Martin Kusserow <kusserow@ife.ee.ethz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-22 23:14:33 -08:00
Kevin R Page ed0ccdbb61 USB: VID/PID update for sierra
Adds VID/PID for the MC8775 found internally in the Thinkpad X61s laptop
(and likely others). For commercial reasons the driver maintainer cannot
add VID/PIDs for laptop OEM devices himself.

Signed-off-by: Kevin R Page <linux-kernel@krp.org.uk>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-22 23:14:33 -08:00
Peter Korsgaard 3bf44688df USB: Unbreak fsl_usb2_udc
Commit a4e3ef5... (USB: gadget: gadget_is_{dualspeed,otg} predicates
and cleanup) broke fsl_usb2_udc; the build test didn't cover peripheral
drivers, just gadget drivers.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-22 23:14:33 -08:00
Greg Kroah-Hartman e70e7690b6 USB: revert portions of "UNUSUAL_DEV: Sync up some reported devices from Ubuntu"
This reverts one change from 67fa10627e
that prevented userspace from seing the "driver disk" lun in a san disk
device.  The kernel shouldn't do this, it's up to userspace to handle
this properly, if it somehow wants to filter this away.


Cc: Ben Collins <bcollins@ubuntu.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Phil Dibowitz <phil@ipom.com>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Cc: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-17 10:47:16 -08:00
Benjamin Herrenschmidt 565227c082 usb: Remove broken optimisation in OHCI IRQ handler
The OHCI IRQ handler has an optimisation that avoids reading some
chip registers when the controller reports that the interrupt was
triggered *only* because completed requests were written into the
controller's "done list" and handed to the host.

This mechanism can't be used on some controllers.  Among others, it
fails for the SA1111 and the AMCC 440EP PowerPC processor.

This patch removes the optimisation and makes the code clearer.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-17 10:47:15 -08:00
Nicolas Ferre 08cbc706ac USB: at91_udc: correct hanging while disconnecting usb cable
Correct hanging while disconnecting the USB device cable.  Prevent a race
between vbus and UDP interrupts.  This bug was tracked on at91sam9260ek
boards.

A usb resume interrupt was firing after the vbus interrupt : the IP was
then already stoped and not able to deal with it (no more clock).  A simple
interrupt disabling is ok as the "end of bus reset" irq is non maskable and
ok to resume the USB device IP.

Signed-off-by: Nicolas Ferre <nicolas.ferre@rfo.atmel.com>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-17 10:47:15 -08:00
Alan Stern 442258e2ff USB: use IRQF_DISABLED for HCD interrupt handlers
Host controller IRQs are supposed to be serviced with interrupts
disabled.  This patch (as1026) adds an IRQF_DISABLED flag to all the
controller drivers that lack it.  It also replaces the
spin_lock_irqsave() and spin_unlock_irqrestore() calls in uhci_irq()
with simple spin_lock() and spin_unlock().

This fixes Bugzilla #9335.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-17 10:47:15 -08:00
Alan Stern d48bd977e0 USB: fix locking loop by avoiding flush_scheduled_work
This patch (as1027) replaces a call to flush_scheduled_work() -- a
dangerous routine to invoke, especially while holding any sort of lock
-- with calls to cancel_work_sync() and cancel_delayed_work_sync().

This fixes Bugzilla #9532.

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-12-17 10:47:15 -08:00
Jaime Velasco Juan b5ce18afec USB: option: Bind to the correct interface of the Huawei E220
This fixes a bunch of problems we are having with the Huawei devices...


Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Jaime Velasco Juan <jsagarribay@gmail.com>
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-17 10:47:15 -08:00
Jeff Long 8be27c2de6 USB: cp2101: new device id
This adds a device ID for the Aerocomm Radio Modem, which uses the
cp2102.  I'm sure changing num_bulk_in/num_bulk_out to NUM_DONT_CARE
is the wrong fix, but this is the only device I have with a cp2102,
so I have no idea what a good global value would be, if there is one.
Zero didn't work with this device.

From: Jeff Long <JeffLong@mitre.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-17 10:47:14 -08:00
Doug Maxey 33abc04f04 usb-storage: Fix devices that cannot handle 32k transfers
When a device cannot handle the smallest previously limited transfer
size (64 blocks) without stalling, limit the device to the amount of
packets that fit in a platform native page.

The lowest possible limit is PAGE_CACHE_SIZE, so if the device is ever
used on a platform that has larger than 8K pages, you lose unless you
can convince the device firmware folks to fix the issue.

Cc: Mathew Dharm <mdharm-scsi@one-eyed-alien.net>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Doug Maxey <dwm@austin.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-17 10:47:14 -08:00
agilmore@wirelessbeehive.com b9e13ac30f USB: sierra: fix product id
Attached is a patch to fix the addition of the new product ids I sent.

It is against 2.6.24-rc4, as Linus included the broken version of the
patch I sent you in that tree. :(

Not sure if this is the right method to go about this, but hopefully I got
it right this time.

Signed-off-by: Andrew Gilmore <agilmore@wirelessbeehive.com>
CC: Kevin Lloyd <klloyd@sierrawireless.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-17 10:47:14 -08:00
Andrew Morton f78ba15705 revert "keyspan: init termios properly"
Revert 7eea436433.

Lucy said:

  This patch will work with the 19HS but WILL BREAK all other Keyspan
  adapters.  It will take me a few days to get to looking at a correct fix but
  that keyspan_send_setup(port, 1) (and the '1' is the important part) must
  happen once when the port is first opened.  The cflag can just be set to
  whatever the normal default is for your serial environment.

So revert this again pending the proper fix.

Cc: Borislav Petkov <bbpetkov@yahoo.de>
Cc: Greg KH <greg@kroah.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Lucy McCoy <lucy@keyspan.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-29 09:24:54 -08:00
Ben Dooks 5f629ad7e5 USB: s3c2410 gadget: ensure vbus pin in input mode during read
Some CPUs in the S3C24XX series do not support readback of the
value of a pin when the pin has been configured to an IRQ.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28 13:58:36 -08:00
Ben Dooks 8802bca4fe USB: s3c2410 gadget: allow sharing of vbus irq
If another driver wants to claim the vbus pin, say
to notify the user of an connect/disconnect then allow
the IRQ to be shared by specifiying IRQ_SHARED in the
flags.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28 13:58:36 -08:00
Ben Dooks 899d566a6e USB: s3c2410 gadget: Header move fixups
Fixup the fallout from the arch moves earlier in the kernel
series.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
2007-11-28 13:58:36 -08:00
Alan Stern f1e8de0dbb USB: usb-storage: unusual_devs entry for JetFlash TS1GJF2A
This patch (as1018) adds an unusual_devs entry for the JetFlash
TS1GJF2A.  This device doesn't like read requests for more than 188
sectors.  Setting max_sectors down to 64 is overkill, but at least
it will work without errors.

For the torturous debugging history, see this thread:

	http://marc.info/?t=118745764700005&r=1&w=2

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28 13:58:36 -08:00
David Brownell 1cb52658b4 USB: fix up EHCI startup synchronization
A recent patch added software synchronization during EHCI startup,
so ports aren't switched away from the companion controllers after
resets have started.  This patch adds a short delay letting hardware
finish that port switching before any new resets begin ... so both
ends of that hardware race window are closed.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Dave Miller <davem@davemloft.net>
Cc: Dely Sy <dely.l.sy@intel.com>
Cc: stable <stable@kernel.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28 13:58:36 -08:00
Oliver Neukum 5cf1973a44 USB: make the microtek driver and HAL cooperate
to make HAL like the microtek driver's devices the parent must be
correctly set.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28 13:58:35 -08:00
Alan Stern 4a9bee8256 USB: uevent environment key fix
This patch (as1010) was written by both Kay Sievers and me.  It solves
the problem of duplicated keys in USB uevent structures by refactoring
the uevent subroutines, taking advantage of the way the hotplug core
calls uevent handlers for the device's bus and for the device's type.
Keys needed for both USB-device and USB-interface events are added in
usb_uevent(), which is the bus handler.  Keys appropriate only for
USB-device or USB-interface events are added in usb_dev_uevent() or
usb_if_uevent() respectively, the type handlers.

In addition, unnecessary tests for NULL pointers are removed as are
duplicated debugging log statements.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28 13:58:35 -08:00
Alan Stern 7e61559f61 USB: keep track of whether interface sysfs files exist
This patch (as1009) solves the problem of multiple registrations for
USB sysfs files in a more satisfying way than the existing code.  It
simply adds a flag to keep track of whether or not the files have been
created; that way the files can be created or removed as needed.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
2007-11-28 13:58:35 -08:00
agilmore@wirelessbeehive.com 5fdcd0396b USB: sierra: new product id
Per the maintainer of the usbserial/sierra.c driver, the patch below adds
a new id to the list of supported cards for the sierra driver. Tested and
working for me on Fedora 8, kernel 2.6.23 and on the more recent sierra.c
available in
http://www.sierrawireless.com/resources/support/Software/Linux/v.1.2.6b(kernel2.6.21).zip

Hardware is a MiniPCI card in a Lenovo T61p.


Signed-off-by: Andrew Gilmore <agilmore@wirelessbeehive.com>
Cc: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28 13:58:35 -08:00
Alan Stern ddc1fd6ac1 USB HCD: avoid duplicate local_irq_disable()
Arnd Bergmann wrote:

usb_hcd_flush_endpoint() has a retry loop that starts with a spin_lock_irq(),
but only gives up the spinlock, not the irq_disable before jumping to the
rescan label.

Alan Stern:

I agree with your sentiment, but it would be better to solve this
problem without using local_irq_disable().

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28 13:58:35 -08:00
Dirk Hohndel 9e3e31046f USB: fix directory references in usb/README
Another one in the "ok, this is trivial to fix" list... :-)

[PATCH] fix directory references in usb/README

Signed-off-by: Dirk Hohndel <hohndel@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28 13:58:34 -08:00
Mike Pagano 034fec2e75 USB: add support for an older firmware revision for the Nikon D200
This is a resubmission of the patch to upgrade the unusual_devs.h file to
support an older firmware revision of the Nikon D200. This patch includes the
requested /proc/bus/usb/devices information.

T:  Bus=01 Lev=01 Prnt=01 Port=09 Cnt=02 Dev#=  6 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=04b0 ProdID=040f Rev= 1.00
S:  Manufacturer=NIKON
S:  Product=NIKON DSC D200
S:  SerialNumber=0000000
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

Signed-off-by: Mike Pagano <mpagano@gentoo.org>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28 13:58:34 -08:00
Pete Zaitcev f08812d5eb USB: FIx locks and urb->status in adutux (updated)
Two main issues fixed here are:
 - An improper use of in-struct lock to protect an open count
 - Use of urb status for -EINPROGRESS

Also, along the way:
 - Change usb_unlink_urb to usb_kill_urb. Apparently there's no need
   to use usb_unlink_urb whatsoever in this driver, and the old use of
   usb_kill_urb was outright racy (it unlinked and immediately freed).
 - Fix indentation in adu_write. Looks like it was damaged by a script.
 - Vitaly wants -EBUSY on multiply opens.
 - bInterval was taken from a wrong endpoint.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Vitaliy Ivanov <vitalivanov@gmail.com>
Tested-by: Vitaliy Ivanov <vitalivanov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28 13:58:34 -08:00
Borislav Petkov bfaeafcfc2 usbserial: fix inconsistent lock state
In commit acd2a847e7 usb_serial_generic_write()
disables interrupts when taking &port->lock which is also taken in
usb_serial_generic_read_bulk_callback() resulting in an inconsistent lock state
due to the latter not disabling interrupts on the local cpu. Fix that by
disabling interrupts in the latter call site also.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28 13:58:34 -08:00
Oliver Neukum ed206ec9ab USB: fix usbled disconnect read race #2
usbled has a race where show methods for attributes in sysfs can
follow a NULL pointer during disconnect. The correct ordering fixes
it.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28 13:58:33 -08:00
Roel Kluin 7ced46c3ad USB: free memory when writing fails in usb/serial/mos7840.c
Free buffer when writing ZLP_REG5 failed

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28 13:58:33 -08:00
Roel Kluin 2e2c5eea95 USB: Fix priority mistakes in drivers/usb/core/hub.c
Fixes priority mistakes similar to '!x & y'

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28 13:58:33 -08:00
Mauro Carvalho Chehab f09e495df2 usb-storage: always set the allow_restart flag
This patch (as1000) sets the SCSI allow_restart flag for USB disk
devices.  In theory this should never hurt, and there definitely are
devices out there (such as the Seagate 250-GB external drive) which
need the flag to be set.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28 13:58:33 -08:00
Magnus Damm 9e3285dba5 USB: pl2303: add support for Corega CG-USBRS232R
pl2303: add support for Corega CG-USBRS232R

This patch adds support for Corega CG-USBRS232R Serial Adapters.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28 13:58:33 -08:00
David Brownell 9cfbba7311 USB: omap_udc build fix
This fixes some build errors ... unclear how this got past earlier tests.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28 13:58:33 -08:00
Adrian Bunk 1011b326b1 USB: fix USB_OHCI_HCD_SSB dependencies
This patch fixes a bug introduced by
commit b22817b3c8.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28 13:58:32 -08:00
Borislav Petkov 7eea436433 keyspan: init termios properly
Remove redundant code leading to NULL ptr deref and let terminal config
settings take place in the proper initialization path in
usb_console_setup().

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Cc: <lucy@keyspan.com>
Cc: Greg KH <greg@kroah.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:44 -08:00
Adrian Bunk 87ae9afdca cleanup asm/scatterlist.h includes
Not architecture specific code should not #include <asm/scatterlist.h>.

This patch therefore either replaces them with
#include <linux/scatterlist.h> or simply removes them if they were
unused.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-11-02 08:47:06 +01:00
Joerg Roedel 966396d3a0 x86 gart: rename CONFIG_IOMMU to CONFIG_GART_IOMMU
This patch renames the IOMMU config option to GART_IOMMU because in fact it
means the GART and not general support for an IOMMU on x86.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Acked-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-30 00:22:22 +01:00
Oliver Neukum d5d1ceac2a USB: open disconnect race in usblcd
this driver has a possible use after free due to a race when disconnect
and open handle intfdata without a lock.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:46 -07:00
Oliver Neukum 78663ecc34 USB: disconnect open race in legousbtower
again, possible use after free due to touching intfdata without lock.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:46 -07:00
Oliver Neukum 03f36e885f USB: open disconnect race in iowarrior
the driver sets intfdata to NULL without lock. Data structures can be
freed and accessed.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:46 -07:00
Oliver Neukum 5919a43bbc USB: missing error check in emi62
the emi62 also lacks an error check.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:45 -07:00
Oliver Neukum cf4cf0bb89 USB: missing error check in emi26
this drivers lacks an error check.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:45 -07:00
Sarah Sharp 8abaee238e USB: usb_serial_resume bug fix
Avoid potential null pointer dereference.

Signed-off-by: Sarah Sharp <sarah.a.sharp@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:45 -07:00
David Brownell da6fb5704f USB: remove new OHCI build warnings
Remove various newly-introduced compiler warnings for OHCI.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:45 -07:00
David Brownell 51745281b0 USB: amd5536udc - remove set_mwi() compiler warning
Get rid of pointless pci_set_mwi() compiler warning.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:45 -07:00
Jiri Kosina acd2a847e7 USB: usbserial - fix potential deadlock between write() and IRQ
USB: usbserial - fix potential deadlock between write() and IRQ

usb_serial_generic_write() doesn't disable interrupts when taking port->lock,
and could therefore deadlock with usb_serial_generic_read_bulk_callback()
being called from interrupt, taking the same lock. Fix it.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Acked-by: Larry Finger <larry.finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:45 -07:00
Masakazu Mokuno 8a28dea3ac usb: serial/pl2303: support for IO Data Device RSAQ5
This patch adds support for the IO Data Device USB-RSAQ5, PL2303 based
USB-serial converter, to pl2303 driver

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:45 -07:00
Oliver Neukum d718d2b178 USB: fix read vs. disconnect race in cytherm driver
the disconnect method of this driver set intfdata to NULL before
removing attribute files. The attributes' read methods will happily
follow the NULL pointer. Here's the correct ordering.

Signed-off-by : Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:44 -07:00