FreeBSD/src 79fab7d (r336590)sys/cam cam_periph.c

Stop further SCSI recovery attempts after one has failed.

We've got a set of probably damaged hard disks, reporting 0x04,0x02
("Logical unit not ready, initializing command required") in response
to READ CAPACITY(16), where attempts to use START STOP UNIT for recovery
results in 0x44,0x00 ("Internal target failure") after ~1 second delay.
As result of all recovery retries, device open attempt took ~3 seconds
before finally reporting to GEOM that device is opened, but has no media.
If the open was for writing and since it hasn't formally failed, following
close triggered GEOM retaste, opening device few more times with respective
delays.

This change reduces whole time of this cycle from ~12 seconds to ~3 by
giving up on recovery after the first failure.

Reviewed by:    ken
MFC after:      2 weeks
Sponsored by:   iXsystems, Inc.
DeltaFile
+13-5sys/cam/cam_periph.c
+13-51 files

UnifiedSplitRaw