Author: mav
Date: Mon Mar 25 13:58:17 2013
New Revision: 248704
URL: http://svnweb.freebsd.org/changeset/base/248704

Log:
  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:
  head/sys/dev/ahci/ahci.c

Modified: head/sys/dev/ahci/ahci.c
==============================================================================
--- head/sys/dev/ahci/ahci.c    Mon Mar 25 13:33:06 2013        (r248703)
+++ head/sys/dev/ahci/ahci.c    Mon Mar 25 13:58:17 2013        (r248704)
@@ -1466,7 +1466,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) {
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to