]> err.no Git - linux-2.6/log
linux-2.6
16 years agospecialix: restore driver using new break functionality
Alan Cox [Tue, 22 Jul 2008 10:19:05 +0000 (11:19 +0100)]
specialix: restore driver using new break functionality

Use the hardware break support on the specialix driver

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFix the (i)Stallion driver's putchar() and break_ctl() ops
David Howells [Tue, 22 Jul 2008 10:18:43 +0000 (11:18 +0100)]
Fix the (i)Stallion driver's putchar() and break_ctl() ops

Fix the Stallion driver's putchar() and break_ctl() ops and iStallion's
putchar() to return values.

Is it actually possible for putchar() or break_ctl() to be called with tty ==
NULL or can the check be discarded?

Should stl_write() be returning 0 if tty->driver_data is NULL or tx.buf is
NULL?  Is this even possible?

I've made Stallion's functions return -EINVAL as stli_breakctl() if the checks
fail.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoriscom8: Restore driver using new break functionality
Alan Cox [Tue, 22 Jul 2008 10:18:30 +0000 (11:18 +0100)]
riscom8: Restore driver using new break functionality

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoisicom: restore using hardware break support
Alan Cox [Tue, 22 Jul 2008 10:18:21 +0000 (11:18 +0100)]
isicom: restore using hardware break support

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoepca: Restore driver
Alan Cox [Tue, 22 Jul 2008 10:18:12 +0000 (11:18 +0100)]
epca: Restore driver

Convert the driver to use the added hardware break support

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: rework break handling
Alan Cox [Tue, 22 Jul 2008 10:18:03 +0000 (11:18 +0100)]
tty: rework break handling

Some hardware needs to do break handling itself and may have partial
support only. Make break_ctl return an error code. Add a tty driver flag
so you can indicate driver hardware side break support.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: Mark unconverted drivers as BROKEN
Alan Cox [Tue, 22 Jul 2008 10:17:53 +0000 (11:17 +0100)]
tty: Mark unconverted drivers as BROKEN

Nobody seems to use these drivers anyway so if they want them they can
fix them up. I don't have the needed info to add break_ctl support to them.
Send patches if you don't like it.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomxser: remove dead code
Alan Cox [Tue, 22 Jul 2008 10:17:43 +0000 (11:17 +0100)]
mxser: remove dead code

Old style ioctl break code can go

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoepca: Fix comments and move break
Alan Cox [Tue, 22 Jul 2008 10:17:32 +0000 (11:17 +0100)]
epca: Fix comments and move break

The ioctls it talks about are midlayer provided.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agospecialix: Code cleanups
Alan Cox [Tue, 22 Jul 2008 10:17:16 +0000 (11:17 +0100)]
specialix: Code cleanups

Go through the inlines and other oddments that are iffy. Remove various bits
of dead code and bogus debug. Turn the crtsdts compile time option into a
runtime switch.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agospecialix: Tidy up coding style
Alan Cox [Tue, 22 Jul 2008 10:17:05 +0000 (11:17 +0100)]
specialix: Tidy up coding style

Preparation for doing some real work on the driver. Do this first so we can
easily identify if the cleanups accidentally broke something

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty: Split ldisc code into its own file
Alan Cox [Tue, 22 Jul 2008 10:16:55 +0000 (11:16 +0100)]
tty: Split ldisc code into its own file

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoio_edgeport: Fix various bogus returns to the tty layer
Alan Cox [Tue, 22 Jul 2008 10:16:42 +0000 (11:16 +0100)]
io_edgeport: Fix various bogus returns to the tty layer

