Re: USB 2.4.30: fix modem_run

From: Pete Zaitcev
Date: Fri Mar 04 2005 - 02:54:18 EST


On Fri, 11 Feb 2005 11:16:20 +0100 Duncan Sands <baldrick@xxxxxxx>
wrote:

> On Thu, 2005-02-10 at 16:11 -0800, Pete Zaitcev wrote:
> > I entered a patch which adds "exclusive_access" lock into 2.4.29,
> > to fix devices which cannot handle simultaneous accesses. This
> > caused a regression with European ADSL modems. An ioctl
> > USBDEVFS_REAPURB allows a process to enter the kernel and wait for
> > USB I/O to finish. Naturally, this should not take
> > exclusive_access, or nothing will ever finish.
>
> How does this compare with the locking in 2.6 kernels?

In 2.6, there is no locking whatsoever. Instead, rules for queueing are
relaxed for all HCs. If the device chokes when it receives a control
together with a data exchange (on a bulk endpoint, usually), kernel
does not interfere. Users (libusb & drivers) are supposed to know when
not to do it. Obviously, it's not the case of usb-storage. To help that,
descriptor strings are cached in latest Greg's trees, since a week ago
or so. This way at least "cat /proc/bus/usb/devices" won't interfere.

-- Pete
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/