Date: Tue, 19 Sep 2017 07:39:32 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323736 - stable/11/sys/cam/ata Message-ID: <201709190739.v8J7dWqL013736@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Tue Sep 19 07:39:32 2017 New Revision: 323736 URL: https://svnweb.freebsd.org/changeset/base/323736 Log: 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. Modified: stable/11/sys/cam/ata/ata_xpt.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/11/sys/cam/ata/ata_xpt.c Tue Sep 19 07:31:53 2017 (r323735) +++ stable/11/sys/cam/ata/ata_xpt.c Tue Sep 19 07:39:32 2017 (r323736) @@ -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. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709190739.v8J7dWqL013736>