Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Apr 2013 19:33:37 +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-9@freebsd.org
Subject:   svn commit: r249852 - stable/9/sys/dev/ahci
Message-ID:  <201304241933.r3OJXbQX095240@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Wed Apr 24 19:33:37 2013
New Revision: 249852
URL: http://svnweb.freebsd.org/changeset/base/249852

Log:
  MFC r248704:
  Read Asynchronous Notification statuses only if Port Multiplier or ATAPI
  device are connected. ATA disks are not using ANs, while the extra register
  read operation is quite expensive.

Modified:
  stable/9/sys/dev/ahci/ahci.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/ahci/ahci.c
==============================================================================
--- stable/9/sys/dev/ahci/ahci.c	Wed Apr 24 19:24:53 2013	(r249851)
+++ stable/9/sys/dev/ahci/ahci.c	Wed Apr 24 19:33:37 2013	(r249852)
@@ -1524,7 +1524,8 @@ ahci_ch_intr(void *data)
 	if (ch->numrslots != ch->numtslots)
 		cstatus |= ATA_INL(ch->r_mem, AHCI_P_CI);
 	/* Read SNTF in one of possible ways. */
-	if (istatus & AHCI_P_IX_SDB) {
+	if ((istatus & AHCI_P_IX_SDB) &&
+	    (ch->pm_present || ch->curr[0].atapi != 0)) {
 		if (ch->caps & AHCI_CAP_SSNTF)
 			sntf = ATA_INL(ch->r_mem, AHCI_P_SNTF);
 		else if (ch->fbs_enabled) {



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