This is a driver to control the brightness of an Apple Cinema Display over
USB. It updates the local brightness value if the user presses a button on
the display.
Signed-off-by: Michael Hanselmann <linux-kernel@hansmi.ch>
Cc: Oliver Neukum <oliver@neukum.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds support for Yost Engineering Inc's ServoCenter 3.1 USB
product to the ftdi_sio driver's device ID table. The PID was supplied
by Aaron Prose of Yost Engineering on the ftdi-usb-sio-devel list. The
PID 0xE050 matches the Windows INF files for this device.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Now that usbhid automatically applies HID_QUIRK_NOGET to keyboards and
mice, we no longer need the blacklist entries that were present for no
other purpose. This patch (as698) removes them.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
RNDIS devices don't get configured owing to a typo in
choose_configuration(). This patch from Giridhar Pemmasani fixes the
typo.
From: Giridhar Pemmasani <giri@lmc.cs.sunysb.edu>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2.6.16 introduces USB power budgeting in the Linux kernel, and since then, a
fair number of users have observed that some of their devices no longer work in
unpowered hubs (this is not a bug, the devices claim that they need more than
100mA).
The very least we can do is print an informational message to the kernel log
when this happens, otherwise it is not at all clear why the device was not
accepted.
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Remove more log spamming from pegasus: stop talking to the device once we
see ENODEV reported. It may take a while before khubd notifies us.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Wait for the scheduled work to finish before freeing memory, prevent oops.
http://bugzilla.kernel.org/show_bug.cgi?id=6596
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This updates the EHCI driver by adding an improved scheduler for the
transaction translators, found in USB 2.0 hubs and used for low and
full speed devices.
- adds periodic_tt_usecs() and some helper functions, which does
the same thing that "periodic_usecs" does, except on the other
side of the TT, i.e. it calculates the low/fullspeed bandwidth
usage instead of highspeed.
- adds a tt_available() function which is the new implementation
of what tt_no_collision() does ... while tt_no_collision() ensures
that each TT handles only 1 periodic transfer at a time (a very
pessimistic approach) this version instead tracks bandwidth and
allows each TT to handle as many transfers as will fit on each TT's
downstream bus (closer to best-case).
The new scheduler is selected by a config option, marked as EXPERIMENTAL
so it can be tested (and more broadly reviewed) for a while until it
seems safe to remove the original scheduler.
Signed-off-by: Dan Streetman <ddstreet@ieee.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch uses completion timeout instead of a timer to implement
a timeout when submitting an URB.
It also put the task in interruptible state instead of an
uninterruptible one while waiting for the completion.
Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add a couple of supported devices into the help message.
It's a long story... I promised this comment changed to a user long ago,
so I'd like to have that promise kept. In reality though, nobody is
likely to read this anyway.
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
I'm going to throw schedule_work away, it's retarded. But for starters,
let's have it encapsulated.
Also, generic and whiteheat were both calling usb_serial_port_softint
and scheduled work. Only one was necessary.
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Clean up the unicode handling in io_edgeport. Make get_string size-limited.
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as693b) makes the usbtest driver report errors in the
isochronous bulk transfer tests instead of always returning 0. As an
arbitrary cutoff, an error is returned if more than 10% of the packet
transfers fail. It also stops a test immediately upon receiving an URB
submission error.
For a test harness, it's especially important to report when errors occur!
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as692) fixes a few memory leaks in some unimportant error
pathways of the gadgetfs driver.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as691) fixes a few errors in the AIO interface for the
gadgetfs driver. Now requests will complete properly instead of hanging.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
By the way I have to ask you to add new (vid,pid) pair to cp2101 driver.
This device is argussoft's avr in-system programmer AS3M,
http://atmel.argussoft.ru/hard.htm
it's based on cp2101 chip and works pretty well with the linux driver.
It could be used with argussoft's `asisp1109.exe'
(http://atmel.argussoft.ru/download/software/as-tools.soft/asisp.zip)
tool run under wine.
Signed-off-by: Vitja Makarov <vitja.makarov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
ctrl_complete functions acquires ctx->lock and tries to unlink
all queued urbs in case of errors through usb_unlink_urb func.
In its turn usb_unlink_urb calls, through the hcd driver,
usb_hcd_giveback_urb which calls ctrl_complete again. At this
time, ctx->lock is already taken by the same function.
Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as690) does the same thing for ISO TDs as as680 did for
non-ISO TDs: free them as they are used rather than all at once when an
URB is complete. At the same time it fixes a minor buglet (I'm not
aware of it ever affecting anyone): An ISO TD should be retired when its
frame is over, regardless of whether or not the hardware has marked it
inactive.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as689) stores the period for periodic transfers (interrupt
and ISO) in the queue header. This is necessary for proper bandwidth
tracking (not yet implemented). It also makes the scheduling of ISO
transfers a bit more rigorous, with checks for out-of-bounds frame
numbers.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as688) fixes a small race in uhci-hcd. Because ISO queues
aren't controlled by queue headers, they can't be unlinked. Only
individual URBs can. So whenever multiple ISO URBs are dequeued, it's
necessary to make sure the hardware is done with each one. We can't
assume that dequeuing the first URB will suffice to unlink the entire
queue.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as687) changes uhci-hcd to keep track of frame numbers as
full-sized integers rather than 11-bit values. This makes them a lot
easier to handle and makes it possible to schedule beyond a 2-second
window, should anyone ever want to do so.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch increases an arbitrary limit on the size of
individual isochronous packets submitted via usbfs. The
limit is still arbitrary, but it's now large enough to
support the maximum packet size used by high-bandwidth
isochronous transfers.
Signed-off-by: Micah Dowty <micah@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch removes the artificial 4088-byte limit that usbfs
currently places on Control transfers. The USB spec does not
specify a strict limit on the size of an entire control transfer.
It does, however, state that the data stage "follows the same
protocol rules as bulk transfers." (USB 2, 8.5.3)
The level of support for large control transfers in real host
controllers varies, but it's important to support at least 4K
transfers. Windows enforces a maximum control transfer size
of 4K, so there exists some hardware that requires a full 4096
byte data stage. Without this patch, we fall short of that by
8 bytes on architectures with a 4K page size, and it becomes
impossible to support such hardware with a user-space driver.
Since any limit placed on control transfers by usbfs would be
arbitrary, this patch replaces the PAGE_SIZE limit with the same
arbitrary limit used by bulk transfers.
Signed-off-by: Micah Dowty <micah@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Some old Intel UHCI controllers have a bug that has shown up in a few
systems (the PIIX3 "Neptune" chip set). Until now there has not been
any simple way to work around the bug, but the lastest changes in
uhci-hcd have made it easy. This patch (as684) adds the work-around.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as683) re-implements Full-Speed Bandwidth Reclamation (FSBR)
properly. It keeps track of which endpoint queues have advanced, and
when none have advanced for a sufficiently long time, FSBR is turned
off. The next TD on each of the non-moving queues is modified to
generate an interrupt on completion, so that FSBR can be re-enabled as
soon as the hardware starts to make some progress.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as682) gets rid of the TD-removal list in uhci-hcd. It is
no longer needed because now TDs are not freed until we know the
hardware isn't using them. It also simplifies the code for adding and
removing TDs to/from URBs.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as681) moves some code for cleaning up after unlinked URBs
out of the general completion pathway into the unlinking pathway.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as680) frees non-isochronous TDs as they are used, rather
than all at once when an URB is complete. Although not a terribly
important change in itself, it opens the door to a later enhancement
that will reduce storage requirements by allocating only a limited
number of TDs at any time for each endpoint queue.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as679) combines the result routine for Control URBs with the
routine for Bulk/Interrupt URBs. Along the way I eliminated the
debugging printouts for Control transfers unless the debugging level is
set higher than 1. I also eliminated a long-unused (#ifdef'ed-out)
section that works around some buggy old APC BackUPS devices.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
It seems to be relatively common for USB keyboards and mice to dislike
being polled for reports. Since there's no need to poll a keyboard or
a mouse, this patch (as685) automatically sets the HID_QUIRK_NOGET flag
for devices that advertise themselves as either sort of device with boot
protocol support.
This won't cure all the problems since some devices don't support the
boot protocol, but it's simple and easy and it should fix quite a few
problems.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Transposed lines of code in drivers/usb/input/hid-input.c causes the
capability bits for a new HID device to be set before quirks are applied
at configuration time. When an HID event is then sent up to the input
layer, it may then be discarded as irrelevant because the wrong
capability bit is set.
Further, the quirks for the Apple Mighty Mouse are not quite right: the
horizontal scrolling needs its axis reversed, and the left and center
buttons are transposed. Also, the mouse is labeled in the kernel with
its earlier name (I think) of Apple PowerMouse.
Steps to reproduce problem: Plug in an Apple Mighty Mouse. Note that
horizontal scrolling doesn't work at all, and in fact doesn't generate
any input events on /dev/input/eventN. Note also that pushing the
middle button performs the right button action, and vice versa. Once
you have the horizontal scrolling working, note that it is backward WRT
both to vertical scrolling and to common sense.
This patch maybe should be broken up, as it does address two problems.
The transposed code in hidinput_configure_usage() probably creates bugs
beyond just the Mighty Mouse. The rest of the patch renames POWERMOUSE
to MIGHTYMOUSE everywhere (which I *believe* is correct), fixes the
MIGHTYMOUSE quirk to swap the center and right mouse buttons, and adds a
new quirk HID_QUIRK_INVERT_HWHEEL also assigned to the MIGHTYMOUSE with
code in hidinput_hid_event() to implement it.
Signed-off-by: Bart Massey <bart@cs.pdx.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as676) fixes a small bug in uhci-hcd's enqueue routine. When
an URB is unlinked or gets an error and the completion handler queues
another URB for the same endpoint, the queue shouldn't be allowed to start
up again until the handler returns. Not even if the new URB is the only
one on its queue.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as675) simplifies uhci-hcd slightly by storing each endpoint's
type in the corresponding Queue Header structure.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The net2280 board has an annoying habit of surviving soft reboots with
interrupts enabled. This patch (as674) adds a shutdown routine to the
driver so that the board can be put in a quiescent state.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Unfortunately it looks like the transport entry for this subdriver was merged
into the protocol section, making this driver unusable :(
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
After some further testing with my flash device I realised that our current
probe doesn't always work (e.g. when no media is inserted).
Now that Peter Chubb's patch has simplified the detection of 99% of the HP CD
writers out there, we have a much smaller range of hardware to work with on
the shared device ID, so it should be possible to try some of the previous
probe options again: we just need to find another tester with a USBAT2-based HP
CD writer.
This patch hardcodes the flash detection until someone comes along with one of
these obscure CD drives. Note that these devices are extremely rare, so even if
we can't ever find a decent probe method, at least we will be supporting almost
all of the USBAT-based hardware out there.
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Use USB vendor and product IDs to determine whether the attached
device is a CDROM or a Flash device. Daniel Drake says that the
*same* vendor and product IDs for non-HP vendor ID could be either
flash or cdrom, so try to probe for them.
Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
I've worked out what's going wrong. The scsi layer is now much
more likely to pass down scatterlists instead of plain buffers. So
you have to make sure that they're handled correctly. In one of the
changes along the way, usbat_write_block and friends stopped obeying
the srb->use_sg flag.
Anyway, with the appended patch, and the one I'm putting in the next email, it
all seems to work for the HP cd4e. Of course, someone's going to have
to test it with the flash drives as well....
This patch teaches the usbat_{read,write}_block functions to
obey the use_sg flag in the scsi-request.
Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Make inputs pollable using sysfs_notify and add support for the Phidget
InterfaceKit 0/16/16. Various cleanups.
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Daniel Saakes <daniel@saakes.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
We #include <linux/netdevice.h> only because <linux/etherdevice.h>
needed it, but didn't #include it itself. But that's been fixed now.
Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Some hubs claim not to support port-power switching, and right now the
hub driver believes them and does not enable power to their ports.
However it turns out that even though they don't actually switch power,
they do ignore all events on a port until told to turn on the power!
This problem has been reported by several users.
This revised patch (as672b) makes the hub driver always try to turn on
port power to all hubs, regardless of what the hub descriptor says. It
also adds a comment explaining the need for this.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add support for MacBook touchpad in appletouch driver.
Thanks to Alex Harper for the informations.
Use u16 instead of int16_t in atp_is_geyser* functions.
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Nicolas Boichat <nicolas@boichat.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Prevent sending further output to a USB-serial console after the dongle is
disconnected, take care not to leak kref.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Prevent ENODEV on a /dev/ttyUSBx, used as a USB-serial console.
From: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Prevent NULL dereference when used as a USB-serial console.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Append Carriage-Returns after Line-Feeds, analogous to the serial driver.
From: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
In some systems we may have both a platform EHCI controller and PCI EHCI
controller. Previously we couldn't build the EHCI support as a module due
to conflicting module_init() calls in the code.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch contains the following possible cleanups:
- make needlessly global functions static
- function and struct declarations belong into header files
- make SiS_VCLKData const
- #if 0 the following unused global functions:
- sisusb.c: sisusb_writew()
- sisusb.c: sisusb_readw()
- sisusb_init.c: SiSUSB_GetModeID()
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
From: Arjan van de Ven <arjan@infradead.org>
Convert the semaphores-used-as-mutex to mutexes in the sisusb video driver;
this required manual checking due to the "return as locked" stuff in this
driver, but the ->lock semaphore is still used as mutex in the end.
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Cc: Thomas Winischhofer <winischhofer.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add support for detection and dworking with a ASIX 88178 based USB-Gigabit
adaptor. With the patch, it is detected and handled correctly by the asix
module.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This includes an MTU fixup which could affect larger packets with newer
Zaurii, described as http://bugzilla.kernel.org/show_bug.cgi?id=6286;
plus minor whitespace cleanup.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
this fixes the "duplicated text" bug. There's a modem that cannot cope
with large transfers and more than one urb in flight. This patch adds a
special case to the driver.
Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Keys on Yealink based phones will not function properly when using the
generic HID driver. This patch prevents the generic HID code from
grabbing the device before the regular yealink driver can get a grip on
it.
Signed-off-by: Henk Vergonet <Henk.Vergonet@gmail.com>
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
From: Paul Serice <paul@serice.net>
The workaround in commit f7201c3dcd
broke. The work around requires memory for DMA transfers for some
NVidia EHCI controllers to be below 2GB, but recent changes have
caused some DMA memory to be allocated before the DMA mask is set.
Signed-off-by: Paul Serice <paul@serice.net>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This ugly hack was long overdue to die.
It was a way to print out Sparc interrupts in a more freindly format,
since IRQ numbers were arbitrary opaque 32-bit integers which vectored
into PIL levels. These 32-bit integers were not necessarily in the
0-->NR_IRQS range, but the PILs they vectored to were.
The idea now is that we will increase NR_IRQS a little bit and use a
virtual<-->real IRQ number mapping scheme similar to PowerPC.
That makes this IRQ printing hack irrelevant, and furthermore only a
handful of drivers actually used __irq_itoa() making it even less
useful.
Signed-off-by: David S. Miller <davem@davemloft.net>
Replace all module uses with the new vfs_kern_mount() interface, and fix up
simple_pin_fs().
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Patch from Richard Purdie
Add a power budget variable to the PXA OHCI platform data and add a
default value for the spitz platform(s) which prevents known failures
with certain USB devices.
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Various scsi drivers use scsi_cmnd.buffer and scsi_cmnd.bufflen in their
queuecommand functions. Those fields are internal storage for the
midlayer only and are used to restore the original payload after
request_buffer and request_bufflen have been overwritten for EH. Using
the buffer and bufflen fields means they do very broken things in error
handling.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
zd1201 is wifi adapter, yet it is hiding in drivers/usb/net where
noone can find it. This moves Kconfig/Makefile zd1201 to the right
place.
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cleanup coding style and other small stuff in zd1201. No real code
changes.
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Add the value of cos(90) = 0 to the table. This also moves the results so
that sin(x) == sin(180-x) is true as expected.
Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Make a read of a HID device block until data is available. Without it, the
read goes into a busy-wait loop until data is available.
Cc: Greg KH <greg@kroah.com>
Acked-by: Vojtech Pavlik <vojtech@suse.cz>
Cc: Dmitry Torokhov <dtor_core@ameritech.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
I introduced this way back in 2.6.13 when adding the port lock logic.
This device talks out through different "ports" all at the same time, so
the lock logic was wrong, preventing any data from ever being sent
properly.
Thanks a lot to Bernhard Reiter <bernhard@intevation.de> for being
patient and helping with debugging this.
Cc: Bernhard Reiter <bernhard@intevation.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Based on Simon's original driver, with some minor code cleanups and
tidying by me.
Cc: Simon Schulz <simon@auctionant.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
If serial_open() fails at the port assignment or mutex_lock_interruptible()
is interrupted, the 'serial' object will never be freed.
We should call kref_put() when those errors happens.
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
If the device is disconnected while serial_open() is executing and
either try_module_get() or the device specific open function fails, the
kref_put() call in the 'bailout_kref_put' label will free the memory
pointed out by 'port'.
The subsequent dereferences in the 'bailout_kref_put' label will be
invalid.
The fix is just to assure kref_put() is called after any 'port' usage.
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
It's become apparent as machines get faster that the emagic kernel firmware
loaders (based on the ezusb loader) have a reset race. a 400MHz TiBook
never tripped it, but a 2GHz Pentium M seems to hit it about 30% of the
time. The bug is seen as a hung USB box and the kernel error:
drivers/usb/misc/emi62.c: emi62_load_firmware - error loading firmware:
error = -110
The patch below inserts a delay after deasserting reset to allow the box to
settle before a new command is issued. This affects only device startup.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
After recent changes, the USB keyboard as shipped with IBM pSeries systems
does not work anymore, unless the keyboard is replugged after reboot.
Adding this model to the blacklist fixes it.
Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This adds the Sierra Wireless card to airprime.c.
I tested this on my laptop.
Signed-off-by: Ken Brush <ken@cgi101.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds support for ACG Identification Technologies GmbH's HF
Dual ISO Reader (an RFID tag reader) to the ftdi_sio driver's device ID
table. The product ID was supplied by anotonios (anton at goto10 dot
org) on the ftdi-usb-sio-devel list and subsequently verified by myself
(Ian Abbott).
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The choose_configuration() routine contains code the determine the
device's power source, so that configurations requiring external power
can be ruled out if the device is running on bus power. Unfortunately
it turns out that some devices have errors in their config descriptors
and other devices don't like the GET_DEVICE_STATUS request.
Since that information wasn't used for anything else, this patch (as673)
removes the code, leaving only a comment. It fixes bugzilla entry
#6448.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This fixes a small regression in USB controller power usage for many
OHCI controllers, notably including every non-PCI version of OHCI: on
those systems, the runtime autosuspend mechanism is no longer enabled.
The change moves to saner defaults. All root hubs are expected to handle
remote wakeup (and hence autosuspend), although drivers for buggy silicon
may override that default.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Teach "pegasus" to handle a few of the disconnect fault paths
without hundreds of usless syslog messages.
Handle the carrier check workqueue entry even if the driver has
not been opened.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Because of the way stringify works, using an expression
like 64 * 1024 for UDSL_MAX_BUF_SIZE results in 64 * 1024
turning up in the modinfo output instead of 65536. So use
65536 directly (this was the only way I found of fixing this).
Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The maximum possible bandwidth for a speedtouch modem is about 7Mbaud.
You can only get this by using isochronous urbs (enable_isoc=1) and
altsetting 3. With the current default altsetting of 2, the modem
maxes out at about 4Mbaud. So change the default altsetting to 3
when using isochronous urbs. It would be nice to base the altsetting
on the detected line speed, but that's hard given the current design.
Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
A loop on a power-lost resume path used the wrong index.
I suspect khubd has been working around such bugs.
Noticed by Andreas Mohr <andi@rhlx01.fht-esslingen.de>.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds support for an ASK RDR 400 series contactless card
reader <http://www.ask.fr/uk/products_and_services/terminals.html> to
the ftdi_sio driver's device ID table. The product ID was supplied by
Adriano Couto on the ftdi-usb-sio-devel list.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Adds support in ftdi_sio usbserial driver for USB modems sold by
Plus GSM Company in Poland.
Signed-off-by: Luiz Fernando Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds recognition of the RR-CirKits LocoBuffer USB
to the existing FTDI driver. http://www.rr-cirkits.com
Signed-off-by: Nathan Bronson <ngb@sns-usa.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
We could use the recently added PCI_CLASS_SERIAL_USB_UHCI,
PCI_CLASS_SERIAL_USB_OHCI and PCI_CLASS_SERIAL_USB_EHCI defines in
more places, for slightly shorter and clearer code.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as671) fixes a bug in the error pathway for the net2280
probe routine. A failure during probe will cause the driver to call
pci_get_drvdata before the corresponding pci_set_drvdata has been set.
The patch also does a kzalloc conversion.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as670) adds a check for whether a shared IRQ was actually
generated by the net2280 device.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as669) fixes a bug in the net2280 driver. Now it will
properly send zero-length packets on ep0 until the control status stage
occurs.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as668) fixes a typo in net2280. The handler for 0-length
control-IN requests should check that the endpoint _isn't_ halted before
sending a 0-length packet.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Originally submitted by Olivier Blondeau <zeitoun@gmail.com>, with re-diffing
by me. Adds a new atmel unusual_dev entry.
Signed-off-by: Phil Dibowitz <phil@ipom.com>
This patch removes the Protocol portion of the Iomega Click! device as it's not
needed. Not-needed message reported by Kenneth Crudup <kenny@panix.com>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add new iTegno usb CDMA 1x card (usbid '0eba:2080') support to pl2303 driver
Signed-off-by: Wang Jun <wangjun1974@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
We may return from drivers/usb/serial/whiteheat.c::whiteheat_attach()
without freeing `result' if we leave via the no_firmware: label.
Spotted by the coverity checker as #670
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Limit USB_STORAGE_ISD200 to whatever BLK_DEV_IDE and USB_STORAGE
are set to (y, m) since isd200 calls ide_fix_driveid() in the
BLK_DEV_IDE code.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (158 commits)
commit 4f705ae3e9
Author: Bjorn Helgaas <bjorn.helgaas@hp.com>
Date: Mon Apr 3 17:09:22 2006 -0700
[PATCH] DMI: move dmi_scan.c from arch/i386 to drivers/firmware/
dmi_scan.c is arch-independent and is used by i386, x86_64, and ia64.
Currently all three arches compile it from arch/i386, which means that ia64
and x86_64 depend on things in arch/i386 that they wouldn't otherwise care
about.
This is simply "mv arch/i386/kernel/dmi_scan.c drivers/firmware/" (removing
trailing whitespace) and the associated Makefile changes. All three
architectures already set CONFIG_DMI in their top-level Kconfig files.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Andrey Panin <pazke@orbita1.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
...
Print more diagnostic info to help identify the source of power management
suspend failures.
Example:
usb_hcd_pci_suspend(): pci_set_power_state+0x0/0x1af() returns -22
pci_device_suspend(): usb_hcd_pci_suspend+0x0/0x11b() returns -22
suspend_device(): pci_device_suspend+0x0/0x34() returns -22
Work-in-progress. It needs lots more suspend_report_result() calls sprinkled
everywhere.
Cc: Patrick Mochel <mochel@digitalimplant.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Nigel Cunningham <nigel@suspend2.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This prevents an Oops if booted with "console=ttyUSB0" but without a
USB-serial dongle, and plugged one in afterwards.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds support for a clone of Nokia DKU-5 cable made by
Ours Technology Inc for Nokia phones with PopPort (Nokia 3100 and others).
The cable uses PL2303 USB-to-serial converter from Prolific Technology Inc.
Signed-off-by: Tomasz Kazmierczak <tomek.fizyk@op.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Get the "usb-bus" clock and ensure it is enabled
when the OHCI core is in use.
It seems that a few bootloaders do not enable the
UPLL at startup, which stops the OHCI core having
a 48MHz bus clock. The improvements to the clock
framework for the s3c24xx now allow the USB PLL
to be started and stopped when being used.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
When not using this patch, the kernel will continuously return "input irq
status -32 received", while making the keyboard unusable. This can be
easely resolved using HID_QUIRK_NOGET. Vendor-ID and Device-ID should be
applied to hid-core.c, and making an entry to make use of it.
Signed-off-by: Jeffrey Vandenbroucke <jeffrey@wirehead.be>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg KH <greg@kroah.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Someone recently posted a bug report where it turned out that uhci-hcd
was disagreeing with the UHCI controller over whether or not a port was
suspended: The driver thought it wasn't and the hardware thought it was.
This patch (as665) fixes the problem and simplifies the driver by
removing the internal state-tracking completely. Now the driver just
asks the hardware whether a port is suspended.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Now that the ASIX code is supporting more than just the AX88172 devices,
make the utility function names more generic: ax8817x_func -> asix_func.
Functions that are chip specific now indicate as such: ax88772_func.
Additionally, pull some common routines used in initialization and such
into simple functions to reduce the verbosity of certain functions such
as
the bind() routines and to make the error handling consistent across the
board.
Signed-off-by: David Hollis <dhollis@davehollis.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Move common definitions for NET2280 to <linux/usb/net2280.h>, so that I can
use them in prism54usb (it is not merged yet, but I plan to do it soon).
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Be sure to record the peripheral's ep0 maxpacket size BEFORE using
that to initialize the (high speed) device qualifier; that helps a
lot with USBCV testing.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Previously, scatterlist tests didn't write patterned data. Given how many
corner cases are addresed by them, this was a significant gap in Linux-USB
test coverage. Moreover, when peripherals checked for correct data patterns,
false error reports would drown out the true ones.
This adds the pattern on the way OUT from the host, so scatterlist tests can
now be used to uncover bugs like host TX or peripheral RX paths failing for
back-to-back short packets. It's easy enough to get an error there with at
least one of the {DMA,PIO}{RX,TX} code paths, or run into hardware races
that need to be defended against.
Note this patch doesn't add checking for correct data patterns on the way
IN from peripherals, just a FIXME for later.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
AT91: the two USB drivers (OHCI, UDC) got out of sync with various
usbcore and driver model PM updates; fix.
Also minor fixes to ohci: whitespace/style, MODULE_ALIAS so coldplug works
using /sys/.../modalias, and turn off _both_ clocks during suspend.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fill OUT buffers with 0x55 before RX, so that controller driver
bugs that mangle data can be more readily detected during testing.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This catches up to a change in the Kconfig support for highspeed modes;
the change predated 2.6.10, and anyone using gadgetfs on a highspeed
device would see the kernel wrongly reject the alternate descriptors.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This adds a "avoid proprietary protocols" warnoff, identifying several
of the known deficiencies in Microsoft's excuse-for-specification, and
fixes some whitespace bugs.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Some patch broke short-OUT packet handling for net2280, making it report
illegal status values. This updates the status code so it's correct.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
I submitted the wrong version of the patch teaching about the driver
for Mentor's Highspeed Dual Role Controller (HDRC), whoops! This
uses the right name for that driver.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
USB OTG devices are not required to support external hubs. This adds a
configuration option to disable that support.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
this patch fix leak of memory allocated to intr if allocation of
sc->urb_int fails.
Found by the Coverity checker.
Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
- increase ack timeout for slow system (geode 233MHz where HZ=100)
- reset the cmv ack flag when rebooting
Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
- improve debug trace in order to make easy to solve user problems.
- indent some code
- increase version number
Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Attached is a patch that fixes nasty bug, which i am afraid was there
for a long time. It was spotted by Andre Draszik <kernel@andred.net>.
From: Petko Manolov <petkan@nucleusys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds support for DTF 521, Intuos3 12x12, and 12x19;
fixes minor data report bugs.
Signed-off-by: Ping Cheng <pingc@wacom.com>
Acked-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Randy Dunlap pointed out that there now is a module_param_array_named
macro available. This patch (as666) updates g_file_storage to make use of
it. It also adds a comment listing the specifications documents used in
the design of the driver's SCSI operation (at Pat LaVarre's request).
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
A new single driver for various USB touchscreen devices. It currently
supports:
- eGalax TouchKit
- PanJit TouchSet
- 3M/Microtouch
- ITM Touchscreens
Support for the diffent devices can be enabled/disable when CONFIG_EMBEDDED
is set.
Sizes for comparision:
text data bss dec hex filename
2942 724 4 3670 e56 touchkitusb.ko
2647 660 0 3307 ceb mtouchusb.ko
2448 628 0 3076 c04 itmtouch.ko
4145 1012 12 5169 1431 usbtouchscreen.ko
Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds proper prototypes in a header file for some global
functions.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds a header file with proper prototypes for two functions
in drivers/usb/host/pci-quirks.c.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The usbserial's port semaphore used to synchronize serial_open()
and serial_close() are strict mutexes, convert them to the mutex
implementation.
Signed-off-by: Luiz Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as664) adds a comment to file_storage.c, noting that the
driver is slightly non-portable because it assumes that a buffer
allocated for a bulk-in endpoint will also be useable for a bulk-out
endpoint.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
I'm told that some UDC hardware may work better if it knows that
receiving a short packet should always cause an error. Accordingly,
this patch (as663) sets the short_not_ok flag for bulk-out transfers in
g_file_storage. Oddly enough, there are no circumstances where that
driver can legally receive a shorter-than-expected bulk-out packet.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds support for the Eclo COM to 1-Wire USB adapter
<http://www.eclo.pt/products_ibutton_adapters_usb01_en.asp> to the
ftdi_sio driver's device ID table. Details were provided by Martin
Grill on the ftdi-sio-usb-devel mailing list and I (Ian Abbott)
confirmed it matched the INF file in the Eclo's Windows driver package.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fix compile errors due to functions not being
defined static
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Below is a patch to gadgets/net2280.[ch] which adds support for the
net2282 controller. The original code was kindly provided by PLX
Technology, I just merged it with the current net2280 driver in the
kernel. Tested on 2.6.15.6, but only with 2282. I did the merge, so
that the behaviour for the 2280 is unaffected (except for short delays
for extra checks).
Signed-off-by: G. Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Support for net2282 in net2280 driver.
Since the arrays are declared as in_urbs[N_IN_URB]
and out_urbs[N_OUT_URB], both for loops go one
over the end of the array. This fixes coverity id #555.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
Signed-Off-By: Linus Torvalds <torvalds@osdl.org>
Instead of the two status values struct pcmcia_device->p_state and state,
use descriptive bitfields. Most value-checking in drivers was invalid, as
the core now only calls the ->remove() (a.k.a. detach) function in case the
attachement _and_ configuration was successful.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Most of the driver initialization isn't done in the .probe function, but in
the internal _config() functions. Make them return a value, so that .probe
can properly report whether the probing of the device succeeded or not.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
dev_link_t * and client_handle_t both mean struct pcmcai_device * by now.
Therefore, remove all such indirections.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Embed dev_link_t into struct pcmcia_device(), as they basically address the
same entity. The actual contents of dev_link_t will be cleaned up step by step.
This patch includes a bugfix from and signed-off-by Andrew Morton.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
As we do not allow setting Vcc in the pcmcia core, and Vpp1 and
Vpp2 can only be set to the same value, a lot of code can be
streamlined.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
In all but one case, the suspend and resume functions of PCMCIA drivers
contain mostly of calls to pcmcia_release_configuration() and
pcmcia_request_configuration(). Therefore, move this code out of the
drivers and into the core.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Convert the remaining drivers which use pcmcia_release_io or
pcmcia_release_irq, and remove the EXPORT of these symbols.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Fix a lot of typos. Eyeballed by jmc@ in OpenBSD.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Mark the f_ops members of inodes as const, as well as fix the
ripple-through this causes by places that copy this f_ops and then "do
stuff" with it.
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This removes statically assigned platform numbers and reworks the
powerpc platform probe code to use a better mechanism. With this,
board support files can simply declare a new machine type with a
macro, and implement a probe() function that uses the flattened
device-tree to detect if they apply for a given machine.
We now have a machine_is() macro that replaces the comparisons of
_machine with the various PLATFORM_* constants. This commit also
changes various drivers to use the new macro instead of looking at
_machine.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
The kernel's implementation of notifier chains is unsafe. There is no
protection against entries being added to or removed from a chain while the
chain is in use. The issues were discussed in this thread:
http://marc.theaimsgroup.com/?l=linux-kernel&m=113018709002036&w=2
We noticed that notifier chains in the kernel fall into two basic usage
classes:
"Blocking" chains are always called from a process context
and the callout routines are allowed to sleep;
"Atomic" chains can be called from an atomic context and
the callout routines are not allowed to sleep.
We decided to codify this distinction and make it part of the API. Therefore
this set of patches introduces three new, parallel APIs: one for blocking
notifiers, one for atomic notifiers, and one for "raw" notifiers (which is
really just the old API under a new name). New kinds of data structures are
used for the heads of the chains, and new routines are defined for
registration, unregistration, and calling a chain. The three APIs are
explained in include/linux/notifier.h and their implementation is in
kernel/sys.c.
With atomic and blocking chains, the implementation guarantees that the chain
links will not be corrupted and that chain callers will not get messed up by
entries being added or removed. For raw chains the implementation provides no
guarantees at all; users of this API must provide their own protections. (The
idea was that situations may come up where the assumptions of the atomic and
blocking APIs are not appropriate, so it should be possible for users to
handle these things in their own way.)
There are some limitations, which should not be too hard to live with. For
atomic/blocking chains, registration and unregistration must always be done in
a process context since the chain is protected by a mutex/rwsem. Also, a
callout routine for a non-raw chain must not try to register or unregister
entries on its own chain. (This did happen in a couple of places and the code
had to be changed to avoid it.)
Since atomic chains may be called from within an NMI handler, they cannot use
spinlocks for synchronization. Instead we use RCU. The overhead falls almost
entirely in the unregister routine, which is okay since unregistration is much
less frequent that calling a chain.
Here is the list of chains that we adjusted and their classifications. None
of them use the raw API, so for the moment it is only a placeholder.
ATOMIC CHAINS
-------------
arch/i386/kernel/traps.c: i386die_chain
arch/ia64/kernel/traps.c: ia64die_chain
arch/powerpc/kernel/traps.c: powerpc_die_chain
arch/sparc64/kernel/traps.c: sparc64die_chain
arch/x86_64/kernel/traps.c: die_chain
drivers/char/ipmi/ipmi_si_intf.c: xaction_notifier_list
kernel/panic.c: panic_notifier_list
kernel/profile.c: task_free_notifier
net/bluetooth/hci_core.c: hci_notifier
net/ipv4/netfilter/ip_conntrack_core.c: ip_conntrack_chain
net/ipv4/netfilter/ip_conntrack_core.c: ip_conntrack_expect_chain
net/ipv6/addrconf.c: inet6addr_chain
net/netfilter/nf_conntrack_core.c: nf_conntrack_chain
net/netfilter/nf_conntrack_core.c: nf_conntrack_expect_chain
net/netlink/af_netlink.c: netlink_chain
BLOCKING CHAINS
---------------
arch/powerpc/platforms/pseries/reconfig.c: pSeries_reconfig_chain
arch/s390/kernel/process.c: idle_chain
arch/x86_64/kernel/process.c idle_notifier
drivers/base/memory.c: memory_chain
drivers/cpufreq/cpufreq.c cpufreq_policy_notifier_list
drivers/cpufreq/cpufreq.c cpufreq_transition_notifier_list
drivers/macintosh/adb.c: adb_client_list
drivers/macintosh/via-pmu.c sleep_notifier_list
drivers/macintosh/via-pmu68k.c sleep_notifier_list
drivers/macintosh/windfarm_core.c wf_client_list
drivers/usb/core/notify.c usb_notifier_list
drivers/video/fbmem.c fb_notifier_list
kernel/cpu.c cpu_chain
kernel/module.c module_notify_list
kernel/profile.c munmap_notifier
kernel/profile.c task_exit_notifier
kernel/sys.c reboot_notifier_list
net/core/dev.c netdev_chain
net/decnet/dn_dev.c: dnaddr_chain
net/ipv4/devinet.c: inetaddr_chain
It's possible that some of these classifications are wrong. If they are,
please let us know or submit a patch to fix them. Note that any chain that
gets called very frequently should be atomic, because the rwsem read-locking
used for blocking chains is very likely to incur cache misses on SMP systems.
(However, if the chain's callout routines may sleep then the chain cannot be
atomic.)
The patch set was written by Alan Stern and Chandra Seetharaman, incorporating
material written by Keith Owens and suggestions from Paul McKenney and Andrew
Morton.
[jes@sgi.com: restructure the notifier chain initialization macros]
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The "dev->get_wireless_stats" field is deprecated and slowly
be surely going away. Most drivers have been updated months
ago. Actually, there is an annoying message for driver still using it,
but it seems that user of zd1201 were not annoyed enough ;-)
Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (21 commits)
BUG_ON() Conversion in drivers/video/
BUG_ON() Conversion in drivers/parisc/
BUG_ON() Conversion in drivers/block/
BUG_ON() Conversion in sound/sparc/cs4231.c
BUG_ON() Conversion in drivers/s390/block/dasd.c
BUG_ON() Conversion in lib/swiotlb.c
BUG_ON() Conversion in kernel/cpu.c
BUG_ON() Conversion in ipc/msg.c
BUG_ON() Conversion in block/elevator.c
BUG_ON() Conversion in fs/coda/
BUG_ON() Conversion in fs/binfmt_elf_fdpic.c
BUG_ON() Conversion in input/serio/hil_mlc.c
BUG_ON() Conversion in md/dm-hw-handler.c
BUG_ON() Conversion in md/bitmap.c
The comment describing how MS_ASYNC works in msync.c is confusing
rcu: undeclared variable used in documentation
fix typos "wich" -> "which"
typo patch for fs/ufs/super.c
Fix simple typos
tabify drivers/char/Makefile
...
Because of historic reasons, there are two separate directories with
V4L stuff. Most drivers are located at driver/media/video. However, some
code for USB Webcams were inserted under drivers/usb/media.
This makes difficult for module authors to know were things should be.
Also, makes Kconfig menu confusing for normal users.
This patch moves all V4L content under drivers/usb/media to
drivers/media/video, and fixes Kconfig/Makefile entries.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Thanks to Warren Lewis <wlewis@scn.org> for the information needed to
write the driver and for testing it out.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This one is about announcing the device registration after the last check
has been made.
From: Petko Manolov <petkan@nucleusys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The Icom ID-1 1.2 GHz band digital transceiver is a new radio
that has a USB interface. With this patch, the ftdi_sio driver
will report "Detected FT8U232AM" and provide a serial device
interface.
Signed-off-by: "A. Maitland Bottoms" <bottoms@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds a new device ID to the cp2101 driver
Signed-off-by: Craig Shelley <craig@microtron.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
check_ctrlrecip() disallows any control transfers if the device is
deconfigured (in configuration 0, ie. state ADDRESS). This for example
makes it impossible to read the device descriptors without configuring the
device, although most standard device requests are allowed in this state by
the spec. This patch allows control transfers for the ADDRESS state, too.
Signed-off-by: Horst Schirmeier <horst@schirmeier.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch fixes a NULL pointer dereference spotted by the Coverity
checker.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as661) adds an unusual_devs entry for the Mitsumi 7in1 Card
Reader.
From: Rodolfo Quesada <rquesada@roqz.net>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The following adds an unusual_devs entry for the SanDisk ImageMate CompactFlash
USB drive, for the US_FL_FIX_CAPACITY flag. Additionally, it removes trailing
whitespace from the previous entry. It's based on the patch sent by Roman Hodek
<roman@hodek.net>.
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
As found by Sam's scripts.
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
When trying to deconfigure a device via usb_set_configuration(dev, 0),
2.6.16-rc kernels after 55c527187c oops
with "Unable to handle NULL pointer dereference at...". This is due to
an unchecked dereference of cp in the power budget part.
Signed-off-by: Horst Schirmeier <horst@schirmeier.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
In a couple of places, usbcore assumes that a USB device configuration
will have a nonzero number of interfaces. Having no interfaces may or
may not be allowed by the USB spec; in any event we shouldn't die if we
encounter such a thing. This patch (as662) removes the assumptions.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as657) increases the port-reset completion delay in uhci-hcd
for HP's embedded controllers. Unlike other UHCI controllers, the HP
chips can take as long as 250 us to carry out the processing associated
with finishing a port reset.
This fixes Novell bug #148761.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The USB data cable for my Samsung GSM phone contains the USB-to-serial
converter chip MS3303H from Speed Dragon Multimedia, Inc. that appears to
be compatible with the PL2303 chip. The following patch adds support for
this chip to the pl2303 driver.
Signed-off-by: Dick Streefland <dick@streefland.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
A while ago, I posted about TIOCMIWAIT not working with the PL2303
USB-serial adapter.
After a brief exchange with Greg, I tracked this to a missing wake-up
in the USB interrupt procedures. I got our systems staff to install
the enclosed very simple patch to our 2.6.12 kernels, and it all works
fine as expected. I guess this should also apply to the latest version
and go into the mainstream.
Apologies for the long delay in posting the result.
The routine being patched is pl2303_update_line_status
Signed-off-by: Julian Bradfield <jcb+luu@inf.ed.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds support for the Nokia ca42 version 2 cable to the
cypress_m8 driver. The device was tested by others with this patch and
found to be compatible with the cypress_m8 driver. A special note
should be taken that this cable seems to vary in the type of chipset
used. This patch supports the cable with product id 0x4101.
Signed-off-by: Lonnie Mendez <lmendez19@austin.rr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
ZC0301 driver updates.
Changes: + new, - removed, * cleanup, @ bugfix
@ Need usb_get|put_dev() when disconnecting, if the device is open
* Cleanups and updates in the documentation
+ Use per-device sensor structures
+ Add frame_timeout module parameter
Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
USB: ET61X[12]51 driver updates
Changes: + new, - removed, * cleanup, @ bugfix
@ Fix stream_interrupt()
@ Fix vidioc_enum_input() and split vidioc_gs_input()
@ Need usb_get|put_dev() when disconnecting, if the device is open
* Use wait_event_interruptible_timeout() instead of wait_event_interruptible()
when waiting for video frames
* replace wake_up_interruptible(&wait_stream) with wake_up(&wait_stream)
* Cleanups and updates in the documentation
* Use mutexes instead of semaphores
+ Use per-device sensor structures
+ Add support for PAS202BCA image sensors
+ Add frame_timeout module parameter
Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
SN9C10x driver updates.
Changes: + new, - removed, * cleanup, @ bugfix
@ Fix stream_interrupt()
@ Fix vidioc_enum_input() and split vidioc_gs_input()
@ Need usb_get|put_dev() when disconnecting, if the device is open
* Use wait_event_interruptible_timeout() instead of wait_event_interruptible()
when waiting for video frames
* replace wake_up_interruptible(&wait_stream) with wake_up(&wait_stream)
* Cleanups and updates in the documentation
+ Use per-device sensor structures
+ Add support for PAS202BCA image sensors
+ Add frame_timeout module parameter
Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
this patch converts drivers/usb to kzalloc usage.
Compile tested with allyes config.
I think there was a bug in drivers/usb/gadget/inode.c because
it used sizeof(*data) for the kmalloc() and sizeof(data) for
the memset(), since sizeof(data) just returns the size for a pointer.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
"Cosmetic" driver updates for the ZC0301 driver:
- Fix stream_interrupt() (and work around a possible kernel bug);
- Fix vidioc_enum_input() and split vidioc_gs_input() in two parts;
- Use wait_event_interruptible_timeout() instead of wait_event_interruptible()
when waiting for video frames;
- replace erroneous wake_up_interruptible(&wait_stream) with
wake_up(&wait_stream);
- Cosmetic cleanups in the documentation.
Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Gcc 4.0.2 had the warning:
drivers/usb/media/ov511.c: In function 'show_exposure':
drivers/usb/media/ov511.c:5642: warning: 'exp' may be used uninitialized
in this function
Here is the patch to fix that warning.
Signed-off-by: Matthew Martin <lihnucks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch allows you to set the iSerialNumber field in the
usb_device_descriptor structure for your USB ethernet gadget.
It also changes the parameters shown through sysfs so they're
no longer declared as __initdata, preventing potential oopses.
That's most useful for the Ethernet addresses, which may in
some cases be random "locally administered" addresses.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This adds __init section annotations to gadget driver bind() routines to
remove calls from .text into .init sections (for endpoint autoconfig).
Likewise it adds __exit section annotations to their unbind() routines.
The specification of the gadget driver register/unregister functions is
updated to explicitly allow use of those sections.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as647) fixes a small error introduced by a recent change to
the USB core suspend/resume code.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as640) removes several put_device and the corresponding
get_device calls from the USB core and HCDs. Some of the puts were done
in atomic contexts, and none of them are needed since the core now
guarantees that every endpoint will be disabled and every URB completed
before a USB device is released.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
A recent update to the uhci-hcd driver invoked the list_prepare_entry
macro incorrectly. This patch (as646) corrects it.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Even when the URB_SHORT_NOT_OK flag is set, a short transfer shouldn't
generate a debugging log message. Especially not one with the confusing
claim that the transfer "failed with status 0". This patch (as627)
fixes that behavior in uhci-hcd.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as626) makes some improvements to the debugging code in
uhci-hcd. The main change is that now the code won't get compiled if
CONFIG_USB_DEBUG isn't set. But there are other changes too, like
adding a missing .owner field and printing a debugging dump if the
controller dies.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
As part of reorienting uhci-hcd away from URBs and toward endpoint
queues, this patch (as625) eliminates the driver's main list of URBs.
The list wsa used mainly in checking for URB completions; now the driver
goes through the list of active endpoints and checks the members of the
queues.
As a side effect, I had to remove the code that looks for FSBR timeouts.
For now, FSBR will remain on so long as any URBs on a full-speed control
or bulk queue request it, even if the queue isn't advancing. A later
patch can add more intelligent handling. This isn't a huge drawback;
it's pretty rare for an URB to get stuck for more than a fraction of a
second. (And it will help the people trying to use those insane HP USB
devices.)
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as624) fixes a hardware race in uhci-hcd by adding a dummy
TD to the end of each endpoint's queue. Without the dummy the host
controller will effectively turn off the queue when it reaches the end,
which happens asynchronously. This leads to a potential problem when
new transfer descriptors are added to the end of the queue; they may
never get used.
With a dummy TD present the controller never turns off the queue;
instead it just stops at the dummy and leaves the queue on but inactive.
When new TDs are added to the end of the queue, the first new one gets
written over the dummy. Thus there's never any question about whether
the queue is running or needs to be restarted.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as623) changes the uhci-hcd driver to make it use one QH per
device endpoint, instead of a QH per URB as it does now. Numerous areas
of the code are affected by this. For example, the distinction between
"queued" URBs and non-"queued" URBs no longer exists; all URBs belong to
a queue and some just happen to be at the queue's head.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
In setting up the of PHY we masked off too many bits, instead just
initialize PORTSC for the type of PHY we are using.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds a second linksys vendor-id (077b) and the product id of the
pegasus based adapter USBVPN1
http://www1.linksys.com/Products/product.asp?prid=3D543&scid=3D30
Furthermore it replaces all LINKSYS_GPIO_RESET with DEFAULT_GPIO_RESET as both
are declared like this:
#define DEFAULT_GPIO_RESET 0x24
#define LINKSYS_GPIO_RESET 0x24
This is misleading and confusing.
The check is now done via the VENDOR_ID in pegasus.c:
if (usb_dev_id[pegasus->dev_index].vendor == VENDOR_LINKSYS
Signed-off-by: Malte Doersam <mdoersam@arcor.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as628c) adds error handling to the USB HID core. When an
error is reported for an interrupt URB, the driver will do delayed
retries, at increasing intervals, for up to one second. If that doesn't
work, it will try to reset the device. Testing by users has shown that
both the retries and the resets end up getting used.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This makes usbcore use the driver model wakeup flags for host controllers
and for their root hubs. Since previous patches have removed all users of
the HCD flags they replace, this converts the last users of those flags.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This makes OHCI use the driver model wakeup control bits for its root hub
(e.g. disable on amd756, because of chip erratum) and for the controller
itself. It no longer uses the hcd glue bits with those roles, and depends
on the previous patch making the root hub available earlier.
Note that on most platforms (boot code properly setting the RWC bit) this
gives a partial workaround for the way PCI isn't currently flagging devices
that support PME# signals. (Because of odd PCI init sequencing on PPC.)
That's because many OHCI controllers support "legacy PCI PM" ... without
involving any PCI PM capability.
USB wakeup from STR, if it works on your system, may still involve
tweaking things by hand in /proc/acpi/wakeup.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Make the HCD initialization sequence more sane ... notably, setting up
root hubs before HCDs are asked to do their one-time init. Among other
things, that lets the HCDs do custom root hub init along with all the
other one-time initialization done in the (now misnamed) reset() method.
This also copies the controller wakeup flags into the root hub; it's
done a bit later than would be ideal, but that'll be necessary until
the PCI code initializes them correctly. (The PCI patch breaks on PPC
due to how it sequences PCI initialization.)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This adds declarations for three USB peripheral controllers:
- Two high speed USB cores that can be licensed from Mentor Graphics
to be integrated into silicon:
* "musbhsfc" is for peripherals only, as found in for example the
IBM/AMCC 44EP processors.
* "musbhdrc" is OTG-capable (dual role), and is found in various
products including OMAP 2430 and the new DaVinci SOCs.
The "musbh" standing for "Mentor USB Highspeed", the rest standing
for "Function Controller" or "Dual Role Controller" (OTG-capable).
- The full speed controller on the FreeScale MPC8272.
Adding these definitions just allows gadget driver code to handle any
controller-specific logic; controller drivers are quite separate.
Signed-off-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Resove a minor FIXME: don't change MTU while RNDIS link is active,
the other end won't expect such things...
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This adds support for the USB peripheral controller on AT91
(rm9200, eventually also sam9261 or uClinux) platforms.
More SOC support for Linux-USB ... an uncomplicated pure PIO driver.
It'd be worth using this as a model, if you're starting a driver
for some other peripheral controller.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This adds support for OHCI on AT91rm9200 based boards.
Possibly of interest here is the way this uses <linux/clk.h> to
gate clocks on/off during system pm state transitions. That's
typical for non-PCI systems. Some can go further; Mini-A host
side connectors enable ID-pin sensing.
From: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch modifies the behavior of the EHCI driver in an unlink path
that seems to be causing various issues on some systems. Those problems
have included issues with disconnection, driver unbinding, and similar
cases where urb unlinking would just not work right.
This patch should help avoid those problems by not turning off the async
(control/bulk) schedule until it's not expecting an "async advance" IRQ,
which comes from the processing passing the schedule head. Whether the
driver attempts to do such things is dependent on system timings, so
many folk would never have seen these problems.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
ALCHEMY: Add OHCI support for AU1200
Updated by moving the OHCI support out of the EHCI patch.
Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
ALCHEMY: Add EHCI support for AU1200
Updated by removing the OHCI support
Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
On the MPC834x processors the multiport host (MPH) EHCI controller has an
erratum in which the port number in the queue head expects to be 0..N-1
instead of 1..N. If we are on one of these chips we subtract one from
the port number before putting it into the queue head.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Adding a Host Mode USB driver for the Freescale 83xx.
This driver supports both the Dual-Role (DR) controller and the
Multi-Port-Host (MPH) controller present in the Freescale MPC8349. It has
been tested with the MPC8349CDS reference system. This driver depends on
platform support code for setting up the pins on the device package in a
manner appropriate for the board in use. Note that this patch requires
selecting the EHCI controller option under the USB Host menu.
Signed-off-by: Randy Vinson <rvinson@mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch replaces the split ISO raw_mask calculation code in the
iso_stream_init() function that computed incorrect numbers of high
speed transactions for both input and output transfers.
In the output case, it added a superfluous start-split transaction for
all maxmimum packet sizes that are a multiple of 188.
In the input case, it forgot to add complete-split transactions for all
microframes covered by the full speed transaction, and the additional
complete-split transaction needed for the case when full speed data
starts arriving near the end of a microframe.
These changes don't affect the lack of full speed bandwidth, but at
least it removes the MMF errors that the HC raised with some input
streams.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This teaches the EHCI driver about a quirk seen in older NForce2 chips,
adding a workaround to ignore selective suspend requests. Bus-wide
(so-called "global") suspend still works, as does USB wakeup of a
root hub that's globally suspended.
There's still a hole in this support though. Strictly speaking, this
should _fail_ selective suspend requests, rather than ignoring them,
since doing it this way means that devices which should be able to issue
remote wakeup are not going to be able to do that. For now, we'll just
live with that problem ... since usbcore expects to do selective suspend
on the way towards a full bus suspend, and usbcore needs to be able to
do full bus suspend.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
the patch below converts a bunch of semaphores-used-as-mutex in the USB
code to mutexes
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
After the removal of usb-midi.c, there's no longer any external user of
usb_get_string().
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch removes the obsolete USB_MIDI and USB_AUDIO drivers.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
this does two things:
- use kzalloc where appropriate
- correct error return codes in ioctl
Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
another one for kzalloc. This covers the storage subdirectory.
Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/devio.c: In function `usbdev_read':
drivers/usb/core/devio.c:140: error: invalid type argument of `->'
drivers/usb/core/devio.c:141: error: invalid type argument of `->'
drivers/usb/core/devio.c:142: error: invalid type argument of `->'
drivers/usb/core/devio.c:143: error: invalid type argument of `->'
Cc: Oliver Neukum <oliver@neukum.org>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
this is a small optimisation. It is ridiculous to do a kmalloc for
18 bytes. This puts it onto the stack.
Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds a Video4Linux2 driver for ZC0301
Image Processor and Control Chip.
Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The USB core symbols will be converted to GPL-only in a few years. Mark
this as such and update the documentation explaining why, and provide a
pointer for developers to receive help if they need it.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
platform_get_irq*() now returns on -ENXIO when the resource cannot be
found. Ensure all users of platform_get_irq*() handle this error
appropriately.
Signed-off-by: David Vrabel <dvrabel@arcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch makes the "cc/teletext" key emit "KEY_TEXT" event instead of
"KEY_SUBTITLE" which is already mapped to "subtitle" button.
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This fixes a use-after-free bug in the usb-serial core. It is simple to
trigger this (open a usb-serial port, then yank the device out before
closing the port.) Thanks to Stefan Seyfried <seife@suse.de> for
reporting this, and to the slab debugging code which enabled it to be
tracked down.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This patch adds a bunch of new device IDs to the ftdi_sio driver for
various devices from microHAM using FTDI chips.
Micheal Studer supplied the PID for the USB-Y9 device. I examined the
INF file in microHAM's Windows driver package for the USB-KW, USB-YS,
USB-IC, USB-DB9 and USB-RS232 devices.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Added the USB vendorID of GSPDA and the productID of GSPDA's palm
smartphone 'xplore m68' to the list of known devices.
Signed-off-by: Hendrik Schweppe <linuxkpatch@hendrik.fam-schweppe.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Remote NDIS response to OID_GEN_SUPPORTED_LIST only allocated space
for the data attached to the reply, and not the reply structure
itself. This caused other kmalloc'd memory to be corrupted.
Signed-off-by: Shaun Tancheff <shaun@tancheff.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
There is a dead lock in lh7a40x udc driver. When the driver receive a
SET_FEATURE HALT request, the dev lock is taken by the interrupt
handler lh7a40x_udc_irq then the handler will call lh7a40x_set_halt
function which in its turn will try to acquire the dev lock.
Signed-off-by: Franck Bui-Huu <franck.bui-huu@innova-card.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as656) adds an unusual_devs.h entry for the Lyra RCA RD1080
MP3 player. Its card-reader firmware has the common
report-one-too-many-sectors bug. This fixes Novell bug #152175.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch is for the Dual USB Joypad [0925:8866] from Wisegroup. The
HID_QUIRK_NOGET is necessary for it to respond to input, and the
HID_QUIRK_MULTI_INPUT is necessary to have two js# nodes appear.
Signed-off-by: Andrew Fuller <mactalla.obair@gmail.com>
Cc: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fix http://bugzilla.kernel.org/show_bug.cgi?id=6128
Finish morphing the "early handoff" version of the EHCI BIOS handshake over
to match the previous implementation inside the EHCI driver (except that
now we forcibly disable the SMI). The version that had been with the PCI
code was surprisingly full of bugs.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: <yazar256@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The following patch looks good to me. It adds an unusual_devs entry as
well as fixing an ordering bug. Please apply.
From: Bohdan Linda <bohdan.linda@gmail.com>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Here is a new entry for unusual_devs.h (as630).
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The switchover to "platform_driver" from "device_driver" missed
one rather essential usage, which broke the sl811_cs driver ...
this resolves the omission.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The patch adds the USB ID (0413:2101) for the Leadtek GPS-Mouse 9531 to
the driver pl2303.
Signed-off-by: Christian Lindner <christian.lindner@gmx.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Disable some dubious "early" USB handoff code that allegedly works around bugs
on some systems (we don't know which ones) but rudely breaks some others.
Also make the kernel warnings reporting BIOS handoff problems be more useful,
reporting the register whose value displays the trouble.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
I thought we had fixed up all non-gpl USB drivers, and was wrong to do
this.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This makes sure that the correct length is reported when freeing
a dma-coherent buffer; some platforms complain if that's wrong.
It also makes two parameters readonly in sysfs, as they're not
safe to change while tests are running.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/input/yealink.c: In function `usb_probe':
drivers/usb/input/yealink.c:910: warning: int format, different type arg (arg 4)
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
We cast an int to a void * which not unreasonably makes gcc suspicious.
We don't actually care what type "type" is so use unsigned long so it
matches pointer length on all platforms.
Signed-off-by: Alan Cox <alan@redhat.com>
Acked-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
au_readl() does needed byteswapping, etc.
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Jaroslav Kysela <perex@perex.cz>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
- the decomp module is not intended for inclusion into the kernel
- people using the decomp module from upstream will usually simply use
the complete upstream 2.xx driver
Therefore, there seems to be no good reason spending some bytes of
kernel memory for hooks for this module.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Mark McClelland <mark@ovcam.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
- the w9968cf-vpp module is not intended for inclusion into the kernel
- the upstream w9968cf package shipping the w9968cf-vpp module suggests
to simply replace the w9968cf module shipped with the kernel
Therefore, there seems to be no good reason spending some bytes of
kernel memory for hooks for the w9968cf-vpp module.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
this patch removes compatibility with 2.4 kernel, which makes
the code much easier to read.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as622) makes gadgetfs set the "zero" flag for control-IN
responses, when the length of the response is shorter than the length of
the request.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Replace mdelay() by msleep() in bus_suspend(); the rest of the system will
gain 7ms. The related code is reorganized to minimize the number of
locking/unlocking calls.
The last hunk of the patch is the formatting change by Lindent.
Signed-off-by: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
For some reason alpha doesn't include <linux/dma-mapping.h> where other
architectures do; this makes net2280 include it explicitly.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Some USB devices don't enumerate well with FSBR turned on. This patch
keeps devices on the low-speed part of the schedule (which doesn't use
FSBR) until they have been fully configured.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds a reinitializion for the uf variable that got modified
by the preceding start-split bandwidth check.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
My earlier experiment (adding a clear-halt for the interrupt-in
endpoint) failed. It turns out that it does cause problems for other
devices. And it wasn't needed anyway; a simple blacklist entry was
enough to get my HP keyboard working.
This patch (as643) removes the clear-halt call and adds the blacklist
entry.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add device support for a couple more Auerswald TK-devices.
Via Thomas Jackle <dj-tj@gmx.de>, typed in from
http://bugzilla.kernel.org/show_bug.cgi?id=5908.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
this patch correct a possible bug with cmv_name being static. If there
is 2 modems and the driver is scheduled when filling cmv_name this could
result with garbage in cmv_name. We allocate cmv_name on the stack but
with a small size in order to avoid that.
Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds the support for isochronous pipe.
A new module parameter is added to select iso mode. It is set to iso by
default because bulk mode doesn't work well at high speed rate (>3 Mbps
for upload).
We use UDSL_IGNORE_EILSEQ flags because ADI firmware doesn't reply to
ISO IN when it has nothing to send [1].
[1]
from cypress datasheet :
The ISOSEND0 Bit (bit 7 in the USBPAIR Register) is used when the EZ-USB
FX chip receives an isochronous IN token while the IN FIFO is empty. If
ISOSEND0=0 (the default value), the USB core does not respond to the IN
token. If ISOSEND0=1, the USB core sends a zero-length data packet in
response to the IN token. The action to take depends on the overall
system design. The ISOSEND0 Bit applies to all of the isochronous IN
endpoints, IN-8 through IN-15.
Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is the usbatm part of the Arjan, Jes and Ingo
mass semaphore to mutex conversion, reworked to apply on top
of the patches I just sent to you. This time, with correct
attribution and signed-off lines.
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Don't throttle on -EILSEQ urb status if requested by a minidriver.
It seems the ueagle modems are buggy, giving -EILSEQ when they
have no data to send. The ueagle change will be sent separately
by the ueagle guys. Patch by Matthieu Castet.
Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The receive logic has always assumed that urbs contain an integral
number of ATM cells, which is a bit naughty, though it never caused
any problems with bulk transfers. Isochronous urbs spank us soundly
for this. Fixed thanks to this patch, mostly by Stanislaw Gruszka.
Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
While the usbatm core has had some support for using isoc urbs
for some time, there was no way for users to turn it on. While
use of isoc transfer should still be considered experimental, it
now works well enough to let users turn it on. Minidrivers signal
to the core that they want to use isoc transfer by setting the new
UDSL_USE_ISOC flag. The speedtch minidriver gets a new module
parameter enable_isoc (defaults to false), plus some logic that
checks for the existence of an isoc receive endpoint (not all
speedtouch modems have one).
Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Change the module parameters rcv_buf_size and snd_buf_size to
specify buffer sizes in bytes rather than ATM cells. Since
there is some danger that users may not notice this change,
the parameters are renamed to rcv_buf_bytes etc. The transmit
buffer needs to be a multiple of the ATM cell size in length,
while the receive buffer should be a multiple of the endpoint
maxpacket size (this wasn't enforced before, which causes trouble
with isochronous transfers), so enforce these restrictions. Now
that the usbatm probe method inspects the endpoint maxpacket size,
minidriver bind routines need to set the correct alternate setting
for the interface in their bind routine. This is the reason for
the speedtch changes.
Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
In one spot (usbatm_cancel_send) we were calling dev_kfree_skb with irqs
disabled. This mistake is just too easy to make, so systematically use
dev_kfree_skb_any rather than dev_kfree_skb.
Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch causes vcc_release_async to be applied to any open
vcc's when the modem is disconnected. This signals a socket
shutdown, letting the socket user know that the game is up.
I wrote this patch because of reports that pppd would keep
connections open forever when the modem is disconnected.
This patch does not fix that problem, but it's a step in the
right direction. It doesn't help because the pppoatm module
doesn't yet monitor state changes on the ATM socket, so simply
never realises that the ATM connection has gone down (meaning
it doesn't tell the ppp layer). But at least there is a socket
state change now. Unfortunately this patch may create problems
for those rare users like me who use routed IP or some other
non-ppp connection method that goes via the ATM ARP daemon: the
daemon is buggy, and with this patch will crash when the modem
is disconnected. Users with a buggy atmarpd can simply restart
it after disconnecting the modem.
Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The xusbatm driver is for otherwise unsupported modems.
All it does is grab hold of a user-specified set of
interfaces - the generic usbatm core methods (hopefully)
do the rest. As Aurelio Arroyo discovered when he tried
to use xusbatm (big mistake!), the interface grabbing logic
was completely borked. Here is a rewrite that works.
Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Have minidrivers and the core signal special requirements
using a flags field in struct usbatm_data. For the moment
this is only used to replace the need_heavy_init bind
parameter, but there'll be new flags in later patches.
Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds a Video4Linux2 driver giving support
to ET61X151 and ET61X251 PC Camera Controllers made by
Etoms Electronics.
Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
SN9C10x driver updates:
- Use kzalloc() instead of kmalloc()
- Move some macro definitions from sn9c102.h to sn9c102_core.c
- Use vfree() and vmalloc_32() instead of rvfree() and rvmalloc()
- Fix mmap() sys call
- Documentation updates
Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The attached patch adds four new device IDs for the CP2101 driver.
Also 3 tab characters have been removed from device ID table.
Signed-off-by: Craig Shelley <craig@microtron.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Added support for CA-42 clone cable (www.ca-42.com)
Signed-off-by: Martin Gingras <martin.gingras@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch corrects the URB initialisation for transfers
like this is done in other drivers too.
Without this patch no data was transmitted on a PXA270 OHCI
platform. May apply to others too.
Signed-off-by: Juergen Schindele <schindele@nentec.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add device IDs for the 0G0 Cable Ethernet device as reported by
Charles Lepple <clepple@gmail.com>.
Signed-off-by: David Hollis <dhollis@davehollis.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
SN9C10x driver updates and bugfixes.
Changes: + new, - removed, * cleanup, @ bugfix:
@ fix poll()
@ Remove bad get_ctrl()'s
* Reduce ioctl stack usage
* Remove final ";" from some macro definitions
* Better support for SN9C103
+ Add sn9c102_write_regs()
+ Add 0x0c45/0x602d to the list of SN9C10x based devices
+ Add support for OV7630 image sensors
+ Provide support for the built-in microphone interface of the SN9C103
+ Documentation updates
+ Add 0x0c45/0x602e to the list of SN9C10x based devices
Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
I've been offered a nice Sony DSC-T5 digital camera, with a USB connection.
Unfortunately it is not recognized by Linux 2.6.14.4's usb-storage.
With the following change I'm able to mount and read my pictures:
Signed-off-by: Phil Dibowitz <phil@ipom.com>
this fixes
-potential hang by disconnecting through usbfs
-kzalloc
-general cleanup
-micro optimisation in interrupt handlers
It compiles and I am printing.
Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch from Bob Copeland adds support for the Rio Karma portable
digital audio player to the usb-storage driver. The only thing needed to
support this device is a one-time (per plugin) init command which is sent
to the device.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This should fix things mentioned below:
"I was curious why my firewall was loading a 'phone driver'.
It turns out that the probing in the yealink driver is
a little too assuming..
static struct usb_device_id usb_table [] = {
{ USB_INTERFACE_INFO(USB_CLASS_HID, 0, 0) },
{ }
};
So it picked up my UPS, and loaded the driver.
Whilst no harm came, because it later checks the vendor/product IDs,
this driver should probably be rewritten to only probe
for the device IDs it actually knows about.
Dave"
Signed-off-by: Henk Vergonet <henk.vergonet@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Documentation: Specify grayscale specification on ATIK-ATK16
and ATIK-ATK16HR comments.
New: Add ProductID and VendorID for devices ATIK-ATK16C and
ATIK-ATK16HRC. These devices are also USB Astronomical CCD
cameras that work through an FTDI 245BM chip, share the
same base hardware but, it has a colour CCD chip instead
of a grayscale one.
Signed-off-by: Rui Santos <rsantos@grupopie.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The attached patch adds a new PID for the ftdi_sio driver. It will
enable support for PC-DJ's DAC-2 controller module
(more information on http://www.pcdjhardware.com/DAC2.asp)
Signed-off-by: Wouter Paesen <wouter@kangaroot.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds two new devices to the ftdi_sio driver's device ID
table. The device IDs were supplied by Cory Lee to support two POS
printers made by Westrex International (Model 777 and Model 8900F).
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
this patch includes the Vendor Id for a optic fiber to USB device named
TTUSB from thought Technology. It's just add the vendor Id to
ftdi_sio.h and add the Vendor ID and model Id to table_combined.
Signed-off-by: Louis Nyffenegger <louis.nyffenegger@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This moves the previously widely-used ehci-pci.c BIOS handoff
code into the pci-quirks.c file, replacing the less widely used
"early handoff" version that seems to cause problems lately.
One notable change: the "early handoff" version always enabled
an SMI IRQ ... and did so even if the pre-Linux code said it was
not using EHCI (and not expecting EHCI SMIs). Looks like a goof
in a workaround for some unknown BIOS version.
This merged version only forcibly enables those IRQs when pre-Linux
code says it's using EHCI. And now it always forces them off "just
in case".
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Found this when working with a HAPP UGCI device. It has a usage with 7
indexes. I could read them all one at a time, but using a multiref it
would only allow me to read the first 6. The patch below fixed it.
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Remove the "inline" keyword from a bunch of big functions in the kernel with
the goal of shrinking it by 30kb to 40kb
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
tmp_buf_sem sems to be a common name for something completely unused...
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de> ("usb portion")
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This patch implements support for the fn key on Apple PowerBooks using
USB based keyboards and makes them behave like their ADB counterparts.
Signed-off-by: Michael Hanselmann <linux-kernel@hansmi.ch>
Acked-by: Rene Nussbaumer <linux-kernel@killerfox.forkbomb.ch>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
The Cherry Cymotion is a special Linux keyboard made by Cherry, with
only one little problem: it doesn't work with Linux. This patch
(originally by hexten.net, cleaned up by me) makes it work including
all the special keys.
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
USB gadget drivers make no use of these, remove the pointless
comments.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The API and code have been through various bits of initial review by
serial driver people but they definitely need to live somewhere for a
while so the unconverted drivers can get knocked into shape, existing
drivers that have been updated can be better tuned and bugs whacked out.
This replaces the tty flip buffers with kmalloc objects in rings. In the
normal situation for an IRQ driven serial port at typical speeds the
behaviour is pretty much the same, two buffers end up allocated and the
kernel cycles between them as before.
When there are delays or at high speed we now behave far better as the
buffer pool can grow a bit rather than lose characters. This also means
that we can operate at higher speeds reliably.
For drivers that receive characters in blocks (DMA based, USB and
especially virtualisation) the layer allows a lot of driver specific
code that works around the tty layer with private secondary queues to be
removed. The IBM folks need this sort of layer, the smart serial port
people do, the virtualisers do (because a virtualised tty typically
operates at infinite speed rather than emulating 9600 baud).
Finally many drivers had invalid and unsafe attempts to avoid buffer
overflows by directly invoking tty methods extracted out of the innards
of work queue structs. These are no longer needed and all go away. That
fixes various random hangs with serial ports on overflow.
The other change in here is to optimise the receive_room path that is
used by some callers. It turns out that only one ldisc uses receive room
except asa constant and it updates it far far less than the value is
read. We thus make it a variable not a function call.
I expect the code to contain bugs due to the size alone but I'll be
watching and squashing them and feeding out new patches as it goes.
Because the buffers now dynamically expand you should only run out of
buffering when the kernel runs out of memory for real. That means a lot of
the horrible hacks high performance drivers used to do just aren't needed any
more.
Description:
tty_insert_flip_char is an old API and continues to work as before, as does
tty_flip_buffer_push() [this is why many drivers dont need modification]. It
does now also return the number of chars inserted
There are also
tty_buffer_request_room(tty, len)
which asks for a buffer block of the length requested and returns the space
found. This improves efficiency with hardware that knows how much to
transfer.
and tty_insert_flip_string_flags(tty, str, flags, len)
to insert a string of characters and flags
For a smart interface the usual code is
len = tty_request_buffer_room(tty, amount_hardware_says);
tty_insert_flip_string(tty, buffer_from_card, len);
More description!
At the moment tty buffers are attached directly to the tty. This is causing a
lot of the problems related to tty layer locking, also problems at high speed
and also with bursty data (such as occurs in virtualised environments)
I'm working on ripping out the flip buffers and replacing them with a pool of
dynamically allocated buffers. This allows both for old style "byte I/O"
devices and also helps virtualisation and smart devices where large blocks of
data suddenely materialise and need storing.
So far so good. Lots of drivers reference tty->flip.*. Several of them also
call directly and unsafely into function pointers it provides. This will all
break. Most drivers can use tty_insert_flip_char which can be kept as an API
but others need more.
At the moment I've added the following interfaces, if people think more will
be needed now is a good time to say
int tty_buffer_request_room(tty, size)
Try and ensure at least size bytes are available, returns actual room (may be
zero). At the moment it just uses the flipbuf space but that will change.
Repeated calls without characters being added are not cumulative. (ie if you
call it with 1, 1, 1, and then 4 you'll have four characters of space. The
other functions will also try and grow buffers in future but this will be a
more efficient way when you know block sizes.
int tty_insert_flip_char(tty, ch, flag)
As before insert a character if there is room. Now returns 1 for success, 0
for failure.
int tty_insert_flip_string(tty, str, len)
Insert a block of non error characters. Returns the number inserted.
int tty_prepare_flip_string(tty, strptr, len)
Adjust the buffer to allow len characters to be added. Returns a buffer
pointer in strptr and the length available. This allows for hardware that
needs to use functions like insl or mencpy_fromio.
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: John Hawkes <hawkes@sgi.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
ICC likes to complain about storage class not being first, GCC doesn't
care much (except for cases like "inline static").
have a hard time seeing how it could break anything.
Thanks to Gabriel A. Devenyi for pointing out
http://linuxicc.sourceforge.net/ which is what made me create this patch.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This patch converts the inode semaphore to a mutex. I have tested it on
XFS and compiled as much as one can consider on an ia64. Anyway your
luck with it might be different.
Modified-by: Ingo Molnar <mingo@elte.hu>
(finished the conversion)
Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Here's a small patch with a few tiny fixups for the EHCI Kconfig help
text. Please consider applying.
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
This moves the 32 bit ioctl compatibility handlers for
Video4Linux into a new file and adds explicit calls to them
to each v4l device driver.
Unfortunately, there does not seem to be any code handling
the v4l2 ioctls, so quite often the code goes through two
separate conversions, first from 32 bit v4l to 64 bit v4l,
and from there to 64 bit v4l2. My patch does not change
that, so there is still much room for improvement.
Also, some drivers have additional ioctl numbers, for
which the conversion should be handled internally to
that driver.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Some long time ago, dentry struct was carefully tuned so that on 32 bits
UP, sizeof(struct dentry) was exactly 128, ie a power of 2, and a multiple
of memory cache lines.
Then RCU was added and dentry struct enlarged by two pointers, with nice
results for SMP, but not so good on UP, because breaking the above tuning
(128 + 8 = 136 bytes)
This patch reverts this unwanted side effect, by using an union (d_u),
where d_rcu and d_child are placed so that these two fields can share their
memory needs.
At the time d_free() is called (and d_rcu is really used), d_child is known
to be empty and not touched by the dentry freeing.
Lockless lookups only access d_name, d_parent, d_lock, d_op, d_flags (so
the previous content of d_child is not needed if said dentry was unhashed
but still accessed by a CPU because of RCU constraints)
As dentry cache easily contains millions of entries, a size reduction is
worth the extra complexity of the ugly C union.
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Cc: Dipankar Sarma <dipankar@in.ibm.com>
Cc: Maneesh Soni <maneesh@in.ibm.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Cc: Ian Kent <raven@themaw.net>
Cc: Paul Jackson <pj@sgi.com>
Cc: Al Viro <viro@ftp.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Neil Brown <neilb@cse.unsw.edu.au>
Cc: James Morris <jmorris@namei.org>
Cc: Stephen Smalley <sds@epoch.ncsc.mil>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Include fixes for 2.6.14-git11. Should allow to remove sched.h from
module.h on i386, x86_64, arm, ia64, ppc, ppc64, and s390. Probably more
to come since I haven't yet checked the other archs.
Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
We should use the i2c_driver.driver's .name and .owner fields
instead of the i2c_driver's ones.
This patch updates the drivers/media/video and usb/media drivers.
Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Unify the EVENT_CARD_INSERTION and "attach" callbacks to one unified
probe() callback. As all in-kernel drivers are changed to this new
callback, there will be no temporary backwards-compatibility. Inside a
probe() function, each driver _must_ set struct pcmcia_device
*p_dev->instance and instance->handle correctly.
With these patches, the basic driver interface for 16-bit PCMCIA drivers
now has the classic four callbacks known also from other buses:
int (*probe) (struct pcmcia_device *dev);
void (*remove) (struct pcmcia_device *dev);
int (*suspend) (struct pcmcia_device *dev);
int (*resume) (struct pcmcia_device *dev);
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
The linked list of devices managed by each PCMCIA driver is, in very most
cases, unused. Therefore, remove it from many drivers.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Unify the "detach" and REMOVAL_EVENT handlers to one "remove" function.
Old functionality is preserved, for the moment.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Move the suspend and resume methods out of the event handler, and into
special functions. Also use these functions for pre- and post-reset, as
almost all drivers already do, and the remaining ones can easily be
converted.
Bugfix to include/pcmcia/ds.c
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Leave the overloaded "hotplug" word to susbsystems which are handling
real devices. The driver core does not "plug" anything, it just exports
the state to userspace and generates events.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Prevents a compiler warning and uses down_interruptible() instead of down() in
process context.
Signed-off-by: Sam Bishop <sam@bishop.dhs.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>