The edgeport reports negative error codes to functions that do not
expect them. This can cause ports to jam forever

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty-usb-io_edgeport: Coding style
Alan Cox [Tue, 22 Jul 2008 10:16:34 +0000 (11:16 +0100)]
tty-usb-io_edgeport: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty-usb-mos7720: Coding style
Alan Cox [Tue, 22 Jul 2008 10:16:21 +0000 (11:16 +0100)]
tty-usb-mos7720: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomos7840: remove loads of bogus assignments to status
Alan Cox [Tue, 22 Jul 2008 10:16:12 +0000 (11:16 +0100)]
mos7840: remove loads of bogus assignments to status

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoomninet: Use string flip functions
Alan Cox [Tue, 22 Jul 2008 10:16:03 +0000 (11:16 +0100)]
omninet: Use string flip functions

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty-usb-omninet: Coding style
Alan Cox [Tue, 22 Jul 2008 10:15:54 +0000 (11:15 +0100)]
tty-usb-omninet: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty-usb-option: Coding style
Alan Cox [Tue, 22 Jul 2008 10:15:45 +0000 (11:15 +0100)]
tty-usb-option: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty-usb-oti6858: Coding style
Alan Cox [Tue, 22 Jul 2008 10:15:36 +0000 (11:15 +0100)]
tty-usb-oti6858: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty-usb-safe-serial: Coding style
Alan Cox [Tue, 22 Jul 2008 10:15:26 +0000 (11:15 +0100)]
tty-usb-safe-serial: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty-usb-ti-usb: Coding style
Alan Cox [Tue, 22 Jul 2008 10:15:17 +0000 (11:15 +0100)]
tty-usb-ti-usb: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty-usb-spcp8x5: Minor coding style
Alan Cox [Tue, 22 Jul 2008 10:15:08 +0000 (11:15 +0100)]
tty-usb-spcp8x5: Minor coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty-usb-sierra: Coding style - minor
Alan Cox [Tue, 22 Jul 2008 10:14:59 +0000 (11:14 +0100)]
tty-usb-sierra: Coding style - minor

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty-usb-pl2303: Coding style
Alan Cox [Tue, 22 Jul 2008 10:14:49 +0000 (11:14 +0100)]
tty-usb-pl2303: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomct_u232: Use flip buffer functions
Alan Cox [Tue, 22 Jul 2008 10:14:40 +0000 (11:14 +0100)]
mct_u232: Use flip buffer functions

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty-usb-mct-u232: Coding style
Alan Cox [Tue, 22 Jul 2008 10:14:30 +0000 (11:14 +0100)]
tty-usb-mct-u232: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agokobil_sct: Fix ioctls
Alan Cox [Tue, 22 Jul 2008 10:14:22 +0000 (11:14 +0100)]
kobil_sct: Fix ioctls

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty-usb-kobil-sct: Coding style
Alan Cox [Tue, 22 Jul 2008 10:14:10 +0000 (11:14 +0100)]
tty-usb-kobil-sct: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty-usb-kl5kusb105: Coding style
Alan Cox [Tue, 22 Jul 2008 10:14:00 +0000 (11:14 +0100)]
tty-usb-kl5kusb105: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agokeyspan_pda: Use string flip functions
Alan Cox [Tue, 22 Jul 2008 10:13:51 +0000 (11:13 +0100)]
keyspan_pda: Use string flip functions

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty-usb-keyspan-pda: Coding style
Alan Cox [Tue, 22 Jul 2008 10:13:42 +0000 (11:13 +0100)]
tty-usb-keyspan-pda: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agokeyspan: Use string flip functions when possible
Alan Cox [Tue, 22 Jul 2008 10:13:32 +0000 (11:13 +0100)]
keyspan: Use string flip functions when possible

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty-usb-keyspan: Coding style
Alan Cox [Tue, 22 Jul 2008 10:13:08 +0000 (11:13 +0100)]
tty-usb-keyspan: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty-usb-iuu-phoenix: Clean up to coding style
Alan Cox [Tue, 22 Jul 2008 10:12:59 +0000 (11:12 +0100)]
tty-usb-iuu-phoenix: Clean up to coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty-usb-ipw: Coding style
Alan Cox [Tue, 22 Jul 2008 10:12:51 +0000 (11:12 +0100)]
tty-usb-ipw: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoipaq: Coding style
Alan Cox [Tue, 22 Jul 2008 10:12:41 +0000 (11:12 +0100)]
ipaq: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoio_ti: Minor coding style
Alan Cox [Tue, 22 Jul 2008 10:12:33 +0000 (11:12 +0100)]
io_ti: Minor coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agousb-serial: Coding style
Alan Cox [Tue, 22 Jul 2008 10:12:24 +0000 (11:12 +0100)]
usb-serial: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty-usb-visor: Coding style
Alan Cox [Tue, 22 Jul 2008 10:12:15 +0000 (11:12 +0100)]
tty-usb-visor: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty-usb-hp4x: Fix overlong line
Alan Cox [Tue, 22 Jul 2008 10:12:05 +0000 (11:12 +0100)]
tty-usb-hp4x: Fix overlong line

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty-usb-generic: Code cleanup
Alan Cox [Tue, 22 Jul 2008 10:11:55 +0000 (11:11 +0100)]
tty-usb-generic: Code cleanup

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agogarmin_gps: Coding style
Alan Cox [Tue, 22 Jul 2008 10:11:44 +0000 (11:11 +0100)]
garmin_gps: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofunsoft: Switch to linux/uaccess
Alan Cox [Tue, 22 Jul 2008 10:11:34 +0000 (11:11 +0100)]
funsoft: Switch to linux/uaccess

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoftdi_sio: Coding style
Alan Cox [Tue, 22 Jul 2008 10:11:23 +0000 (11:11 +0100)]
ftdi_sio: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoempeg: Coding style
Alan Cox [Tue, 22 Jul 2008 10:11:11 +0000 (11:11 +0100)]
empeg: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodigi_acceleport: coding style
Alan Cox [Tue, 22 Jul 2008 10:11:02 +0000 (11:11 +0100)]
digi_acceleport: coding style

