Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 May 2017 17:44:47 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r318962 - head/sys/cam/ata
Message-ID:  <201705261744.v4QHilml034076@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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.
 		 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705261744.v4QHilml034076>