- 23 Apr, 2004 21 commits
-
-
Alan Stern authored
This patch makes a few minor improvements to the appearance of the UHCI driver. Please apply.
-
Alan Stern authored
Following a suggestion of David Brownell's I have decided to remove support for the URB_NO_INTERRUPT flag in the UHCI driver. The overall effect of the flag is to reduce the number of interrupts, thereby improving throughput somewhat while increasing the duration of the remaining IRQ handlers quite a lot (i.e., increasing interrupt variance). So I think we're better off without it. Mind you, this is all in the absence of any firm measurements. A common case where this will come up is during usb-storage bulk transfers. Such transfers are generally divided into scatter-gather components each corresponding to a single URB and transferring one memory page (4 KB). While generating an interrupt for each one is a little faster than ideal -- about every 3 ms -- it's better than waiting until 64 KB has been transferred and there are 1024 individual TDs to clean up during the IRQ.
-
Duncan Sands authored
The check of interface->dev.driver requires a lock to be taken to protect against driver binding changes. But in fact I think it is better just to drop the test. The result is that the caller is required to claim an interface before changing the altsetting, which is consistent with the other routines that operate on interfaces. devio.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
-
Duncan Sands authored
Hi Oliver, > I expect it to rarely matter, but it might matter now and then. It's > just a question of hygiene. If you are using a temporary buffer I'd > like to see it used to full advantage. So either drop the lock or do > a direct copy. I'd prefer the first option your patch implemented. I agree. Greg, please consider applying the updated patch: Protect against driver binding changes while reading the driver name.
-
Duncan Sands authored
The remaining three patches contain miscellaneous fixes to usbfs. This one fixes up the disconnect callback to only shoot down urbs on the disconnected interface, and not on all interfaces. It also adds a sanity check (this check is pointless because the interface could never have been claimed in the first place if it failed, but I feel better having it there). devio.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
-
Duncan Sands authored
The semaphore is now taken in the callers. devio.c | 2 -- 1 files changed, 2 deletions(-)
-
Duncan Sands authored
The semaphore is now taken in the caller. devio.c | 2 -- 1 files changed, 2 deletions(-)
-
Duncan Sands authored
The semaphore is now taken in the caller. devio.c | 2 -- 1 files changed, 2 deletions(-)
-
Duncan Sands authored
devio.c | 3 --- 1 files changed, 3 deletions(-)
-
Duncan Sands authored
devio.c | 43 +++++++++++++++++++++++-------------------- usbdevice_fs.h | 1 - 2 files changed, 23 insertions(+), 21 deletions(-)
-
Duncan Sands authored
Hi Greg, this is the first of a series of patches that replace the per-file semaphore ps->devsem with the per-device semaphore ps->dev->serialize. The role of devsem was to protect against device disconnection. This can be done equally well using ps->dev->serialize. On the other hand, ps->dev->serialize protects against configuration and other changes, and has already been introduced into usbfs in several places. Using just one semaphore simplifies the code and removes some remaining race conditions. It should also fix the oopses some people have been seeing. In this first patch, a reference is taken to the usb device as long as the usbfs file is open. That way we can use ps->dev->serialize for as long as ps exists. devio.c | 27 ++++++++++++++++----------- inode.c | 3 --- 2 files changed, 16 insertions(+), 14 deletions(-)
-
David Brownell authored
This goes on top of the other enumeration patch I just sent, to handle some dubious and/or broken hub configurations better. Make khubd handle some cases better: - Track power budget for bus-powered hubs. This version only warns when the budgets are exceeded. Eventually, the budgets should help prevent such errors. - Rejects illegal USB setup: two consecutive bus powered hubs would exceed the voltage drop budget, causing much flakiness. - For hosts with high speed hubs, warn when devices are hooked up to full speed hubs if they'd be faster on a high speed one. - For hubs that don't do power switching, don't try to use it - For hubs that aren't self-powered, don't report local power status
-
David Brownell authored
This is an update to some patches from the December/January timeframe, which will help sort out some of the mess for drivers that need to use the reset logic. It's one of the last significant patches in my gadget-2.6 tree that haven't yet been merged into the main kernel tree. More refactoring of the enumeration code paths: * The first half of usb_new_device() becomes the second half of a new hub_port_init() routine (resets, sets address, gets descriptor) * The middle chunk of hub_port_connect_change() becomes the first half of that new hub_port_init() routine. * Khubd uses that new routine in hub_port_connect_change(). * Now usb_new_device() cleans up better after faults, and has a more useful locking policy (caller owns dev->serialize). * Has related minor cleanups including commenting some of the curious request sequences coming from khubd. Refactoring means a lot of the current usb_reset_device() logic won't need to stay an imperfect clone of the enumeration code ... soon, it can just call hub_port_init(). Even without touching usb_reset_device(), this eliminates a deadlock. Previously, address0_sem was used both during probe and during reset, so probe routines can't implement DFU firmware download (involves a reset; DFU also uncovers other problems) or safely recover from probe faults by resetting (usb-storage can try that). Now that lock is no longer held during probe(); so those deadlocks are gone. (And some drivers, like at76c503, can start to remove ugly workarounds.)
-
David Brownell authored
Handle some SMP-visible unlink states better.
-
Greg Kroah-Hartman authored
-
Alan Stern authored
I'm not sure what this piece of code is doing in the UHCI driver. It looks like someone envisioned queuing several URBs for the same endpoint simultaneously. Anyway, the driver can't do that and this code can never run.
-
Alan Stern authored
This patch implements the endpoint_disable method for the UHCI driver, as you requested a while back. It guarantees that during unbinding events (disconnect, configuration change, rmmod) the UHCI driver will have finished using every URB for the interface being unbound. It doesn't quite guarantee that the completion handlers will have finished running, but it would take a pretty unlikely race to violate that assumption. (I think it's the same with the OHCI and EHCI drivers.) Despite the patch numbering this one applies _after_ as249, which is a more important bugfix.
-
Alan Stern authored
On Tue, 20 Apr 2004, Damian Ivereigh wrote: > Here is the output of dmesg when plugging in an IBM USB MemKey > > usb-storage: This device (0a16,8888,0100 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> Thank you for sending this in. Greg and Pete, here's the patch.
-
Alan Stern authored
It looks safe to conclude that the unusual_devs.h entries for the Minolta DiMAGE 7x cameras aren't needed. (Michael has tested the 7Hi and it's definitely unnecessary.) The two other DiMAGE entries probably aren't needed either, but we don't have any evidence of that so I'm leaving them.
-
David Brownell authored
The patch lets HCDs report the root hub remote wakeup feature to usbcore through config descriptors, and lets usbcore say whether or not remote wakeup (of host from sleep, by devices) should be enabled. Both OHCI and UHCI HCDs have some remote wakeup support already; I'm not too sure how well it works. Given (separate) patches, their root hubs can start to act more like other hubs in this area too. That'll make it easier to start using USB suspend mode.
-
David Brownell authored
In 2.6, ISO transfers on USB require a value for urb->interval ... which usbfs didn't provide (until this patch), or let user mode drivers specify. This patch initializes the urb->interval from the endpoint's descriptor, so ISO transfers should now work from userspace. It also fixes a related problem for interrupt transfers.
-
- 22 Apr, 2004 19 commits
-
-
http://lia64.bkbits.net/to-linus-2.5Linus Torvalds authored
into ppc970.osdl.org:/home/torvalds/v2.6/linux
-
Andrew Morton authored
If a filesystem's ->writepage implementation repeatedly refuses to write the page (it keeps on redirtying it instead) (reiserfs seems to do this) then the writeback logic can get stuck repeately trying to write the same page. Fix that up by correctly setting wbc->pages_skipped, to tell the writeback logic that things aren't working out.
-
David Mosberger authored
-
bk://kernel.bkbits.net/davem/net-2.6Linus Torvalds authored
into ppc970.osdl.org:/home/torvalds/v2.6/linux
-
bk://kernel.bkbits.net/gregkh/linux/driver-2.6Linus Torvalds authored
into ppc970.osdl.org:/home/torvalds/v2.6/linux
-
David S. Miller authored
into nuts.davemloft.net:/disk1/BK/net-2.6
-
Linda Xie authored
Since symlink.c uses "name" field of a kobj when it calculates the length, it gets a wrong value if the kobj's name has more than 20 charathers. A correct way to do that is to call kobject_name(kobj) instead of using kobj->name directly.
-
bk://kernel.bkbits.net/gregkh/linux/usb-2.6Linus Torvalds authored
into ppc970.osdl.org:/home/torvalds/v2.6/linux
-
Romain Liévin authored
this patch (2.4 & 2.6) fixes a bug about the timeout value. The formula used to calculate jiffies from timeout is wrong. The new formula is ok and takes care of integer computation/rounding. There is the same bug in the tiglusb.c module which will be fixed by another patch.
-
David Brownell authored
Handle some PL-2301/2302 devices better.
-
Jan Capek authored
I just checked out the latest 2.6.6-rc1-mm1 to see that the ID patch for ftdi has applied cleanly, but apparently someone was faster and in the combined ID table our ID's were missing. Most probably the patch program got confused and applied the hung at wrong spot.. Attached is a patch that places that 2 lines in the correct spot.
-
Romain Liévin authored
Hi, this patch (cumulative; 2.4 & 2.6) fixes another bug in the tiglusb driver. The formula used to calculate jiffies from timeout is wrong. The new formula is ok and takes care of integer computation/rounding. This is the same kind of bug than in the tipar char driver.
-
William Lee Irwin III authored
Warnings aren't terribly important in and of themselves, but there isn't really much the warning tells us to do here, so it would appear that caving in to the compiler is the thing to do for now.
-
David Brownell authored
Various build fixes: 64bit (Andrew Morton), static linking, broken on big-endian, etc. Tighten up the integration with the main "ether" driver, so state transitions and host ethernet addresses are shared too. Add missing spinlock calls around RNDIS command outcall, fix GET_INTERFACE issue, host mustn't clobber netdev flags. Minor code cleanups.
-
David Brownell authored
Cope better when PCI misbehaves badly and registers misbehave: - terminate some loops before they get to infinity * capability scan * port reset - after init failure, memory may already be cleaned up Some systems have been reporting such problems after ACPI resume.
-
Mikael Pettersson authored
This replaces current_thread_info()->cpu in i386' init_IRQ() by the equivalent smp_processor_id(). Reduces overhead on UP, and makes the code cleaner.
-
Mikael Pettersson authored
This simplifies the Pentium M quirk code in nmi.c, and eliminates an unnecessary apic_read(). Local APIC accesses are not zero-cycle; let's not inflict more damage than we must.
-
Andrew Morton authored
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> We need some alignement of those structs for proper operations especially with FP and Altivec, or SLAB_DEBUG can break us.
-
Andrew Morton authored
From: Stephen Rothwell <sfr@canb.auug.org.au> This patch just adds some proc entries for the virtual tape and cdrom drivers to allow mapping between linux devices and OS/400 ones. This is expected by existing users and there is no other way to do this translation.
-