aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ahci
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2013-03-25 13:58:17 +0000
committerAlexander Motin <mav@FreeBSD.org>2013-03-25 13:58:17 +0000
commit6a740c4a4f52ac5aa8a0f35e828d20d0bf0692a8 (patch)
tree144ed38ec7a2dfc80ec07769b3a0013df015e316 /sys/dev/ahci
parentcd08290b48fe7d68802d110d340f37ea521e09a8 (diff)
downloadsrc-6a740c4a4f52ac5aa8a0f35e828d20d0bf0692a8.tar.gz
src-6a740c4a4f52ac5aa8a0f35e828d20d0bf0692a8.zip
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.
Notes
Notes: svn path=/head/; revision=248704
Diffstat (limited to 'sys/dev/ahci')
-rw-r--r--sys/dev/ahci/ahci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c
index c39f9741b1ff..f7dba1ebc33f 100644
--- a/sys/dev/ahci/ahci.c
+++ b/sys/dev/ahci/ahci.c
@@ -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) {