1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-01 12:19:28 +00:00

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
This commit is contained in:
Andriy Gapon 2017-05-26 17:44:47 +00:00
parent b326fec486
commit b5617df55b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=318962

View File

@ -799,6 +799,16 @@ probedone(struct cam_periph *periph, union ccb *done_ccb)
status == CAM_ATA_STATUS_ERROR) {
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.