Patrick Mochel [Fri, 26 Mar 2004 03:25:25 +0000 (19:25 -0800)]
[PATCH] USB: Fix drivers/usb/net/Kconfig
This allows the pegasus driver to actually be seen as a config option.
Apparently it's not that popular, though I have confirmed that it still
works on at least the netgear fv101.
Alan Stern [Thu, 25 Mar 2004 09:18:01 +0000 (01:18 -0800)]
[PATCH] USB: UHCI: Get rid of excessive spinlocks
This patch introduces a major simplification into the UHCI driver by
replacing its multiple spinlocks with a single one. The protected area of
code is slightly larger and there's more possibilities for contention on
an SMP system, but I think that shouldn't be a problem. Stephen Hemminger
has been kind enough to test this on his SMP computer and he hasn't
encountered any difficulties.
Alan Stern [Thu, 25 Mar 2004 09:17:18 +0000 (01:17 -0800)]
[PATCH] USB: UHCI: Improved handling of short control transfers
This patch simplies the way the UHCI driver handles short control
transfers. When a transfer is short the HC will stop handling that
endpoint, and it's necessary to get it going again so that the status
stage of the control transfer can take place. Currently the driver does
this by allocating a new QH for the transfer and setting its element
pointer to point at the final status TD. The old QH is recycled. But
it's not necessary to go to all that trouble; the element pointer in the
original QH can be updated directly.
Normally the element pointer is supposed to be owned by the HC, and it's
not safe to just change its value since the HC may overwrite it at any
time. But when a transfer is stopped because of a short packet, the
current TD is marked inactive and the HC will not update the element
pointer. To write an unchanged pointer value back to memory would be a
waste of PCI bus cycles. Now the UHCI spec doesn't say explicitly that an
HC _can't_ do this, but I've tested both Intel and VIA hardware and
neither of them does.
As a side effect of this change, some of the code for removing QHs can be
eliminated.
Alan Stern [Thu, 25 Mar 2004 09:16:33 +0000 (01:16 -0800)]
[PATCH] USB: UHCI: Do short packet detection correctly
This patch makes some simple changes to the way the UHCI driver does short
packet detection. The current implementation is incorrect in several
ways:
The Short-Packet-Detect flag is set for OUT transfers, which
yields undefined behavior according to the UHCI spec.
It's not set for URBs with URB_SHORT_NOT_OK, which is just the
opposite of what we want! Those are the ones where short packets
do matter.
It is set for the last packet in a transfer, which causes an
unnecessary pause in the data flow (except of course that the
pause _is_ necessary when URB_SHORT_NOT_OK is set).
The patch also implements the URB_NO_INTERRUPT flag for bulk transfers,
which can help improve system performance by reducing interrupt overhead.
Alan Stern [Thu, 25 Mar 2004 09:06:47 +0000 (01:06 -0800)]
[PATCH] USB: Don't trust raw descriptor length in devioc.
This is a very minor point, unlikely ever to come up. But just in case...
It's conceivable that a device might transmit different values for a
configuration descriptor's wTotalLength the first time we ask for it (in
order to get the length) and the second time (to get the entire
descriptor). Should that improbable event occur, the rawdescriptor buffer
could be allocated using a size that's smaller than the length recorded in
the rawdescriptor itself. This patch protects devio.c against such a
problem.
If you feel this sequence of events is too unlikely to worry about, then
don't bother to apply the patch.
Oliver Neukum [Thu, 25 Mar 2004 08:53:25 +0000 (00:53 -0800)]
[PATCH] USB: race condition in open of w9968cf
there's a race in how open handles multiple openers.
You implement exclusive opening and wait for close
in case of further openers. However if there are more than one
waiter, only one of them must be allowed to proceed.
Alan Stern [Thu, 25 Mar 2004 08:52:38 +0000 (00:52 -0800)]
[PATCH] USB: Unusual_devs.h update
On Thu, 18 Mar 2004, Urban Borstnik wrote:
> The 2.6.4 and 2.6.3 (and possibly some earlier) kernels log the
> following message when I plug in a Lexar CompactFlash Reader:
>
> usb-storage: This device (05dc,b002,0113 S 06 P 50) has unneeded
> SubClass and Protocol entries in unusual_devs.h
> Please send a copy of this message to <linux-usb-devel@lists.sourceforge.net>
>
> Otherwise it has been working very well with the devepment kernels on at
> least 4 machines ever since a trivial fix was introduced for this device
> to unusual_devs.c over a year ago.
>
> Best regards,
> Urban.
Thank you for sending this in. An update will appear soon.
Torrey Hoffman [Thu, 25 Mar 2004 08:41:16 +0000 (00:41 -0800)]
[PATCH] USB: fix race in ati_remote and small cleanup
On Thu, 2004-03-18 at 07:44, Oliver Neukum wrote:
> Hi,
>
> you must use set_current_state() only after usb_submit_urb() with GFP_KERNEL
> as second argument, because it may sleep to allocate memory and is woken up
> resetting the state to TASK_RUNNING. In that case you had a busy polling loop.
> Furthermore, always use wake_up unconditionally. It checkes anyway.
Thanks for reviewing this code, I'm new to Linux driver development and
more eyes on my work is a good thing. I've actually been working on
some more cleanups to the driver to fix the race between open and
disconnect, and was just about to send it in...
So, the attached patch against 2.6.5-rc1-mm1 includes a mutex to lock
the open/disconnect paths, modelled after the usb-skeleton driver. It
includes Oliver Neukum's fixes and other cleanups as well.
Alan Stern [Thu, 25 Mar 2004 08:15:24 +0000 (00:15 -0800)]
[PATCH] USB: Regularize unusual_devs entries for Genesys Logic
I saw that you just added another unusual_devs.h entry submitted by
Henning Schild, for vendor ID 0x05e3. It turns out this is our old friend
Genesys Logic.
A recent message from Brad Campbell included a Windows driver file by
Genesys, and it included these lines:
USB\VID_05E3&PID_0700.DeviceDesc="USB Card Reader"
USB\VID_05E3&PID_0701.DeviceDesc="USB Optical Device"
USB\VID_05E3&PID_0702.DeviceDesc="USB Mass Storage Device"
Based on this information, we can clean up the 0x05e3 entries in
unusual_devs.h. This patch puts all three entries into a regularized
form.
Alan Stern [Thu, 25 Mar 2004 08:14:29 +0000 (00:14 -0800)]
[PATCH] USB: Unusual_devs update
On Tue, 16 Mar 2004, John Katzmaier wrote:
> Hi,
>
> Just wanted to let you know that when using my Panasonic PV-SD4090 digital
> camera with kernel 2.6.3, I found this entry in my logs:
>
> Mar 16 21:43:27 rocket kernel: usb-storage: Vendor: Panasonic
> Mar 16 21:43:27 rocket kernel: usb-storage: Product: LS-120 Camera
> Mar 16 21:43:27 rocket kernel: usb-storage: This device (04da,0901,0109 S 00 P
> 00) has an unneeded Protocol entry in unusual_devs.h
> Mar 16 21:43:27 rocket kernel: Please send a copy of this message to
> <linux-usb-devel@lists.sourceforge.net>
>
> I thought it might be best to follow its instructions and so I did.
>
> Thanks.
>
> -John Katzmaier
Thank you for sending this in. An update will appear in a forthcoming
kernel.
Some boot-time messages were obnoxiously long because
they used "old-style" diagnostics.
OSDL bugid 481
Get rid of most remaining "old style" diagnostics from usbcore.
Most messages use driver model style diagnostics. Messages that
don't have an associated device use the standard kernel printk
wrappers and label themselves as from "usbcore". (Except that
there's no such wrapper for KERN_ERR.)
This doesn't touch usbfs, "config.c" (Alan's patches do this), or
usb_reset_device() (needs a more substantial overhaul). Or any
other USB drivers (notably HID).
David Brownell [Thu, 25 Mar 2004 05:43:15 +0000 (21:43 -0800)]
[PATCH] USB: USB gadgets can autoconfigure endpoints
This adds some code that gadget drivers can call from
driver initialization, to simplify the "configure against
this hardware" step.
Add endpoint autoconfiguration for gadget drivers.
Endpoint selection is currently being done with conditional compilation.
That doesn't look nice, but more importantly it doesn't work well with
the model that some distributions won't be custom-matched to hardware.
Say, a PDA distro running on iPaq (pxa2xx_udc) or Axim (mq11xx_udc).
This code just makes it easier for drivers to match to hardware at
run-time. It's a convenience function for something they could have
been doing already, but weren't.
David Brownell [Thu, 25 Mar 2004 03:30:58 +0000 (19:30 -0800)]
[PATCH] USB: gadget zero does endpoint autoconfig
Here's where all those preceding autoconfig patches start
to fit together: one gadget driver gets rid of almost all
the controller-specific #ifdeffery.
Two of the other gadget drivers can do the same thing,
and just as easily: file storage, and serial. (I'll
hope their maintainers do those changes though.)
The "ether.c" gadget driver is a lot more complicated to
do this way since it has to cope with some differences
by switching to alternate protocols (CDC Ethernet vs
a subset) and soon be able to handle RNDIS. So that'll
be a while yet.
Gadget Zero learns to autoconfigure.
- Gets rid of remaining controller-specific #ifdeffery. Now
hardware choices can be made at run time too (not just
compile time).
- Simplifies its use of the "DEBUG" CPP symbol.
- Force device to report itself consistently as self-powered.
we (the german company Gude Analog und Digitalsysteme GmbH,
http://www.gude.info) have manufactored a USB<->RS232 adapter with
galvanic isolated RS232 Interface. Data is transmitted by optical
signals only.
The Product's name is "USB-RS232 OptoBridge".
We used the FTDI 233BM Chip with PID 0xE889 (VID 0x0403).
The Product will be released this Cebit 2004.
Could you please extend the ftdi_sio code with this PID.
You find a .diff file attached which I have tested with kernel 2.6.4
At http://ftdi-usb-sio.sourceforge.net/ I saw that you provide a patch
for 2.4.x kernels. Will our PID also find it's way in this back-ported
driver patch?
In the future (in the next 10 month), our company will have some more
Products using the FTDI Chip. The PID's FTDI already allocated for us
are: E888 to E88F and E808 to E80F
Andrew Morton [Thu, 25 Mar 2004 00:09:13 +0000 (16:09 -0800)]
[PATCH] don't show cdroms in /proc/partitions
From: Jens Axboe <axboe@suse.de>
Currently SCSI cdroms show up in /proc/partitions in 2.6, they didn't in
2.4. And ATAPI cdroms don't show up either. Mark both as genhd removable
for now, when they are partionable this can be updated.
Andrew Morton [Thu, 25 Mar 2004 00:08:43 +0000 (16:08 -0800)]
[PATCH] ext2&3: use the right i_flags in find_group_orlov()
Spotted by Jorn Engel <joern@wohnheim.fh-wedel.de>: both the generic and
fs-specific parts of the inode have an i_flags. find_group_orlov() is using
the wrong one.
Andrew Morton [Thu, 25 Mar 2004 00:08:17 +0000 (16:08 -0800)]
[PATCH] ppc64: SMT snooze fix in idle loop
From: Olof Johansson <olof@austin.ibm.com>
A smt_snooze_delay of 0 is supposed to mean "disabled", but current idle
loop logic doesn't take that into account and snoozes immediately instead.
Below patch fixes the logic in the idle loop, as well as cleans up the test
a bit. An idling processor might no longer see a snooze change
immediately, but that's not needed anyway.
Dave Kleikamp [Wed, 24 Mar 2004 08:17:44 +0000 (02:17 -0600)]
JFS: don't use global lock in lmLogSync when local lock is sufficient
I stupidly used the global jfs_log_sem to protect log->sb_list when
implementing the shared journal stuff. Since we already hold
LOG_LOCK, it makes more sense to use that to protect log->sb_list.
This caused horrible serialization when running on lots of jfs
volumes.
Dave Kleikamp [Wed, 24 Mar 2004 08:11:52 +0000 (02:11 -0600)]
JFS: Prevent hang in __lock_metapage
Remove the hold_metapage call from txLog to prevent a hang.
While investigating this one, I audited all functions that held
metapage locks and found several error paths that did not release
them correctly. These are fixed as well.
Dmitry Torokhov [Wed, 24 Mar 2004 05:55:48 +0000 (21:55 -0800)]
[NET_SCHED]: Fix class reporting in TBF qdisc.
The patch below fixes issue with 'tc class show dev <dev>' not showing any
classes when TBF qdisc is present in the chain. PLease consider for
inclusion.
Paul Mackerras [Tue, 23 Mar 2004 23:27:03 +0000 (15:27 -0800)]
[PATCH] fix ppc32 sys_swapcontext
This fixes a bug in the swapcontext system call on ppc32.
On ppc32, the system call entry only saves the volatile registers,
except in the case of a few system calls (e.g. fork) which need all the
registers saved. Swapcontext needs all the registers but we weren't
saving them all. So fixes that.
Paul Mackerras [Tue, 23 Mar 2004 23:26:51 +0000 (15:26 -0800)]
[PATCH] Threaded core dumps for PPC32
At the moment, ppc32 kernels will oops if a threaded program tries to
dump core. We call dump_fpu with a NULL regs pointer, which it tries
to dereference.
This fixes the issue by implementing the hooks used in doing threaded
core dumps properly.
In the long story of "BenH can't get a simple fix right the first time",
please add this one to pmac_zilog, and now people should enjoy really
working sleep again on pmac laptops ...
If the serial port was closed, we could use an uninitialized "pwr_delay"
and pass that to schedule_timeout().
Andrew Morton [Mon, 22 Mar 2004 23:25:38 +0000 (15:25 -0800)]
[PATCH] fbcon font cloning fix
From: Petr Baudis <pasky@ucw.cz>
This patch fixes a bug which I hit when migrating from 2.4. Basically,
when I do setfont during the system boot, the then-spawned ttys do not
retain the new font but fall back to the default one.
I've tracked that down to a clearly bogus test in fbcon_set_display(),
because vc->vc_font.width is not set at that time yet (no font has been
loaded for the new vc). But even if it would (or this was meant to test
against tmp->vc_font.width), it would mean only *HUGE* fonts would be
retained. And even if there were *two* bugs there and it was supposed to
be less-than there, I couldn't make a sense of the test.
Andrew Morton [Mon, 22 Mar 2004 23:25:24 +0000 (15:25 -0800)]
[PATCH] Work around compiler error in proc_misc.c
From: Alan Stern <stern@rowland.harvard.edu>
A change which was recently applied to fs/proc/proc_misc.c included a comment
about splitting a seq_printf into two pieces to work around a bug in
gcc-2.95.3. Unfortunately gcc-2.96 still chokes on the statements. The
patch below makes it work better and tidies the code up a bit.
Andrew Morton [Mon, 22 Mar 2004 23:24:24 +0000 (15:24 -0800)]
[PATCH] sh: sh-specific framebuffer updates
From: Paul Mundt <lethal@linux-sh.org>
This includes sh-specific framebuffer updates, including updates to hitfb and
pvr2fb, as well as adding sh to the pgprot_writecombine() users in fb_mmap().
Andrew Morton [Mon, 22 Mar 2004 23:24:11 +0000 (15:24 -0800)]
[PATCH] sh: hugetlb support
From: Paul Mundt <lethal@linux-sh.org>
This implements hugetlb support for SH-4. SH-4 supports 1k/4k/64k/1MB pages,
since we're only interested in the 64k/1MB sizes, this is what we support.
The sh hugetlbpage code borrows heavily off of the sparc64 port, which works
fine for these cases at this point in time.
Andrew Morton [Mon, 22 Mar 2004 23:23:22 +0000 (15:23 -0800)]
[PATCH] sh: port sh-sci driver to the new API
From: Paul Mundt <lethal@linux-sh.org>
This ports the sh-sci driver to the new API. sh and h8 both use this. The
intention is to leave the drivers/char sh-sci in place for a short period of
time until all the h8 people are on the new driver (sh no longer uses the
drivers/char version).
Andrew Morton [Mon, 22 Mar 2004 23:23:07 +0000 (15:23 -0800)]
[PATCH] sh: update defconfigs
From: Paul Mundt <lethal@linux-sh.org>
This patch updates the sh defconfigs to use the board_defconfig format
instead of the defconfig-board format that sh was using before. Since Sam
Ravnborg already added the automated archhelp stuff that sh was using to the
top-level Makefile, the sh version can be killed off.
Andrew Morton [Mon, 22 Mar 2004 23:22:11 +0000 (15:22 -0800)]
[PATCH] ppc64: iSeries virtual cd fix
From: Stephen Rothwell <sfr@canb.auug.org.au>
This patch stops an oops caused by certain ioctls being performed on the
virtual cdrom. In particular, the eject and tray close operations were
affected.
Andrew Morton [Mon, 22 Mar 2004 23:21:59 +0000 (15:21 -0800)]
[PATCH] ppc32: fix build with CONFIG_MODVERSIONS
From: Paul Mackerras <paulus@samba.org>
Olaf Hering <olh@suse.de>
This adds __kcrctab to the discard list for the link script for the boot
wrapper, and is needed if you compile with CONFIG_MODVERSIONS.
With this patch applied, we need to update makefile dependencies. Otherwise
the bootfiles will remain untouched because they do not depend on the changed
linker script.
Andrew Morton [Mon, 22 Mar 2004 09:55:33 +0000 (01:55 -0800)]
[PATCH] fix device open return values
The recent conversion of the open-of-a-nonexistent-blockdev return value from
ENXO to ENODEV was wrong. We should have converted the chardev code to
return -ENXIO too.