Scroll to navigation

SCSI_TEST_UNIT_READY(9) SCSI mid layer SCSI_TEST_UNIT_READY(9)

NAME

scsi_test_unit_ready - test if unit is ready

SYNOPSIS

int scsi_test_unit_ready(struct scsi_device * sdev, int timeout, int retries, struct scsi_sense_hdr * sshdr);

ARGUMENTS

struct scsi_device * sdev

scsi device to change the state of.

int timeout

command timeout

int retries

number of retries before failing

struct scsi_sense_hdr * sshdr

outpout pointer for decoded sense information.

DESCRIPTION

Returns zero if unsuccessful or an error if TUR failed. For removable media, UNIT_ATTENTION sets ->changed flag.

AUTHORS

James Bottomley <James.Bottomley@hansenpartnership.com>

Author.

Rob Landley <rob@landley.net>

Author.

COPYRIGHT

June 2017 Kernel Hackers Manual 4.11