Andrew McKay wrote:
Pete Zaitcev wrote:
On Wed, 13 Feb 2008 13:31:54 -0600, Andrew McKay <[EMAIL PROTECTED]> wrote:
spin_lock_bh(&port->lock);
if (port->write_urb_busy) {
If you lock against callbacks and do not trigger tasklets yourself,
you must use spin_lock_irqsave (or spin_lock_irq if you are belong
to Oliver's denomination).
Hmm okay, I'll look into this.
I looked into why I used a spin_lock_bh. The cp2103 driver that I use doesn't
implement a write function, it just uses the usb_serial_generic_write function
in drivers/usb/serial/generic.c. I copied the method of locking from that code
because the control urb I'm sending uses the same write_urb struture as
usb_serial_generic_write. The kernel that I'm using is older (2.6.20.4). Looks
like this was a bug fix somewhere between 2.6.20.4 and the latest stable release.
I'll have to patch up the generic serial driver it looks like.
Andrew
-
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html