On Tue, 8 May 2007, Oliver Neukum wrote: > Am Dienstag, 8. Mai 2007 20:59 schrieb Alan Stern: > > > 2. I would prefer to have exclusion between open and reset, too. > > > > Why? I can understand wanting exclusion between read/write and reset. > > But there's no obvious reason to make open and reset exclusive. > > I don't think we'd want mutual exclusion in these cases. In fact read/write > should fail in case a device is being reset or has been reseted.
You probably can't prevent ongoing reads and writes from failing. But you can delay new reads/writes until the reset is finished, giving them a fighting chance of succeeding. > The > most likely cause is error handling, so we must assume the device is > malfounctioning. But coming into such a situation is bad, hence I'd like > to delay open(). Wouldn't delaying read/write end up giving the same result? Only better, since you wouldn't affect a process that already had a delay between its open and its real I/O? For that matter, consider a task that just opens the device file and then closes it without doing any I/O at all. (Yes, it's foolish, but it's possible.) Why delay such a task? Alan Stern ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel