summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2017-09-19 07:39:32 +0000
committeravg <avg@FreeBSD.org>2017-09-19 07:39:32 +0000
commit9889c8a3da5fae1ffb97ad961ea36308cd5907dd (patch)
treee82f8d94c61f21122f064f5a3ba60690741cbbae /sys/cam
parenta14679e015f34d6200e8a9b30e02776fc769f773 (diff)
downloadFreeBSD-src-9889c8a3da5fae1ffb97ad961ea36308cd5907dd.zip
FreeBSD-src-9889c8a3da5fae1ffb97ad961ea36308cd5907dd.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.
Diffstat (limited to 'sys/cam')
-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 51be8c2..28380e9 100644
--- a/sys/cam/ata/ata_xpt.c
+++ b/sys/cam/ata/ata_xpt.c
@@ -740,6 +740,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