scsi_internal_device_block — try to transition to the SDEV_BLOCK state
int scsi_internal_device_block ( | struct scsi_device * sdev, |
bool wait) ; |
sdev
device to block
wait
Whether or not to wait until ongoing .queuecommand
/
.queue_rq
calls have finished.
Pause SCSI command processing on the specified device and wait until all
ongoing scsi_request_fn
/ scsi_queue_rq
calls have finished. May sleep.
Returns zero if successful or a negative error code upon failure.
This routine transitions the device to the SDEV_BLOCK state (which must be
a legal transition). When the device is in this state, command processing
is paused until the device leaves the SDEV_BLOCK state. See also
scsi_internal_device_unblock
.
avoid that scsi_send_eh_cmnd
calls queuecommand
after
scsi_internal_device_block
has blocked a SCSI device and also
remove the rport mutex lock and unlock calls from srp_queuecommand
.