summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2017-09-19 07:39:39 +0000
committeravg <avg@FreeBSD.org>2017-09-19 07:39:39 +0000
commit330c885e4bf434372e8bb3f79e0996ef921929c2 (patch)
treef33c6e1d09914137abd5311d9cd080905041f6c3
parentb98aafda7f92541697f354d55e9ba9abba75ee84 (diff)
downloadFreeBSD-src-330c885e4bf434372e8bb3f79e0996ef921929c2.zip
FreeBSD-src-330c885e4bf434372e8bb3f79e0996ef921929c2.tar.gz
MFV r318962: Allow PROBE_SPINUP to fail in CAM ATA transport
The motivation for this is two-fold. 1. Some old WD SATA disks may appear as if they need to be spun up when they are already spinning. Those disks would respond with an error to the spin-up request. 2. Even if we really fail to spin up the disk, we still can try to proceed to the subsequent phases. If we fail later on, then no difference. Otherwise we get a chance to communicate with the disk which is better than completely ignoring it, because a user can try to recover the disk.
-rw-r--r--sys/cam/ata/ata_xpt.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/cam/ata/ata_xpt.c b/sys/cam/ata/ata_xpt.c
index 584b75d..dadac0e 100644
--- a/sys/cam/ata/ata_xpt.c
+++ b/sys/cam/ata/ata_xpt.c
@@ -743,6 +743,16 @@ out:
goto noerror;
/*
+ * Some old WD SATA disks have broken SPINUP handling.
+ * If we really fail to spin up the disk, then there will be
+ * some media access errors later on, but at least we will
+ * have a device to interact with for recovery attempts.
+ */
+ } else if (softc->action == PROBE_SPINUP &&
+ status == CAM_ATA_STATUS_ERROR) {
+ goto noerror;
+
+ /*
* Some HP SATA disks report supported DMA Auto-Activation,
* but return ABORT on attempt to enable it.
*/
OpenPOWER on IntegriCloud