From owner-svn-src-all@FreeBSD.ORG Sat Feb 5 20:52:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12DF2106566B; Sat, 5 Feb 2011 20:52:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC5168FC15; Sat, 5 Feb 2011 20:52:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p15KqhMJ040213; Sat, 5 Feb 2011 20:52:43 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p15KqhKx040211; Sat, 5 Feb 2011 20:52:43 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201102052052.p15KqhKx040211@svn.freebsd.org> From: Alexander Motin Date: Sat, 5 Feb 2011 20:52:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218340 - stable/8/sys/cam/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Feb 2011 20:52:44 -0000 Author: mav Date: Sat Feb 5 20:52:43 2011 New Revision: 218340 URL: http://svn.freebsd.org/changeset/base/218340 Log: MFC r217444: Some old WD SATA disks report supported and enabled device-initiated interface power management, but return ABORT error on attempt to disable it. Make CAM SATA probe sequence ignore this error, as it is not fatal. Modified: stable/8/sys/cam/ata/ata_xpt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/8/sys/cam/ata/ata_xpt.c Sat Feb 5 20:48:45 2011 (r218339) +++ stable/8/sys/cam/ata/ata_xpt.c Sat Feb 5 20:52:43 2011 (r218340) @@ -727,6 +727,7 @@ probedone(struct cam_periph *periph, uni struct ata_params *ident_buf; probe_softc *softc; struct cam_path *path; + cam_status status; u_int32_t priority; u_int caps; int found = 1; @@ -751,6 +752,7 @@ probedone(struct cam_periph *periph, uni xpt_release_devq(done_ccb->ccb_h.path, /*count*/1, /*run_queue*/TRUE); } + status = done_ccb->ccb_h.status & CAM_STATUS_MASK; if (softc->restart) { softc->faults++; if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) == @@ -760,12 +762,24 @@ probedone(struct cam_periph *periph, uni goto done; else softc->restart = 0; - } else + /* Old PIO2 devices may not support mode setting. */ - if (softc->action == PROBE_SETMODE && + } else if (softc->action == PROBE_SETMODE && + status == CAM_ATA_STATUS_ERROR && ata_max_pmode(ident_buf) <= ATA_PIO2 && - (ident_buf->capabilities1 & ATA_SUPPORT_IORDY) == 0) + (ident_buf->capabilities1 & ATA_SUPPORT_IORDY) == 0) { + goto noerror; + + /* + * Some old WD SATA disks report supported and enabled + * device-initiated interface power management, but return + * ABORT on attempt to disable it. + */ + } else if (softc->action == PROBE_SETPM && + status == CAM_ATA_STATUS_ERROR) { goto noerror; + } + /* * If we get to this point, we got an error status back * from the inquiry and the error status doesn't require