svn commit: r318962 - head/sys/cam/ata
Andriy Gapon
avg at FreeBSD.org
Fri May 26 17:44:48 UTC 2017
Author: avg
Date: Fri May 26 17:44:47 2017
New Revision: 318962
URL: https://svnweb.freebsd.org/changeset/base/318962
Log:
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.
Reviewed by: mav
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D10896
Modified:
head/sys/cam/ata/ata_xpt.c
Modified: head/sys/cam/ata/ata_xpt.c
==============================================================================
--- head/sys/cam/ata/ata_xpt.c Fri May 26 17:11:27 2017 (r318961)
+++ head/sys/cam/ata/ata_xpt.c Fri May 26 17:44:47 2017 (r318962)
@@ -800,6 +800,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.
*/
More information about the svn-src-head
mailing list