Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 May 2011 00:37:44 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r222297 - stable/8/sys/dev/ata
Message-ID:  <201105260037.p4Q0bim7036918@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Thu May 26 00:37:44 2011
New Revision: 222297
URL: http://svn.freebsd.org/changeset/base/222297

Log:
  MFC r220911:
  Make PATA-like soft-reset in ata(4) more strict in checking disk signature.
  It allows to avoid false positive device detection under Xen, that caused
  long probe delays due to subsequent IDENTIFY command timeouts.

Modified:
  stable/8/sys/dev/ata/ata-lowlevel.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/dev/ata/ata-lowlevel.c
==============================================================================
--- stable/8/sys/dev/ata/ata-lowlevel.c	Thu May 26 00:09:56 2011	(r222296)
+++ stable/8/sys/dev/ata/ata-lowlevel.c	Thu May 26 00:37:44 2011	(r222297)
@@ -535,7 +535,7 @@ ata_generic_reset(device_t dev)
 		    if (lsb == ATAPI_MAGIC_LSB && msb == ATAPI_MAGIC_MSB) {
 			ch->devices |= ATA_ATAPI_MASTER;
 		    }
-		    else if (stat0 & ATA_S_READY) {
+		    else if (lsb == 0 && msb == 0 && (stat0 & ATA_S_READY)) {
 			ch->devices |= ATA_ATA_MASTER;
 		    }
 		}
@@ -568,7 +568,7 @@ ata_generic_reset(device_t dev)
 		    if (lsb == ATAPI_MAGIC_LSB && msb == ATAPI_MAGIC_MSB) {
 			ch->devices |= ATA_ATAPI_SLAVE;
 		    }
-		    else if (stat1 & ATA_S_READY) {
+		    else if (lsb == 0 && msb == 0 && (stat1 & ATA_S_READY)) {
 			ch->devices |= ATA_ATA_SLAVE;
 		    }
 		}



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