Code tidy

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agousb-cypress: There is no 0 case to go with CS5/6/7/8 so remove the test
Alan Cox [Tue, 22 Jul 2008 10:10:53 +0000 (11:10 +0100)]
usb-cypress: There is no 0 case to go with CS5/6/7/8 so remove the test

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocypress_m8: coding style
Alan Cox [Tue, 22 Jul 2008 10:10:36 +0000 (11:10 +0100)]
cypress_m8: coding style

Coding style clean ups

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocyberjack: Coding style
Alan Cox [Tue, 22 Jul 2008 10:10:27 +0000 (11:10 +0100)]
cyberjack: Coding style

Coding style fixups

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocp2101: coding style
Alan Cox [Tue, 22 Jul 2008 10:10:17 +0000 (11:10 +0100)]
cp2101: coding style

Bring up to coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty-usb-console: Fix termios
Alan Cox [Tue, 22 Jul 2008 10:10:08 +0000 (11:10 +0100)]
tty-usb-console: Fix termios

Setting CFLAG bits is all well and good but you must sort out ispeed and
ospeed properly.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotty-usb-console: tidy the USB console code
Alan Cox [Tue, 22 Jul 2008 10:09:57 +0000 (11:09 +0100)]
tty-usb-console: tidy the USB console code

Code tidy

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agousb-serial-bus: tidy coding style
Alan Cox [Tue, 22 Jul 2008 10:09:48 +0000 (11:09 +0100)]
usb-serial-bus: tidy coding style

Tidy up

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agobelkin_sa: clean up code
Alan Cox [Tue, 22 Jul 2008 10:09:39 +0000 (11:09 +0100)]
belkin_sa: clean up code

Coding style tidy up for belkin_sa

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agowhiteheat: fix bugs found in the tidy and audit
Alan Cox [Tue, 22 Jul 2008 10:09:29 +0000 (11:09 +0100)]
whiteheat: fix bugs found in the tidy and audit

Termios tidy up, plus fix break and DTR.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agowhiteheat: coding style
Alan Cox [Tue, 22 Jul 2008 10:09:16 +0000 (11:09 +0100)]
whiteheat: coding style

Bring ezusb and whiteheat into line with the coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agousb_serial: API all change
Alan Cox [Tue, 22 Jul 2008 10:09:07 +0000 (11:09 +0100)]
usb_serial: API all change

USB serial likes to use port->tty back pointers for the real work it does and
to do so without any actual locking. Unfortunately when you consider hangup
events, hangup/parallel reopen or even worse hangup followed by parallel close
events the tty->port and port->tty pointers are not guaranteed to be the same
as port->tty is the active tty while tty->port is the port the tty may or
may not still be attached to.

So rework the entire API to pass the tty struct. For console cases we need
to pass both for now. This shows up multiple drivers that immediately crash
with USB console some of which have been fixed in the process.

Longer term we need a proper tty as console abstraction

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agottydev: Fix up compile failures in the PPC build
Alan Cox [Tue, 22 Jul 2008 10:08:53 +0000 (11:08 +0100)]
ttydev: Fix up compile failures in the PPC build

Fix up a couple of reported merge problems

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomarkers: fix duplicate modpost entry
Mathieu Desnoyers [Mon, 21 Jul 2008 21:21:38 +0000 (14:21 -0700)]
markers: fix duplicate modpost entry

When a kernel was rebuilt, the previous Module.markers was not cleared.
It caused markers with different format strings to appear as duplicates
when a markers was changed.  This problem is present since
scripts/mod/modpost.c started to generate Module.markers, commit
b2e3e658b344c6bcfb8fb694100ab2f2b5b2edb0

It therefore applies to 2.6.25, 2.6.26 and linux-next.

I merely merged the patches from Roland, Wenji and Takashi here.

Credits to
Roland McGrath <roland@redhat.com>
Wenji Huang <wenji.huang@oracle.com>
and
Takashi Nishiie <t-nishiie@np.css.fujitsu.com>

for providing the individual fixes.

- Changelog :
  - Integrated Takashi's Makefile modification to clear Module.markers upon
    make clean.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Roland McGrath <roland@redhat.com>
