On Wed, 8 Sep 2004, Jan Capek wrote: > I also checked, how the read URB's are resubmitted, the logic in the > driver is correct. The upper layer (usb-serial.c) calls ftdi_close, only > when the port->open_count <= 0. The function ftdi_process_read(), that is > issued by the completion handler (ftdi_read_bulk_callback()), tries to > resubmit the URB iff the port hasn't been closed yet(see code snippet > below). I could think of, a race condition on an SMP system, where 1 > thread has just finished the comparison (port->open_count > 0) and the > other thread would try killing the URB at the same time - last process > closed the device. Do we want the error be displayed??
That race condition is exactly what I was talking about. Since it's bound to be pretty rare, there's probably no harm in displaying the error message. But it also wouldn't hurt to check for result != -EPERM. It's your choice. Alan Stern ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
