1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-17 15:27:36 +00:00

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.
This commit is contained in:
Alexander Motin 2013-03-25 13:58:17 +00:00
parent cd08290b48
commit 6a740c4a4f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=248704

View File

@ -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) {