Cc: Wenji Huang <wenji.huang@oracle.com>
Cc: Takashi Nishiie <t-nishiie@np.css.fujitsu.com>
Cc: <stable@kernel.org> [2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFix build on COMPAT platforms when CONFIG_EPOLL is disabled
Atsushi Nemoto [Mon, 21 Jul 2008 21:21:37 +0000 (14:21 -0700)]
Fix build on COMPAT platforms when CONFIG_EPOLL is disabled

Add missing cond_syscall() entry for compat_sys_epoll_pwait.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Davide Libenzi <davidel@xmailserver.org>
Cc: <stable@kernel.org> [2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agotpm: MAINTAINERS whitespace fix and email addresses addition
Rajiv Andrade [Mon, 21 Jul 2008 21:21:37 +0000 (14:21 -0700)]
tpm: MAINTAINERS whitespace fix and email addresses addition

Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoproc: fix /proc/*/pagemap some more
Alexey Dobriyan [Mon, 21 Jul 2008 21:21:36 +0000 (14:21 -0700)]
proc: fix /proc/*/pagemap some more

struct pagemap_walk was placed on stack, some hooks are initialized, the
rest (->pgd_entry, ->pud_entry, ->pte_entry) are valid but junk.

Reported-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: "Vegard Nossum" <vegard.nossum@gmail.com>
Cc: <stable@kernel.org> [2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocpusets: fix wrong domain attr updates
Miao Xie [Mon, 21 Jul 2008 21:21:35 +0000 (14:21 -0700)]
cpusets: fix wrong domain attr updates

Fix wrong domain attr updates, or we will always update the first sched
domain attr.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Cc: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Paul Jackson <pj@sgi.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: <stable@kernel.org> [2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agogpio: pcf857x: add lock and handle more chips
David Brownell [Mon, 21 Jul 2008 21:21:34 +0000 (14:21 -0700)]
gpio: pcf857x: add lock and handle more chips

Two small updates to the pcf857x driver: (a) the max732[89] chips are
also second sources for the pcf8574/a, and (b) add a mutex to prevent
trashing the cached state.  Adding the lock is effectively a bugfix,
although it seems unlikely that anyone would have run into the issue it
protects against.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agogpio: gpio driver for max7301 SPI GPIO expander
Juergen Beisert [Mon, 21 Jul 2008 21:21:34 +0000 (14:21 -0700)]
gpio: gpio driver for max7301 SPI GPIO expander

Maxim's MAX7301 is an SPI GPIO expander with 28 GPIOs.  Note: MAX7301's
interrupt feature is not supported yet.

[akpm@linux-foundation.org: coding-style fixes]
[g.liakhovetski@pengutronix.de: Fix inaccuracies in comments, check spi_setup()
return code, mask off high byte in max7301_read()]
Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoexecve filename: document and export via auxiliary vector
John Reiser [Mon, 21 Jul 2008 21:21:32 +0000 (14:21 -0700)]
execve filename: document and export via auxiliary vector

The Linux kernel puts the filename argument of execve() into the new
address space.  Many developers are surprised to learn this.  Those who
know and could use it, object "But it's not documented."

Those who want to use it dislike the expression
  (char *)(1+ strlen(env[-1+ n_env]) + env[-1+ n_env])
because it requires locating the last original environment variable,
and assumes that the filename follows the characters.

This patch documents the insertion of the filename, and makes it easier
to find by adding a new tag AT_EXECFN in the ElfXX_auxv_t; see <elf.h>.

In many cases readlink("/proc/self/exe",) gives the same answer.  But if
all the original pages get unmapped, then the kernel erases the symlink
for /proc/self/exe.  This can happen when a program decompressor does a
good job of cleaning up after uncompressing directly to memory, so that
the address space of the target program looks the same as if compression
had never happened.  One example is http://upx.sourceforge.net .

One notable use of the underlying concept (what path containED the
executable) is glibc expanding $ORIGIN in DT_RUNPATH.  In practice for
the near term, it may be a good idea for user-mode code to use both
/proc/self/exe and AT_EXECFN as fall-back methods for each other.
/proc/self/exe can fail due to unmapping, AT_EXECFN can fail because it
won't be present on non-new systems.  The auxvec or {AT_EXECFN}.d_val
also can get overwritten, although in nearly all cases this would be the
result of a bug.

The runtime cost is one NEW_AUX_ENT using two words of stack space.  The
underlying value is maintained already as bprm->exec; setup_arg_pages()
in fs/exec.c slides it for stack_shift, etc.

Signed-off-by: John Reiser <jreiser@BitWagon.com>
Cc: Roland McGrath <roland@redhat.com>
Cc: Jakub Jelinek <jakub@redhat.com>
Cc: Ulrich Drepper <drepper@redhat.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Mon, 21 Jul 2008 22:42:20 +0000 (15:42 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (100 commits)
  usb-storage: revert DMA-alignment change for Wireless USB
  USB: use reset_resume when normal resume fails
  usb_gadget: composite cdc gadget fault handling
  usb gadget: minor USBCV fix for composite framework
  USB: Fix bug with byte order in isp116x-hcd.c fio write/read
  USB: fix double kfree in ipaq in error case
  USB: fix build error in cdc-acm for CONFIG_PM=n
  USB: remove board-specific UP2OCR configuration from pxa27x-udc
  USB: EHCI: Reconciling USB register differences on MPC85xx vs MPC83xx
  USB: Fix pointer/int cast in USB devio code
  usb gadget: g_cdc dependso on NET
  USB: Au1xxx-usb: suspend/resume support.
  USB: Au1xxx-usb: clean up ohci/ehci bus glue sources.
  usbfs: don't store bad pointers in registration
  usbfs: fix race between open and unregister
  usbfs: simplify the lookup-by-minor routines
  usbfs: send disconnect signals when device is unregistered
  USB: Force unbinding of drivers lacking reset_resume or other methods
  USB: ohci-pnx4008: I2C cleanups and fixes
  USB: debug port converter does not accept more than 8 byte packets
  ...

16 years agousb-storage: revert DMA-alignment change for Wireless USB
Alan Stern [Mon, 30 Jun 2008 17:39:59 +0000 (13:39 -0400)]
usb-storage: revert DMA-alignment change for Wireless USB

This patch (as1110) reverts an earlier patch meant to help with
Wireless USB host controllers.  These controllers can have bulk
maxpacket values larger than 512, which puts unusual constraints on
the sizes of scatter-gather list elements.  However it turns out that
the block layer does not provide the support we need to enforce these
constraints; merely changing the DMA alignment mask doesn't help.
Hence there's no reason to keep the original patch.  The Wireless USB
problem will have to be solved a different way.

In addition, there is a reason to get rid of the earlier patch.  By
dereferencing a pointer stored in the ep_in array of struct
usb_device, the current code risks an invalid memory access when it
runs concurrently with device removal.  The members of that array are
cleared before the driver's disconnect method is called, so it should
not try to use them.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: use reset_resume when normal resume fails
Alan Stern [Mon, 30 Jun 2008 15:14:43 +0000 (11:14 -0400)]
USB: use reset_resume when normal resume fails

This patch (as1109b) makes USB-Persist more resilient to errors.  With
the current code, if a normal resume fails, it's an unrecoverable
error.  With the patch, if a normal resume fails (and if the device is
enabled for USB-Persist) then a reset-resume is tried.

This fixes the problem reported in Bugzilla #10977.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb_gadget: composite cdc gadget fault handling
David Brownell [Tue, 1 Jul 2008 20:18:20 +0000 (13:18 -0700)]
usb_gadget: composite cdc gadget fault handling

These two fixes ensure the new "CDC Composite Device" gadget
fails cleanly when it's loaded on hardware that can't support
this particular gadget driver.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb gadget: minor USBCV fix for composite framework
David Lopo [Tue, 1 Jul 2008 20:14:17 +0000 (13:14 -0700)]
usb gadget: minor USBCV fix for composite framework

Fill in a reserved/unused device qualifier field to ensure that
the USBCV tests will always pass.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Fix bug with byte order in isp116x-hcd.c fio write/read
Julien May [Fri, 27 Jun 2008 13:01:18 +0000 (15:01 +0200)]
USB: Fix bug with byte order in isp116x-hcd.c fio write/read

URB payload data are transfered in wrong byte order on a big endinan
architecture (AVR32).

Signed-off-by: Julien May <mailinglist@miromico.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: fix double kfree in ipaq in error case
Oliver Neukum [Mon, 30 Jun 2008 12:33:57 +0000 (14:33 +0200)]
USB: fix double kfree in ipaq in error case

in the error case the ipaq driver leaves a dangling pointer to already
freed memory that will be freed again.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: fix build error in cdc-acm for CONFIG_PM=n
Oliver Neukum [Tue, 1 Jul 2008 17:10:08 +0000 (19:10 +0200)]
USB: fix build error in cdc-acm for CONFIG_PM=n

Here's the fix. cdc-wdm has the same problem. The fix is the same.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: remove board-specific UP2OCR configuration from pxa27x-udc
Daniel Ribeiro [Wed, 2 Jul 2008 02:09:27 +0000 (23:09 -0300)]
USB: remove board-specific UP2OCR configuration from pxa27x-udc

Remove the board-specific UP2OCR configuration from the
pxa27x-udc driver.

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: EHCI: Reconciling USB register differences on MPC85xx vs MPC83xx
Srikanth Srinivasan [Wed, 2 Jul 2008 07:14:33 +0000 (02:14 -0500)]
USB: EHCI: Reconciling USB register differences on MPC85xx vs MPC83xx

A couple of USB register initializations had to be changed on MPC85xx
platforms.  This is due to the internal SoC buses being different on
MPC83xx SoCs vs MPC85xx SoCs.

We currently handle this via an ifdef since 83xx and 85xx are mutually
exclusive kernel builds.

Signed-off-by: Srikanth Srinivasan <srikanth.srinivasan@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Fix pointer/int cast in USB devio code
David Howells [Wed, 2 Jul 2008 11:28:55 +0000 (12:28 +0100)]
USB: Fix pointer/int cast in USB devio code

Fix pointer/int cast in USB devio code, and thus avoid a compiler warning.

A void* data argument passed to bus_find_device() and thence to match_devt()
is used to carry a 32-bit datum.  However, casting directly between a u32 and
a pointer is not permitted - there must be an intermediate cast via (unsigned)
long.

This was introduced by the following patch:

commit 94b1c9fa060ece2c8f080583beb6cc6008e41413
Author: Alan Stern <stern@rowland.harvard.edu>
Date:   Tue Jun 24 14:47:12 2008 -0400

    usbfs: simplify the lookup-by-minor routines

    This patch (as1105) simplifies the lookup-by-minor-number code in
    usbfs.  Instead of passing the minor number to the callback, which
    must then reconstruct the entire dev_t value, the patch passes the
    dev_t value directly.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb gadget: g_cdc dependso on NET
Randy Dunlap [Thu, 3 Jul 2008 21:44:59 +0000 (14:44 -0700)]
usb gadget: g_cdc dependso on NET

g_cdc needs to depend on NET, otherwise net-related build errors happen:

ERROR: "netif_carrier_on" [drivers/usb/gadget/g_cdc.ko] undefined!
ERROR: "netif_carrier_off" [drivers/usb/gadget/g_cdc.ko] undefined!
ERROR: "netif_rx" [drivers/usb/gadget/g_cdc.ko] undefined!
ERROR: "alloc_etherdev_mq" [drivers/usb/gadget/g_cdc.ko] undefined!
ERROR: "free_netdev" [drivers/usb/gadget/g_cdc.ko] undefined!
ERROR: "register_netdev" [drivers/usb/gadget/g_cdc.ko] undefined!
ERROR: "print_mac" [drivers/usb/gadget/g_cdc.ko] undefined!
ERROR: "dev_kfree_skb_any" [drivers/usb/gadget/g_cdc.ko] undefined!
ERROR: "__alloc_skb" [drivers/usb/gadget/g_cdc.ko] undefined!
ERROR: "eth_type_trans" [drivers/usb/gadget/g_cdc.ko] undefined!
ERROR: "unregister_netdev" [drivers/usb/gadget/g_cdc.ko] undefined!
ERROR: "__netif_schedule" [drivers/usb/gadget/g_cdc.ko] undefined!
ERROR: "skb_put" [drivers/usb/gadget/g_cdc.ko] undefined!

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Au1xxx-usb: suspend/resume support.
Manuel Lauss [Mon, 23 Jun 2008 07:09:37 +0000 (09:09 +0200)]
USB: Au1xxx-usb: suspend/resume support.

Copy the OHCI/EHCI PM callbacks of the PCI implementation since
they work equally well on Au1xxx hardware.

Tested on Au1200.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Au1xxx-usb: clean up ohci/ehci bus glue sources.
Manuel Lauss [Mon, 23 Jun 2008 07:08:29 +0000 (09:08 +0200)]
USB: Au1xxx-usb: clean up ohci/ehci bus glue sources.

- Fold multiple probe/remove callbacks into one function;
- minor style fixes, no functional changes.

Tested on Au1200.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousbfs: don't store bad pointers in registration
Alan Stern [Tue, 24 Jun 2008 18:47:29 +0000 (14:47 -0400)]
usbfs: don't store bad pointers in registration

This patch (as1107) fixes a small bug in the usbfs registration and
unregistration code.  It avoids leaving an error value stored in the
device's usb_classdev field and it avoids trying to unregister a NULL
pointer.  (It also fixes a rather extreme overuse of whitespace.)

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousbfs: fix race between open and unregister
Alan Stern [Tue, 24 Jun 2008 18:47:19 +0000 (14:47 -0400)]
usbfs: fix race between open and unregister

This patch (as1106) fixes a race between opening and unregistering
device files in usbfs.  The current code drops its reference to the
device and then reacquires it, ignoring the possibility that the
device structure might have been removed in the meantime.  It also
doesn't check whether the device is already in the NOTATTACHED state
when the file is opened.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousbfs: simplify the lookup-by-minor routines
Alan Stern [Tue, 24 Jun 2008 18:47:12 +0000 (14:47 -0400)]
usbfs: simplify the lookup-by-minor routines

This patch (as1105) simplifies the lookup-by-minor-number code in
usbfs.  Instead of passing the minor number to the callback, which
must then reconstruct the entire dev_t value, the patch passes the
dev_t value directly.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousbfs: send disconnect signals when device is unregistered
Alan Stern [Tue, 24 Jun 2008 18:47:04 +0000 (14:47 -0400)]
usbfs: send disconnect signals when device is unregistered

USB device files are accessible in two ways: as files in usbfs and as
character device nodes.  The two paths are supposed to behave
identically, but they don't.  When the underlying USB device is
unplugged, disconnect signals are sent to processes with open usbfs
files (if they requested these signals) but not to processes with open
device node files.

This patch (as1104) fixes the bug by moving the disconnect-signalling
code into a common subroutine which is called from both paths.
Putting this subroutine in devio.c removes the only out-of-file
reference to struct dev_state, and so the structure's declaration can
be moved from usb.h into devio.c.

Finally, the new subroutine performs one extra action: It kills all
the outstanding async URBs.  (I'd kill the outstanding synchronous
URBs too, if there was any way to do it.)  In the past this hasn't
mattered much, because devices were unregistered from usbfs only
when they were disconnected.  But now the unregistration can also
occur whenever devices are unbound from the usb_generic driver.  At
any rate, killing URBs when a device is unregistered from usbfs seems
like a good thing to do.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Force unbinding of drivers lacking reset_resume or other methods
Alan Stern [Mon, 23 Jun 2008 20:00:40 +0000 (16:00 -0400)]
USB: Force unbinding of drivers lacking reset_resume or other methods

This patch (as1024) takes care of a FIXME issue: Drivers that don't
have the necessary suspend, resume, reset_resume, pre_reset, or
post_reset methods will be unbound and their interface reprobed when
one of the unsupported events occurs.

This is made slightly more difficult by the fact that bind operations
won't work during a system sleep transition.  So instead the code has
to defer the operation until the transition ends.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: ohci-pnx4008: I2C cleanups and fixes
Jean Delvare [Wed, 18 Jun 2008 12:46:27 +0000 (14:46 +0200)]
USB: ohci-pnx4008: I2C cleanups and fixes

Various cleanups and fixes to the i2c code in ohci-pnx4008:
* Delete empty isp1301_command. The i2c driver command implementation
  is optional, so there's no point in providing an empty
  implementation.
* Give a name to isp1301_driver. I'm surprised that i2c-core accepted
  to register this driver at all. I've chosen "isp1301_pnx" as the
  name, because it's not a generic ISP1301 driver (much like the
  isp1301_omap driver.) We might want to make the name even more
  specific (but "isp1301_ohci_pnx4008" doesn't fit.)
* The ISP1301 is definitely not a hardware monitoring device.
* Fix a memory leak on failure in isp1301_attach. If
  i2c_attach_client fails, the client is not registered so
  isp1301_detach is never called and the i2c_client memory is lost.
* Use strlcpy instead of strcpy.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Vitaly Wool <vitalywool@gmail.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: debug port converter does not accept more than 8 byte packets
Aleksey Gorelov [Thu, 19 Jun 2008 22:22:17 +0000 (15:22 -0700)]
USB: debug port converter does not accept more than 8 byte packets

USB debug port only supports 8 byte rx/tx packets. Although spec implies that
"if a packet larger than eight bytes is received from the remote computer, the
device must break the larger packet into eight-byte packets before sending the
data to the Debug Port", the real PLX NET20DC device does not handle it right -
data is corrupted on debug port end if serial interface sends >8 byte urbs.
Patch below fixes the issue by limiting tx urb to 8 byte.

Signed off by: Aleks Gorelov <dared1st@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: fix disconnect bug in cdc-acm
Oliver Neukum [Wed, 25 Jun 2008 12:17:16 +0000 (14:17 +0200)]
USB: fix disconnect bug in cdc-acm

cdc-acm must give up secondary interfaces if the primary is disconnected
and vice versa. This wasn't done correctly.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: fix usb serial pm counter decrement for disconnected interfaces
Oliver Neukum [Wed, 25 Jun 2008 11:32:49 +0000 (13:32 +0200)]
USB: fix usb serial pm counter decrement for disconnected interfaces

usb serial decrements the pm counter even if an interface has been
disconnected. If it was a logical disconnect the interface may belong
already to another driver. This patch introduces a check for disconnected
interfaces.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Cc: Stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: autosuspend for cdc-wdm
Oliver Neukum [Tue, 24 Jun 2008 13:56:10 +0000 (15:56 +0200)]
USB: autosuspend for cdc-wdm

this patch implements

- suspend/resume
- aggressive autosuspend for the cdc-wdm driver
- pre/post_reset

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: additional power savings for cdc-acm devices that support remote wakeup
Oliver Neukum [Fri, 20 Jun 2008 09:25:57 +0000 (11:25 +0200)]
USB: additional power savings for cdc-acm devices that support remote wakeup

this patch saves power for cdc-acm devices that support remote wakeup
while the device is connected.

- request needs_remote_wakeup when needed
- delayed write while a device is autoresumed
- the device is marked busy when appropriate

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: keyspan: Remove duplicate device entries
Ben Collins [Fri, 27 Jun 2008 00:08:16 +0000 (20:08 -0400)]
USB: keyspan: Remove duplicate device entries

The 28xb, as documented in comments, has the same ID's as the 28x.
Remove the duplicated ID's from the device tables, and expand the
comment to document this.

Signed-off-by: Ben Collins <ben.collins@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb: fix uninitialized variable warning in keyspan_pda
Benny Halevy [Fri, 27 Jun 2008 09:22:32 +0000 (12:22 +0300)]
usb: fix uninitialized variable warning in keyspan_pda

This fixes the compiler warning.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb: r8a66597-hcd: fix iinterval for Full/Low speed device
Yoshihiro Shimoda [Fri, 27 Jun 2008 10:09:58 +0000 (19:09 +0900)]
usb: r8a66597-hcd: fix iinterval for Full/Low speed device

fix interrupt transfer interval for Full/Low speed device.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb: r8a66597-hcd: fix interrupt trigger
Yoshihiro Shimoda [Fri, 27 Jun 2008 10:09:55 +0000 (19:09 +0900)]
usb: r8a66597-hcd: fix interrupt trigger

fix the problem that did not set IRQF_TRIGGER_ flag.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: fix usb_reset_device and usb_reset_composite_device(take 3)
Ming Lei [Wed, 18 Jun 2008 14:00:29 +0000 (22:00 +0800)]
USB: fix usb_reset_device and usb_reset_composite_device(take 3)

This patch renames the existing usb_reset_device in hub.c to
usb_reset_and_verify_device and renames the existing
usb_reset_composite_device to usb_reset_device. Also the new
usb_reset_and_verify_device does't need to be EXPORTED .

The idea of the patch is that external interface driver
should warn the other interfaces' driver of the same
device before and after reseting the usb device. One interface
driver shoud call _old_ usb_reset_composite_device instead of
_old_ usb_reset_device since it can't assume the device contains
only one interface. The _old_ usb_reset_composite_device
is safe for single interface device also. we rename the two
functions to make the change easily.

This patch is under guideline from Alan Stern.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
16 years agoUSB: usb-serial: fix a sparse warning about different signedness
Andre Haupt [Wed, 18 Jun 2008 13:56:00 +0000 (15:56 +0200)]
USB: usb-serial: fix a sparse warning about different signedness

fix the following sparse warning:

drivers/usb/serial/usb-serial.c:927:43: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/usb-serial.c:927:43:    expected unsigned int *minor
drivers/usb/serial/usb-serial.c:927:43:    got int *<noident>
  CHECK   drivers/usb/serial/generic.c

Signed-off-by: Andre Haupt <andre@bitwigglers.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: isp1760: Support board-specific hardware configurations
Nate Case [Tue, 17 Jun 2008 16:11:38 +0000 (11:11 -0500)]
USB: isp1760: Support board-specific hardware configurations

This adds support for hardware configurations that don't match the
chip default register settings (e.g., 16-bit data bus, DACK and
DREQ pulled up instead of down, analog overcurrent mode).

These settings are passed in via the OF device tree.  The PCI
interface still assumes the same default values.

Signed-off-by: Nate Case <ncase@xes-inc.com>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: fix comment of usb_set_configuration
Ming Lei [Tue, 17 Jun 2008 15:24:08 +0000 (23:24 +0800)]
USB: fix comment of usb_set_configuration

It is the usb interface driver probe() methods that
can't call usb_set_configuration, not usb device driver.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>