diff options
author | Renato Botelho <renato@netgate.com> | 2016-08-25 10:40:54 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-08-25 10:40:54 -0300 |
commit | 5f4dbd408a354e294fdffc23ee889af03b7cfc28 (patch) | |
tree | 2d140e0691c400a324f9da94ed1282ab1a1c8710 /sys/dev/ahci/ahci.c | |
parent | ff37ccbef82fdcee6f5306945547bc8541986a03 (diff) | |
parent | 986f593e4573a0f751ae6fa39b49e0a0dcbefbf8 (diff) | |
download | FreeBSD-src-5f4dbd408a354e294fdffc23ee889af03b7cfc28.zip FreeBSD-src-5f4dbd408a354e294fdffc23ee889af03b7cfc28.tar.gz |
Merge remote-tracking branch 'origin/stable/11' into devel-11
Diffstat (limited to 'sys/dev/ahci/ahci.c')
-rw-r--r-- | sys/dev/ahci/ahci.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c index ec42b3c..ee0e957 100644 --- a/sys/dev/ahci/ahci.c +++ b/sys/dev/ahci/ahci.c @@ -416,7 +416,8 @@ ahci_setup_interrupt(device_t dev) else if (ctlr->numirqs == 1 || i >= ctlr->channels || (ctlr->ccc && i == ctlr->cccv)) ctlr->irqs[i].mode = AHCI_IRQ_MODE_ALL; - else if (i == ctlr->numirqs - 1) + else if (ctlr->channels > ctlr->numirqs && + i == ctlr->numirqs - 1) ctlr->irqs[i].mode = AHCI_IRQ_MODE_AFTER; else ctlr->irqs[i].mode = AHCI_IRQ_MODE_ONE; @@ -465,6 +466,7 @@ ahci_intr(void *data) } else { /* AHCI_IRQ_MODE_AFTER */ unit = irq->r_irq_rid - 1; is = ATA_INL(ctlr->r_mem, AHCI_IS); + is &= (0xffffffff << unit); } /* CCC interrupt is edge triggered. */ if (ctlr->ccc) |