Alan Stern [Tue, 6 Jun 2006 19:19:17 +0000 (15:19 -0400)]
[PATCH] usb-storage: unusual_devs entry for Nikon DSC D70s
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>
Chris Lund [Sat, 3 Jun 2006 20:58:19 +0000 (13:58 -0700)]
[PATCH] USB: free allocated memory on io_edgeport startup memory failure
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.
Alan Stern [Thu, 1 Jun 2006 17:59:16 +0000 (13:59 -0400)]
[PATCH] usbcore: recovery from Set-Configuration failure
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>
Alan Stern [Thu, 1 Jun 2006 17:55:28 +0000 (13:55 -0400)]
[PATCH] usbhid: use usb_reset_composite_device
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>
Alan Stern [Thu, 1 Jun 2006 17:52:56 +0000 (13:52 -0400)]
[PATCH] usb-storage: use usb_reset_composite_device
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>
Alan Stern [Thu, 1 Jun 2006 17:37:24 +0000 (13:37 -0400)]
[PATCH] USB hub: use usb_reset_composite_device
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>
Alan Stern [Thu, 1 Jun 2006 17:33:42 +0000 (13:33 -0400)]
[PATCH] usbcore: port reset for composite devices
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>
Eric Sesterhenn [Fri, 2 Jun 2006 03:48:45 +0000 (20:48 -0700)]
[PATCH] USB: negative index in drivers/usb/host/isp116x-hcd.c
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:
akpm@osdl.org [Fri, 26 May 2006 20:17:09 +0000 (13:17 -0700)]
[PATCH] Driver for Apple Cinema Display
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>
Ian Abbott [Tue, 30 May 2006 11:36:30 +0000 (12:36 +0100)]
[PATCH] USB: ftdi_sio: add support for Yost Engineering ServoCenter3.1
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>
Alan Stern [Tue, 30 May 2006 14:21:14 +0000 (10:21 -0400)]
[PATCH] usbhid: Remove unneeded blacklist entries
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.
Daniel Drake [Fri, 26 May 2006 20:36:28 +0000 (21:36 +0100)]
[PATCH] USB: print message when device is rejected due to insufficient power
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>
Pete Zaitcev [Fri, 26 May 2006 03:08:50 +0000 (20:08 -0700)]
[PATCH] ub: random cleanups
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>
Pete Zaitcev [Fri, 26 May 2006 03:04:54 +0000 (20:04 -0700)]
[PATCH] ub: atomic add_disk
<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>
Dan Streetman [Wed, 24 May 2006 16:39:16 +0000 (09:39 -0700)]
[PATCH] improved TT scheduling for EHCI
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>
Pete Zaitcev [Tue, 23 May 2006 05:02:32 +0000 (22:02 -0700)]
[PATCH] USB: Improve Kconfig comment for mct_u232
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>
Alan Stern [Mon, 22 May 2006 20:47:13 +0000 (16:47 -0400)]
[PATCH] usbtest: report errors in iso tests
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>
Vitja Makarov [Tue, 30 May 2006 20:40:06 +0000 (00:40 +0400)]
[PATCH] USB: new cp2101 device
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.
Franck Bui-Huu [Mon, 15 May 2006 17:23:53 +0000 (19:23 +0200)]
[PATCH] Fix a deadlock in usbtest
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.
Alan Stern [Fri, 19 May 2006 20:52:35 +0000 (16:52 -0400)]
[PATCH] UHCI: remove ISO TDs as they are used
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>
Alan Stern [Fri, 19 May 2006 20:44:55 +0000 (16:44 -0400)]
[PATCH] UHCI: store the period in the queue header
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>
Alan Stern [Fri, 19 May 2006 20:39:52 +0000 (16:39 -0400)]
[PATCH] UHCI: fix race in ISO dequeuing
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>
Alan Stern [Fri, 19 May 2006 20:34:57 +0000 (16:34 -0400)]
[PATCH] UHCI: use integer-sized frame numbers
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>
Micah Dowty [Fri, 19 May 2006 18:26:24 +0000 (11:26 -0700)]
[PATCH] USB: Allow high-bandwidth isochronous packets via usbfs
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.
Micah Dowty [Fri, 19 May 2006 18:20:11 +0000 (11:20 -0700)]
[PATCH] USB: Remove 4088-byte limit on usbfs control URBs
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.
David Brownell [Wed, 17 May 2006 00:33:14 +0000 (17:33 -0700)]
[PATCH] USB: correct the USB info in Documentation/power/swsusp.txt
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>
Alan Stern [Fri, 12 May 2006 15:41:59 +0000 (11:41 -0400)]
[PATCH] UHCI: Work around old Intel bug
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>
Alan Stern [Fri, 12 May 2006 15:35:45 +0000 (11:35 -0400)]
[PATCH] UHCI: Reimplement FSBR
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>
Alan Stern [Fri, 12 May 2006 15:29:04 +0000 (11:29 -0400)]
[PATCH] UHCI: Eliminate the TD-removal list
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>
Alan Stern [Fri, 12 May 2006 15:19:19 +0000 (11:19 -0400)]
[PATCH] UHCI: Remove non-iso TDs as they are used
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>
Alan Stern [Fri, 12 May 2006 15:14:25 +0000 (11:14 -0400)]
[PATCH] UHCI: Common result routine for Control/Bulk/Interrupt
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>
Alan Stern [Mon, 15 May 2006 18:49:04 +0000 (14:49 -0400)]
[PATCH] usbhid: automatically set HID_QUIRK_NOGET for keyboards and mice
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>
Bart Massey [Mon, 8 May 2006 21:40:13 +0000 (14:40 -0700)]
[PATCH] USB HID/HIDBP, INPUT DRIVERS: fix various usb/input/hid-input.c bugs that make Apple Mighty Mouse work poorly
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.
Alan Stern [Fri, 5 May 2006 20:32:02 +0000 (16:32 -0400)]
[PATCH] USB: UHCI: fix obscure bug in enqueue()
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>
Alan Stern [Fri, 5 May 2006 20:23:42 +0000 (16:23 -0400)]
[PATCH] USB: net2280: add a shutdown routine
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>
Daniel Drake [Mon, 8 May 2006 22:43:02 +0000 (23:43 +0100)]
[PATCH] USB shuttle_usbat: hardcode flash detection for now
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>
Peter Chubb [Tue, 2 May 2006 17:29:34 +0000 (18:29 +0100)]
[PATCH] USB: shuttle_usbat: Hardcode detection of HP CDRW devices
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>
Peter Chubb [Tue, 2 May 2006 17:30:12 +0000 (18:30 +0100)]
[PATCH] USB: shuttle_usbat: Fix handling of scatter-gather buffers
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>
Alan Stern [Thu, 27 Apr 2006 19:54:22 +0000 (15:54 -0400)]
[PATCH] USB: usbcore: always turn on hub port power
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>
Kumar Gala [Tue, 11 Apr 2006 15:07:16 +0000 (10:07 -0500)]
[PATCH] USB: allow multiple types of EHCI controllers to be built as modules
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>
Adrian Bunk [Sat, 15 Apr 2006 09:17:27 +0000 (11:17 +0200)]
[PATCH] USB: sisusbvga: possible cleanups
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>
Arjan van de Ven [Tue, 28 Mar 2006 09:00:21 +0000 (01:00 -0800)]
[PATCH] USB: convert the semaphores in the sisusb driver to mutexes
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>
Eduard Warkentin [Thu, 18 May 2006 08:13:17 +0000 (01:13 -0700)]
[PATCH] USB: added support for ASIX 88178 chipset USB Gigabit Ethernet adaptor
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>
David Brownell [Sat, 13 May 2006 02:24:34 +0000 (19:24 -0700)]
[PATCH] USB: usbnet, zaurus mtu fixup
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>
Oliver Neukum [Sat, 13 May 2006 20:50:47 +0000 (22:50 +0200)]
[PATCH] USB: cdc-acm: add a new special case for modems with buggy firmware
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>
Henk Vergonet [Mon, 15 May 2006 10:34:43 +0000 (12:34 +0200)]
[PATCH] USB: add YEALINK phones to the HID_QUIRK_IGNORE blacklist
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.
Paul Serice [Wed, 7 Jun 2006 17:23:38 +0000 (10:23 -0700)]
[PATCH] USB: EHCI works again on NVidia controllers with >2GB RAM
From: Paul Serice <paul@serice.net>
The workaround in commit f7201c3dcd7799f2aa3d6ec427b194225360ecee
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>
Rene Herman [Tue, 6 Jun 2006 21:54:02 +0000 (23:54 +0200)]
[PATCH] Driver model: add ISA bus
During the recent "isa drivers using platform devices" discussion it was
pointed out that (ALSA) ISA drivers ran into the problem of not having
the option to fail driver load (device registration rather) upon not
finding their hardware due to a probe() error not being passed up
through the driver model. In the course of that, I suggested a seperate
ISA bus might be best; Russell King agreed and suggested this bus could
use the .match() method for the actual device discovery.
The attached does this. For this old non (generically) discoverable ISA
hardware only the driver itself can do discovery so as a difference with
the platform_bus, this isa_bus also distributes match() up to the driver.
As another difference: these devices only exist in the driver model due
to the driver creating them because it might want to drive them, meaning
that all device creation has been made internal as well.
The usage model this provides is nice, and has been acked from the ALSA
side by Takashi Iwai and Jaroslav Kysela. The ALSA driver module_init's
now (for oldisa-only drivers) become:
static int __init alsa_card_foo_init(void)
{
return isa_register_driver(&snd_foo_isa_driver, SNDRV_CARDS);
}
Quite like the other bus models therefore. This removes a lot of
duplicated init code from the ALSA ISA drivers.
The passed in isa_driver struct is the regular driver struct embedding a
struct device_driver, the normal probe/remove/shutdown/suspend/resume
callbacks, and as indicated that .match callback.
The "SNDRV_CARDS" you see being passed in is a "unsigned int ndev"
parameter, indicating how many devices to create and call our methods with.
The platform_driver callbacks are called with a platform_device param;
the isa_driver callbacks are being called with a "struct device *dev,
unsigned int id" pair directly -- with the device creation completely
internal to the bus it's much cleaner to not leak isa_dev's by passing
them in at all. The id is the only thing we ever want other then the
struct device * anyways, and it makes for nicer code in the callbacks as
well.
With this additional .match() callback ISA drivers have all options. If
ALSA would want to keep the old non-load behaviour, it could stick all
of the old .probe in .match, which would only keep them registered after
everything was found to be present and accounted for. If it wanted the
behaviour of always loading as it inadvertently did for a bit after the
changeover to platform devices, it could just not provide a .match() and
do everything in .probe() as before.
If it, as Takashi Iwai already suggested earlier as a way of following
the model from saner buses more closely, wants to load when a later bind
could conceivably succeed, it could use .match() for the prerequisites
(such as checking the user wants the card enabled and that port/irq/dma
values have been passed in) and .probe() for everything else. This is
the nicest model.
To the code...
This exports only two functions; isa_{,un}register_driver().
isa_register_driver() register's the struct device_driver, and then
loops over the passed in ndev creating devices and registering them.
This causes the bus match method to be called for them, which is:
if (dev->platform_data == isa_driver) {
if (!isa_driver->match ||
isa_driver->match(dev, to_isa_dev(dev)->id))
return 1;
dev->platform_data = NULL;
}
return 0;
}
The first thing this does is check if this device is in fact one of this
driver's devices by seeing if the device's platform_data pointer is set
to this driver. Platform devices compare strings, but we don't need to
do that with everything being internal, so isa_register_driver() abuses
dev->platform_data as a isa_driver pointer which we can then check here.
I believe platform_data is available for this, but if rather not, moving
the isa_driver pointer to the private struct isa_dev is ofcourse fine as
well.
Then, if the the driver did not provide a .match, it matches. If it did,
the driver match() method is called to determine a match.
If it did _not_ match, dev->platform_data is reset to indicate this to
isa_register_driver which can then unregister the device again.
If during all this, there's any error, or no devices matched at all
everything is backed out again and the error, or -ENODEV, is returned.
isa_unregister_driver() just unregisters the matched devices and the
driver itself.
More global points/questions...
- I'm introducing include/linux/isa.h. It was available but is ofcourse
a somewhat generic name. Moving more isa stuff over to it in time is
ofcourse fine, so can I have it please? :)
- I'm using device_initcall() and added the isa.o (dependent on
CONFIG_ISA) after the base driver model things in the Makefile. Will
this do, or I really need to stick it in drivers/base/init.c, inside
#ifdef CONFIG_ISA? It's working fine.
Lastly -- I also looked, a bit, into integrating with PnP. "Old ISA"
could be another pnp_protocol, but this does not seem to be a good
match, largely due to the same reason platform_devices weren't -- the
devices do not have a life of their own outside the driver, meaning the
pnp_protocol {get,set}_resources callbacks would need to callback into
driver -- which again means you first need to _have_ that driver. Even
if there's clean way around that, you only end up inventing fake but
valid-form PnP IDs and generally catering to the PnP layer without any
practical advantages over this very simple isa_bus. The thing I also
suggested earlier about the user echoing values into /sys to set up the
hardware from userspace first is... well, cute, but a horrible idea from
a user standpoint.
Comments ofcourse appreciated. Hope it's okay. As said, the usage model
is nice at least.
Signed-off-by: Rene Herman <rene.herman@keyaccess.nl>
Alan Stern [Fri, 16 Jun 2006 21:10:48 +0000 (17:10 -0400)]
[PATCH] Driver Core: Make dev_info and friends print the bus name if there is no driver
This patch (as721) makes dev_info and related macros print the device's
bus name if the device doesn't have a driver, instead of printing just a
blank. If the device isn't on a bus either... well, then it does leave
a blank space. But it will be easier for someone else to change if they
want.
Cc: Matthew Wilcox <matthew@wil.cx> Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
[PATCH] Driver core: add proper symlinks for devices
We need to create the "compatible" symlinks that class_devices used to
create when they were in the class directories so that userspace does
not know anything changed at all.
Yeah, we have a lot of symlinks now, but we should be able to get rid of
them in a year or two... (wishful thinking...)
Kay Sievers [Thu, 15 Jun 2006 13:31:56 +0000 (15:31 +0200)]
[PATCH] Driver core: add generic "subsystem" link to all devices
Like the SUBSYTEM= key we find in the environment of the uevent, this
creates a generic "subsystem" link in sysfs for every device. Userspace
usually doesn't care at all if its a "class" or a "bus" device. This
provides an unified way to determine the subsytem of a device, regardless
of the way the driver core has created it.
Signed-off-by: Kay Sievers <kay.sievers@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
[PATCH] Driver core: allow struct device to have a dev_t
This is the first step in moving class_device to being replaced by
struct device. It allows struct device to export a dev_t and makes it
easy to dynamically create and destroy struct device as long as they are
associated with a specific class.
Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Michael Holzheu [Tue, 9 May 2006 10:53:49 +0000 (12:53 +0200)]
[PATCH] Driver Core: Add /sys/hypervisor when needed
To have a home for all hypervisors, this patch creates /sys/hypervisor.
A new config option SYS_HYPERVISOR is introduced, which should to be set
by architecture dependent hypervisors (e.g. s390 or Xen).
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Michael Holzheu <holzheu@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Russell King [Sat, 6 May 2006 07:15:26 +0000 (08:15 +0100)]
[PATCH] Driver Core: Fix platform_device_add to use device_add
platform_device_add() should be using device_add() rather
than device_register() - any platform device passed to
platform_device_add() should have already been initialised,
either by platform_device_alloc() or platform_device_register().
Signed-off-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
class_device_add needs to check the return value of all the setup it
does. It doesn't handle out of memory well. This is not complete, probably
more needs to be done.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Hansjoerg Lipp [Sat, 22 Apr 2006 16:43:00 +0000 (18:43 +0200)]
[PATCH] i4l gigaset: move sysfs entry to tty class device
Using the class device pointer returned by tty_register_device() with
part 1 of the patch, attach the Gigaset drivers' "cidmode" sysfs entry
to its tty class device, where it can be found more easily by users
who do not know nor care which USB port the device is attached to.
Hansjoerg Lipp [Sat, 22 Apr 2006 16:36:53 +0000 (18:36 +0200)]
[PATCH] TTY: return class device pointer from tty_register_device()
Let tty_register_device() return a pointer to the class device it creates.
This allows registrants to add their own sysfs files under the class
device node.