HwScsiResetBus

I’m not sure my xen pv disk driver is completing the HwScsiResetBus
correctly. What I do is:

  1. Set the status to SRB_STATUS_BUS_RESET and complete all requests on
    the queue
  2. For requests already submitted to the backend, wait for completion
    and mark the request as SRB_STATUS_BUS_RESET and complete it

In this case due to heavy load there is a substantial delay between the
call to HwScsiResetBus and the last outstanding request being completed
with SRB_STATUS_BUS_RESET. Could that be a problem? I can’t remove
requests from the ‘hardware’ queue or indeed reset the hardware queue in
any way (not from DIRQL anyway) but I may be able to work something else
out where I complete them immediately in HwScsiResetBus and then just
throw them away when they come back from xen…

Thanks

James

In practice, always returning TRUE should work. In fact, I’ve never seen ResetBus called except in special cases such as hibernation.