* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (28 commits)
trivial: Update my email address
trivial: NULL noise: drivers/mtd/tests/mtd_*test.c
trivial: NULL noise: drivers/media/dvb/frontends/drx397xD_fw.h
trivial: Fix misspelling of "Celsius".
trivial: remove unused variable 'path' in alloc_file()
trivial: fix a pdlfush -> pdflush typo in comment
trivial: jbd header comment typo fix for JBD_PARANOID_IOFAIL
trivial: wusb: Storage class should be before const qualifier
trivial: drivers/char/bsr.c: Storage class should be before const qualifier
trivial: h8300: Storage class should be before const qualifier
trivial: fix where cgroup documentation is not correctly referred to
trivial: Give the right path in Documentation example
trivial: MTD: remove EOL from MODULE_DESCRIPTION
trivial: Fix typo in bio_split()'s documentation
trivial: PWM: fix of #endif comment
trivial: fix typos/grammar errors in Kconfig texts
trivial: Fix misspelling of firmware
trivial: cgroups: documentation typo and spelling corrections
trivial: Update contact info for Jochen Hein
trivial: fix typo "resgister" -> "register"
...
This is really a follow up to the modifications Alan Cox made for commit
95da310e66 to pass a tty_struct to various
interface functions, which broke the serial configuration (termios) functions
when the device is being used as a console. These changes restore the
configuration to proper functioning both as a tty and as a console. As Alan
notes in that commit, these changes will need to be tweaked when we have
a proper console abstraction.
Signed-off-by: David VomLehn <dvomlehn@cisco.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The ipaq driver currently enforces one port on all devices. This
is correct for 2 and 3 endpoint devices, but with 4 endpoint devices
meaningful communication occurs on the second pair.
This patch allows 2 ports for 4 endpoint devices.
Signed-off-by: Mark Ellis <mark@mpellis.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Lots of users are getting confused about the cp2101 driver. It really
does support more than just the cp2101 device, so rename it to cp210x to
try to prevent confusion.
Cc: Craig Shelley <craig@microtron.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch lowers the logging priority of certain messages to prevent
users from flooding the log files.
Signed-off-by: Craig Shelley <craig@microtron.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds support for the extended range of baud rates supported
by CP2102 and CP2103 devices described in SiLabs AN205. An additional
function cp2101_quantise_baudrate rounds the baud rate as per AN205
Table 1. A modification to the baud rate calculation removes a rounding
error, allowing the full range of baud rates to be used.
Signed-off-by: Craig Shelley <craig@microtron.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
actual_length should also be a u32 and not a signed value. This patch
changes this field to be 'u32' to prevent any potential negative
conversion and comparison errors.
This triggered a few compiler warning messages when these fields were
being used with the min macro, so they have also been fixed up in this
patch.
Cc: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch fixes the following bug:
.plug ch341 usb serial port into a hub port;
.ch341 driver bound to the device and /dev/ttyUSB0 comes
.open /dev/ttyUSB0 by minicom and we can use the serial successfully
.suspend the ch341 usb serial device(such as: echo suspend > power/level)
.resume the ch341 usb serial device (such as: echo on > power/level)
.new port /dev/ttyUSB1 comes ,and the original /dev/ttyUSB0 still exists,
but is no longer usable by minicom
The patch adds suspend and resume callback to ch341 usb driver to prevent it
from unbinding during suspend. The /dev/ttyUSB0 is not released until being
closed, so /dev/ttyUSB1 comes after resume, and the original /dev/ttyUSB0 is
no longer usable by minicom. It is really a mess for a minicom user.
This patch also adds the reset_resume callback to make it usable after resuming
from STR or hibernation, for generally STR or hibernation will make the vbus
of root-hub lost.
Finally enable the driver's supports_autosuspend, for the device is in working
order with it.
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
With "nousb" cmdline booting, built-in serial drivers (ie. airecable)
will trigger kernel oops.
Indeed, if nousb, usb_serial_init will failed, and the usb serial bus type
will not be registerd, then usb_serial_register call driver_register
which try to register the driver to a not registered bus.
Here add usb_disabled() check in usb_serial_register to fix it.
Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Driver originally written by Qualcomm, but rewritten by me due to the
totally different coding style. Cleaned up the probe logic to make a
bit more sense, this is one wierd device. They could have prevented all
of this by just writing sane firmware for the modem.
Cc: Tamm Liu <tamml@qualcomm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
We need to figure out what userspace programs are expecting from this
driver, so log them so we can try to get it right.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is for the Symbol 6608 barcode scanner in a fake "HID" mode.
Thanks to Dalibor Grgec for working with me to get this to start to work
properly.
Cc: Dalibor Grgec <dalibor.grgec@zemris.fer.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
A USB-serial converter device is plugged into a system, and a process
opens it's device node. If the device is physically removed whilst the
process still has its device node open, then other processes can
sucessfully open the now non-existent device's node. I would expect
that open() on a device that has been physically removed should return
ENODEV.
This is manifesting itself with getty on my system. I do the following:
1. set up inittab to spawn getty on ttyUSB0, eg:
T1:23:respawn:/sbin/getty -L ttyUSB0 115200 vt100
2. Plug in USB-serial converter cable
3. Wait for a login prompt on a terminal program attached to the serial
cable
4. Login
5. Pull the USB-serial converter cable from the box
6. getty doesn't realise that ttyUSB0 no longer exists as /dev/ttyUSB0
can still be opened.
7. Re-insert the USB-serial converter cable
8. You should no longer get a login prompt over the serial cable, as
the the USB-serial cable now shows up as /dev/ttyUSB1, and getty is
trying to talk to /dev/ttyUSB0.
The attached patch will cause open("/dev/ttyUSB0", O_RDONLY) to return
ENODEV after the USB-serial converter has been pulled. The patch was
created against 2.6.28.1. I can supply it against something else if
needs be. It is fairly simple, so should be OK.
I am using a pl2303 device, although I don't think that makes any
difference.
From: James Woodcock <James.Woodcock@ACULAB.COM>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This removes the fallback to the generic method. It is cleaner to
explicitely request it. Introducing this was my mistake. This will
be solved by an explicit test and the driver being allowed to request
what it needs to be done upon resumption.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This lets userspace determine what the state of the RTS line is, which
is what is needed to properly handle data flow for this device (it
raises RTS when there is data to be sent from it.)
Cc: Kees Stoop <kees.stoop@opticon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Remove some pointless messages from the FTDI serial driver;
I found these filling up syslog on one system. Also remove
a pointless "break" after a "return" in the same area.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch makes use of the generic method if a serial driver provides
no implementation. This simplifies implementing suspend/resume support
in serial drivers.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This exports a symbol for usb_serial_generic_resume, so that modules can
use it.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This removes an unnecessary check for autoresume from the generic
resume method. The check has been obsoleted by the now delayed
increase of the usage counter which makes the error this check prevented
impossible. This change allows drivers which only use the bulk read URB
the use of the generic method even if they support autosuspend.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch introduces a flag into the usb serial layer to tell drivers
that their URBs are killed due to suspension. That is necessary to let
drivers know whether they should report an error back.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Hi Greg,
this is for 2.6.30. Patches to use this in drivers are under development.
Regards
Oliver
this does the standard support for suspend/resume for the opticon
driver.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch implements suspend and resume methods for the
option driver. With my hardware I can even suspend the system
and keep up a connection for a short time.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fixup of Werner Cornelius patch to the ch341 USB-serial driver, which adds:
- support all baudrates, not just a hard-coded set
- support for controlling DTR, RTS and CTS
Features still missing:
- character length other than 8 bits
- parity settings
- break control
I adapted his patch for the new usb_serial API introduced in 2.6.25-git8 by
Alan Cox on 22 July 2008. Non-compliance to the new API was a reason for
refusing a similar patch from Tollef Fog Heen.
Usage example by Tollef Fog Heen :
TEMPer USB thermometer <http://err.no/src/TEMPer.c>
Signed-off-by: Werner Cornelius <Werner.Cornelius@cornelius-consult.de>
Signed-off-by: Boris Hajduk <boris@hajduk.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This set of patches introduces calls to the following set of functions:
usb_endpoint_dir_in(epd)
usb_endpoint_dir_out(epd)
usb_endpoint_is_bulk_in(epd)
usb_endpoint_is_bulk_out(epd)
usb_endpoint_is_int_in(epd)
usb_endpoint_is_int_out(epd)
usb_endpoint_num(epd)
usb_endpoint_type(epd)
usb_endpoint_xfer_bulk(epd)
usb_endpoint_xfer_control(epd)
usb_endpoint_xfer_int(epd)
usb_endpoint_xfer_isoc(epd)
In some cases, introducing one of these functions is not possible, and it
just replaces an explicit integer value by one of the following constants:
USB_ENDPOINT_XFER_BULK
USB_ENDPOINT_XFER_CONTROL
USB_ENDPOINT_XFER_INT
USB_ENDPOINT_XFER_ISOC
An extract of the semantic patch that makes these changes is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@r1@ struct usb_endpoint_descriptor *epd; @@
- ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) ==
- \(USB_ENDPOINT_XFER_CONTROL\|0\))
+ usb_endpoint_xfer_control(epd)
@r5@ struct usb_endpoint_descriptor *epd; @@
- ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) ==
- \(USB_DIR_IN\|0x80\))
+ usb_endpoint_dir_in(epd)
@inc@
@@
#include <linux/usb.h>
@depends on !inc && (r1||r5)@
@@
+ #include <linux/usb.h>
#include <linux/usb/...>
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
priv is checked not to be NULL near the beginning of the function and not
changed subsequently, making the test redundant.
A simplified version of the semantic patch that makes this change is as
follows: (http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@r exists@
local idexpression x;
expression E;
position p1,p2;
@@
if (x@p1 == NULL || ...) { ... when forall
return ...; }
... when != \(x=E\|x--\|x++\|--x\|++x\|x-=E\|x+=E\|x|=E\|x&=E\|&x\)
(
x@p2 == NULL
|
x@p2 != NULL
)
// another path to the test that is not through p1?
@s exists@
local idexpression r.x;
position r.p1,r.p2;
@@
... when != x@p1
(
x@p2 == NULL
|
x@p2 != NULL
)
@fix depends on !s@
position r.p1,r.p2;
expression x,E;
statement S1,S2;
@@
(
- if ((x@p2 != NULL) || ...)
S1
|
- if ((x@p2 == NULL) && ...) S1
|
- BUG_ON(x@p2 == NULL);
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Option GTM380 in Modem mode uses Product ID 0x7201. This has been tested and works
on production systems for over 6 months.
Signed-off-by: Achilleas Kotsis <akots@exponent.gr>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* newer versions of the Novatel Wireless U727 CDMA 3G USB stick
have a different Product ID (0x5010); adding this ID makes them
work just fine with the option driver
Signed-off-by: Dirk Hohndel <hohndel@infradead.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The generic cdc-acm driver is now the best one to handle Sony Ericsson
F3507g-based devices (which the Dell 5530 is a rebrand of), now that all
the pieces are in place (ie, cac477e8f1).
Removing the IDs from option allows cdc-acm to handle the device.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Please consider this small patch for the usb option-card driver.
This patch adds the ZTE 622 usb modem device.
Signed-off-by: Albert Pauw <albert.pauw@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
I noticed that my revision of the F3507G WWAN card isn't listed in
drivers/usb/serial/option.c
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch addes the BenQ 3g modem support to the option driver.
From: Jesse Sung <jsung@novell.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
- New Novatel and Dell mobile broadband modem products added
- Dell pid variables used in stead of numerical PIDs for known
products
Signed-off-by: Dirk De Schepper <ddeschepper@nvtl.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Matthias Urlichs <matthias@urlichs.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds device IDs and balances the counts to make the
hot ID additioning mechanism work.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Cc: stable <stable@kernel.org>
Cc: Chris Adams <cmadams@hiwaay.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
There was one error path where unlock_kernel() wasn't called.
This was found with a code checker (http://repo.or.cz/w/smatch.git/)
Compile tested only, sorry.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add support for the NDI Polaris system *http://www.ndigital.com/).
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The failure path of aircable_init is wrong, fix the order of (goto) labels.
Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Acked-by: Naranjo Manuel Francisco <naranjo.manuel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Revert 8b6346ec89 as these devices really
work just fine with the cdc-acm driver, as they follow the spec
properly.
Thanks to Chuck Ebbert for pointing out the problem here.
Cc: Chuck Ebbert <cebbert@redhat.com>
Cc: Dan Williams <dcbw@redhat.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds the support for the QUANTA Q101 series HSDPA Data Card.
With the vendor and product IDs are set properly,
the data card can be detected and works fine.
Signed-off-by: Alex Cheng <alex.cheng@quantatw.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
While trying to make GSM modem Onda MT503HS working, I found a mismatch
between device id in the driver code (0x0200) and id in the lsusb
output (0x2000).
This patch fixed it for me, but I don't know if the original device id was
also correct and the new ID should be added instead of replacing the
old one.
Signed-off-by: Marcel Sebek <sebek64@post.cz>
Acked-by: Domenico Riccio <domenico.riccio@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Added the product id of bcs(bar code scanner) from Diebold Procomp Brazil.
Signed-off-by: Mhayk Whandson <eu@mhayk.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>