This patch (as707) improves the FSBR operation in uhci-hcd by turning it
off more quickly when it isn't needed. FSBR puts a noticeable load on a
computer's PCI bus, so it should be disabled as soon as possible when it
isn't in use. The patch leaves it running for only 10 ms after the last
URB stops using it, on the theory that this should be long enough for a
driver to submit another URB if it wants keep FSBR going.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as706) removes the private hc_inaccessible flag from
uhci-hcd. It's not needed because it conveys exactly the same
information as the generic HCD_FLAG_HW_ACCESSIBLE bit.
In its place goes a new flag recording whether the controller is dead.
The new code allows a complete device reset to resurrect a dead
controller (although usbcore doesn't yet implement such a facility).
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as705) contains a small set of updates for uhci-hcd written
mostly by Dave Brownell:
* Root hub suspend messages come out labeled as root hub messages;
PCI messages should only come out when the pci device suspends.
* Rename the reset() method to better match its init() role
* Behave more like the other HCDs by returning -ESHUTDOWN for root-hub
suspend/resume errors.
* When an URB fails, associate the message with the usb device not
the host controller (it still hides endpoint and direction)
From: David Brownell <david-b@pacbell.net>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as704) adds an unusual_devs entry for the Nikon DSC D70s,
which uses a different Product ID from the D70. It also moves the entry
for the DSC E2000 up in the list, to preserve the numerical ordering.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This adds the Apple MacBook product IDs for the Fn translation
to the usbhid.
Signed-off-by: Rene Rebe <rene@exactcode.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Including ehci-au1xxx.c on a non-Au1200 Alchemy only to have it throw
an error is stupid.
From: Ralf Baechle <ralf@linux-mips.org>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
While an Edgeport is allocating individual port structures, if kmalloc
returns NULL, the serial structure is freed and -ENOMEM, but the ports
allocated before the failure are not freed. This patch addresses that
condition.
Signed-off-by: Christopher Lund <docmax@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch extends the "option" driver with a few more devices, some of
which are actually connected to USB the "right" way -- as opposed to
doing it via PCMCIA and OHCI.
Signed-Off-By: Matthias Urlichs <smurf@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
See http://bugzilla.kernel.org/show_bug.cgi?id=6617.
This function dereference a __user pointer.
Signed-off-by: Philippe Retornaz <couriousous@mandriva.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as703) improves the error handling when a Set-Configuration
request fails. The old interfaces are all unregistered before the
request is sent, and if the request fails then we don't know what config
the device is using. So it makes no sense to leave actconfig pointing
to the old configuration with its invalid interfaces.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as702) makes usbhid use the new usb_reset_composite_device
API. Now HID interfaces can coexist with other interfaces on the same
device, and a reset can safely be requested by any of the drivers.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as701) modifies usb-storage to take advantage of the new
usb_reset_composite_device() API. Now we will be able to safely request
port resets even if other drivers are bound to a mass-storage device.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as700) modifies the hub driver to take advantage of the new
usb_reset_composite_device API. The existing code had special-case
calls stuck into usb_reset_device, just before and after the reset.
With the new version there's no need for special-case stuff; it all
happens naturally in the form of pre_reset and post_reset notifications.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as699) adds usb_reset_composite_device(), a routine for
sending a USB port reset to a device with multiple interfaces owned by
different drivers. Drivers are notified about impending and completed
resets through two new methods in the usb_driver structure.
The patch modifieds the usbfs ioctl code to make it use the new routine
instead of usb_reset_device(). Follow-up patches will modify the hub,
usb-storage, and usbhid drivers so they can utilize this new API.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Earlier work splitting the "usbnet" driver out into a core plus driver
modules was missing a blacklist entry for the Olympus R-1000; it must
not use the CDC Ethernet driver, only the "zaurus" support works with
it.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
From: Eric Sesterhenn <snakebyte@gmx.de>
This fixes coverity Bug #390.
With the following code
ret = ep->branch = balance(isp116x, ep->period, ep->load);
if (ret < 0)
goto fail;
the problem is that ret and balance are of the type int, and ep->branch is u16.
so the int balance() returns gets reduced to u16 and then converted to an int again,
which removes the sign. Maybe the following little c program can explain it better:
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>
Remove some silly messages and cast in stone "temporary" messages which
we keep around. Also, I am hesitant to remove the initialization retries
without having the hardware to test (anyone who was at KS04 has a spare?)
Signed-off-by: Pete Zaitcev <zaitcev@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
<zaitcev> I am taling about this: "if (disk->flags & GENHD_FL_UP) del_gendisk(disk);"
<zaitcev> If del_gendisk() undoes add_disk() like viro just said, why is it conditional?
<viro> huh?
<viro> add_disk() sets the damn flag
<zaitcev> So, I should not need to check ever
<viro> so the above is "if I've called add_disk(), call gendisk()"
<viro> which might be what you want, of course
<viro> but usually you know if you'd done add_disk() on that puppy anyway
In ub, nobody upstream should ever see half-constructed disks before
they were passed to add_disk. To that end, only add the struct lun to
the list on the path of no return. With that fix in place, we do
not need to test GENHD_FL_UP.
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
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>
The swsusp.txt documentation harshes confusingly on USB, and this patch
addresses the issue. It's harsh because it blames USB for some issues
that are generic to all drivers -- especially those supporting removable
media -- and it's confusing since it says that USB has the issue with
"suspend" not just swsusp ... while in reality, USB doesn't have the
issue when real system suspend states are used.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Pavel Machek <pavel@ucw.cz>
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>