Add comment about how the deferred callback for AC_FOUND_DEVICE we
generate for a race where a device goes away, we start to tear down the periph state for the device, and then the device suddently reappears. The key that makes it work is removal of periph from the drv list before calling the deferred callback. Hat tip to: mav@
This commit is contained in:
parent
61f03e3536
commit
4c48a26a9e
@ -729,7 +729,9 @@ camperiphfree(struct cam_periph *periph)
|
||||
periph->periph_dtor(periph);
|
||||
|
||||
/*
|
||||
* The peripheral list is protected by the topology lock.
|
||||
* The peripheral list is protected by the topology lock. We have to
|
||||
* remove the periph from the drv list before we call deferred_ac. The
|
||||
* AC_FOUND_DEVICE callback won't create a new periph if it's still there.
|
||||
*/
|
||||
xpt_lock_buses();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user