David Brownell [Thu, 28 Mar 2002 03:19:27 +0000 (19:19 -0800)]
USB hcd driver updates
- Nitpickey bugfix to root hub config descriptors ... can't use
the same one for high and full speed, since the encoding
is different (255 ms FS == 0xff, 256 ms HS == 0x12).
- Related, force period to 1/4 second rather than doing
any sanity checking for the roothub timer (from Georg)
- Don't "giveback" urbs on submit path errors (from Georg)
... means they don't get completion callbacks
- Additional error checks on URB data (from Georg)
- Uses <linux/completion.h> for unlink synchronization
- The "already unlinking" error case is reported like other
unlinking errors (not as success)
- Ripped out urb->next handling ... it wasn't compatible
with the ISO loop model, and at this point I believe it
should be completely replaced with queuing urbs inside
of the HCDs. (Every HCD handles it for ISO, UHCI needs
a magic flag to enable it for bulk ...)
Module count of a serial converter driver is currently not
decremented if a disconnect happens while the tty is held open.
The fix is to close the device in usb_serial_disconnect() so that
module refcounts are properly updated.
- make serial console only selectable if the code is not a module.
- removed lots of CONFIG_EXPERMENTAL dependancies as the drivers have been stable for some time now.
David Brownell [Wed, 27 Mar 2002 07:23:48 +0000 (23:23 -0800)]
USB core sanity check
Periodically folk have run into problems where usb-ohci oopses
due to device refcount bugs ...
This is a minor patch to move the sanity check out of usb-ohci
into the generic bits of usbcore. There are comments that
suggest a path for a more comprehensive approach too.
Applies cleanly against 2.5.7 and I've been testing with it
for a while. I can't think of any reason it shouldn't also go
into 2.4, beyond the patch not applying cleanly there ... :)
David Brownell [Wed, 27 Mar 2002 07:21:25 +0000 (23:21 -0800)]
USB ohci-hcd driver update
- bugfix: control endpoints can't stall
- bugfix: remove bogus intr unlink optimization,
by sharing intr/iso code
- bugfix: iso submit uses urb->interval
- removed iso urb->next ring logic
(belongs in hcd layer if anywhere)
- simplify/shorten/correct completion handling
- in debug, labels setup packets as such
- bring CVS ids back up to date
Johannes Erdfelt [Wed, 27 Mar 2002 07:15:38 +0000 (23:15 -0800)]
[PATCH] USB uhci bugfix
The issue was that the poisoning would posing the data *before* it gave
it to us as well, but I didn't clear out a pointer (qh->urbp) and later
dereferenced it.
Thanks for the report again and for the pci_pool patch so I could
troubleshoot it.
David Brownell [Tue, 26 Mar 2002 04:54:35 +0000 (20:54 -0800)]
USB ohci-hcd update
It updates the "ohci-hcd" driver to address two issues, one
of which could potentially have caused oopses. First, it takes
out calls to usb_dec_dev_use() on the submit error path; that's
already done elsewhere. (Noted by Georg Acher.) Second,
it removes some pointless diagnostics. One is for schedule
overrun interrupts, the other is for accessing the frame counter.
- Moved all manipulation of port->open_count into the core. Now the
individual driver's open and close functions are called only when the
first open() and last close() is called. Making the drivers a bit
smaller and simpler.
- Fixed a bug if a driver didn't have the owner field set.
David Brownell [Tue, 19 Mar 2002 05:16:19 +0000 (21:16 -0800)]
USB usbfs periodic endpoint/bandwidth reporting
This is an updated version of a patch I sent around a
while back. It's against 2.5.7-pre1 (so presumably is
fine on 2.5.7), and addresses feedback against that
earlier patch.
It's bugfixes, mostly for highspeed support, to what
/proc/bus/usb/devices shows:
- Shows isochronous periods correctly (logarithmic
encoding, possibly 1/2/4 microframes if highspeed)
- Likewise for high-speed interrupt periods (similar)
- Makes high bandwidth endpoints look like they
just do bigger packets (up to 3 KBytes/uframe)
- Shows highspeed bandwidth correctlly (80% reserved,
vs 90% reserved for full/low speed).
Don't submit urbs while holding spinlocks. Not strictly required in
2.5.x, but it's always better to do less while holding a spinlock.
Also a good idea to keep 2.{4,5}.x drivers in sync.
Johannes Erdfelt [Mon, 18 Mar 2002 15:46:45 +0000 (07:46 -0800)]
[PATCH] uhci.c 2.4.19-pre3 kmem_cache_alloc flags
My previous patch which cleaned up some of the spinlocks, moved one of
the spinlocks around a call to kmem_cache_alloc. It would sometimes
erroneously call it with GFP_KERNEL.
This patch fixes the problem by always calling it with GFP_ATOMIC.
Thanks to Greg for pointing this out to me.
David Brownell [Mon, 18 Mar 2002 15:44:21 +0000 (07:44 -0800)]
This updates linux/Documentation/usb/proc_usb_info.txt to:
- refer to "usbfs"
- describe the /proc/bus/usb/BBB/DDD files
- more info about the .../drivers and .../devices
- ... generally, gives more information.
This is ever so slightly forward looking in how it describes
bandwidth requirements for high speed periodic transfers,
it's expecting a bugfix patch that's in my queue. (That info
is currently broken/meaningless.)
David Brownell [Mon, 18 Mar 2002 08:39:31 +0000 (00:39 -0800)]
USB echi and Intel ICH
This updates the Philips tweak so that it also applies
to late-model ICH chips from Intel. (Or so I'm told ... :)
That's at least three EHCI implementations known to
behave on Linux. (And one hopes VIA soon too...)
It also cleans up a few comments relating to 64bit DMA;
recent API spec updates make it look like no games are
needed with the PCI DMA mask -- it doesn't change the
segment used by pci_pool allocations, so it just needs
to get turned on if the overall system does 64bit DMA.
I've a query in to see if those Philips/Intel tweaks are
chip quirks, or just something the EHCI 1.0 spec isn't
at all clear about.
David Brownell [Mon, 18 Mar 2002 08:26:55 +0000 (00:26 -0800)]
USB mem flags nonpoisonous
This patch completely punts on passing SLAB_POISON, I've
gotten burnt by it once too many. Seems like the slab code
changed somewhere. I've got a separate patch to make the
pci_pool code use CONFIG_DEBUG_SLAB, which I'll send
around.
Meanwhile, I needed this to get at least EHCI to intialize on
a 2.5.7-pre1 system. Please merge.
David Brownell [Mon, 18 Mar 2002 08:24:43 +0000 (00:24 -0800)]
USB hcd.c, non-HS periodic transfers
This patch adds a missing "break", which prevented low and full
speed periodic transfers from getting through the "hcd" framework
to the driver (OHCI, for now). Sigh... :)
Martin Dalecki [Mon, 18 Mar 2002 02:57:21 +0000 (18:57 -0800)]
[PATCH] 2.5.7-pre2 IDE 22a
- Apply more patches from Vojtech Pavlik for the handling of host chip setup.
Hopefully they are settled now.
- Kill unused CONFIG_BLK_DEV_MODES
- Push register addressing down in to task_vlb_sync.
- Make the taskfile parsing stuff actually readable. This is compressing the
code by an incredible amount. We use just one function doing the whole
scanning right now. This should make sure that the IRQ handler used by a
particular command is always right. I didn't introduce typos hopefully
here.
- Don't call ide_handler_parser as argument for do_taskfile() any longer. We
have killed this function by coalescing it's functionality with
ide_cmd_type_parser() anyway.
- Kill unused SLC90E66 code, which Vojtech apparently missed in his patch.
- sync up with 2.5.7-pre2
Once again the actual patch is rather big mostly due to the removal of
some default configuration variables which are not used anylonger. So time for
the next patch stage.
David Brownell [Mon, 18 Mar 2002 02:37:33 +0000 (18:37 -0800)]
[PATCH] PATCH -- pci_pool and CONFIG_DEBUG_SLAB
I got burnt one too many time by mismatches between
the pci_pool and "real" slabs... something changed in
mm/slab.c and broke a driver, so I'm going for the real
fix this time. Having poisoning that _works_ is a huge
help in the innards of the USB host controller drivers.
This patch gets rid of some #ifdefs and makes the pci_pool
code poison memory if CONFIG_DEBUG_SLAB is set.
The functionality has always been there, but this makes
it simpler to get at.
Several functions in the serial drivers can be called from bottom
half or interrupt context. They must use the GFP_ATOMIC flag for
calls to kmalloc() and usb_submit_urb().
Functions which must use GFP_ATOMIC:
1. All *_callback() functions.
2. Any code which is inside a spinlock.
3. write(), throttle(), unthrottle(), which may be called by
the line discipline in bottom half context.
Functions which can use GFP_KERNEL:
1. open(), close(), startup(), shutdown(), set_termios().
Simon Evans [Sun, 17 Mar 2002 02:29:11 +0000 (18:29 -0800)]
USB catc driver
Here is a patch to add support for F5U011 to catc.c driver. The
patch has been compile tested against 2.5.6 and 2.5.7pre1
(and tested against 2.5.5-dj1) and should apply cleanly.
Paul Stewart [Sun, 17 Mar 2002 02:14:24 +0000 (18:14 -0800)]
USB Urefs for hid-core/hiddev
I've written a patch Vojtech and I discussed for enhancing the
hiddev code to optionally provide more detailed output on read().
The old functionality is still supported by default, and in
situations where HID usage codes are unique across reports, the
old method is still preferable due to its terseness.
The new method provides the ability to determine exactly which
value has changed, in cases where the HID usage codes are not
unique. It also provides a means to optionally receive notification
when input reports are received from the device, whether or not
any of the values in the report have changed.
The details of the changes are as follows:
- All current code behaves identically
- A new ioctl pair HIDIOCGFLAG/HIDIOCSFLAG gets and clears
flags on the hiddev device.
- If you set the flag HIDDEV_FLAG_UREF, the read() call switches
from reading hiddev_event structures to hiddev_usage_ref
structures. The change takes effect immediately, even to
already queued events that haven't been read() yet. Here's
an example of enabling FLAG_UREF:
{
int flag = HIDDEV_FLAG_UREF;
if (ioctl(fd, HIDIOCSFLAG, &flag) != 0) {
perror("ioctl");
exit(1);
}
}
- With the HIDDEV_FLAG_REPORT set (which is only allowed if
HIDDEV_FLAG_UREF is also set), there is a special uref that
will be read() in addition to the ones corresponding to
changes in the device state: when uref.field_index is set to
HID_FIELD_INDEX_NONE, this uref is a notification that the
report referred to by report_type and report_id has been
received from the device. This can be useful in situations
when the notification of the arrival of a report is useful
even if there is no change in state.
David Paschal [Sun, 17 Mar 2002 02:07:21 +0000 (18:07 -0800)]
USB printer update
- bind to 7/1/2 alternate setting by default, to fix printing with HP
LaserJet 1200 and 2200
- ioctls needed by the GPL user-mode IEEE 1284.4 driver which is part of
the HP OfficeJet Linux driver (http://hpoj.sourceforge.net):
- dynamic switching between 7/1/[123] alternate settings
- sending HP vendor-specific channel-change-request to support
memory card readers on HP PhotoSmart printers
- inquire more information about the peripheral, including
/proc/bus/usb/xx/yy linkage to get even more information
- fix apparent array overflow (by 1 entry) in usblp_probe when more than
the maximum number of USB printers are connected
- for the 2.2 version, added MODULE_{INC,DEC}_USE_COUNT to prevent rmmoding
of printer.o (and subsequent OOPSes) while a USB printer device is open
- cleaned up the code in a few places by consolidating duplicated code
Linus Torvalds [Sat, 16 Mar 2002 07:58:39 +0000 (23:58 -0800)]
Fix up ACPI so that it seems to work in the new world order:
make driverfs initialize early, so that ACPI can come alive
in a world where you can register devices.
The appended patch brings the fixes applied in 2.4 to shmem.c to 2.5.
In Detail:
- Add needed checks for shmem_file_write and shmem_symlink
- Add Documentation/filesystems/tmpfs.txt and adjust Config.help
- Add uid and gid mount options
- Make the error messages more user friendly
Andy Grover [Fri, 15 Mar 2002 07:28:59 +0000 (23:28 -0800)]
[PATCH] ACPI patch 9/9
If you could only review one of the 9 patches, this would be the one.
- removes acpitable.c vestiges
- adds ACPI IRQ routing support to PCI (disableable via pci=noacpi option)
- adds code to get a <1MB page for sleep, and ACPI boot to setup.c
- allocates another page in the fixmap for ACPI
- changes driverfs a little to work better with ACPI.
Andy Grover [Fri, 15 Mar 2002 07:28:46 +0000 (23:28 -0800)]
[PATCH] ACPI patch 6/9
This removes the old OSPM code. It lived under drivers/acpi/ospm/*, but
the new code just lives in drivers/acpi, and removes some unnecessary
abstraction that this old code had.
Andy Grover [Fri, 15 Mar 2002 07:28:27 +0000 (23:28 -0800)]
[PATCH] ACPI patch 3/9
This patch updates the acpi IA32 arch-specific files. Part of this is
taking what was acpitable.c and implementing it with better integration
with the rest of the ACPI code.
Andy Grover [Fri, 15 Mar 2002 07:28:19 +0000 (23:28 -0800)]
[PATCH] ACPI patch 1/9
This is the first of 9 patches. We did a complete rewrite of the
Linux-specific code, so we wait for things to stabilize before submitting.
There will be more updates, but *much* smaller.