>It seems that scsi_done does its own locking, so we could do without.

It seems that the code doesn't need it indeed, but the documentation of
the new EH API also state it should be called with the lock held, and
I prefer keeping drivers on the safe sade in case the midlayer gets
changed.

>> If you are ok, I'll send to Marcelo and will make the same one for 2.5
>> (io_request_lock ->host->lock, detect() no longer called with lock held,
>> but the rest should be identical).
>
>Are you sure that detect is called with the lock held ?

Yes, look at drivers/scsi/scsi.c, the lock is held when use_new_eh_code is
set, which is our case. Note that this is 2.4 only, I think 2.5 won't call
detect with the lock held, which makes more sense. Several drivers are
probably made unsafe by this detect() lock, I recently spotted a problem
that could happen with aic7xxx for example, Justin should have fixed it by
now.

>reset() definitely is called without. The error handler takes care for it to
>be in task context, so it can block.

No. All host callbacks with use_new_eh_code are called with the lock held,
this includes the host reset, device reset and bus reset, the abort, the
queuecommand, ...

Ben.



----------------------------------------------------------------------------
                   Bringing you mounds of caffeinated joy
                      >>>     http://thinkgeek.com/sf    <<<

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to