On Fri, 9 Sep 2005, James Bottomley wrote: > So which way do you want to go? Either we wait in recovery for the > error handler to finish and transition the host state to RUNNING or we > introduce the parallel states for the error handler. For usb-storage it won't make any difference on the whole, as far as I can see. The important thing is that scsi_remove_host needs to synchronize somehow with the error handler. Waiting for the host state to go back to RUNNING would be valid. Introducing the parallel states would mean waiting for the host to go from CANCEL_RECOVERY to CANCEL, right? Either way should work. Would there be more of a difference for drivers that allow non-forced removal? And without the parallel states, would you worry about the possibility of starving scsi_remove_host (every time it tries to go from RUNNING to CANCEL, the error handler gets there first and changes the state to RECOVERY)? In the absence of other considerations, my vote goes for adding the least amount of additional code. Alan Stern - : send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html