Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 68163
b: refs/heads/master
c: 5f226c6
h: refs/heads/master
i:
  68161: d0e3c6d
  68159: ef5704c
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Oct 12, 2007
1 parent 8e346b5 commit 46c9db9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1c954a4d9a9e351fa3509533fd8dd5f3821206cd
refs/heads/master: 5f226c6bf78edab023ed1ea679531731d9df92a6
30 changes: 21 additions & 9 deletions trunk/drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,7 @@ static void ahci_port_intr(struct ata_port *ap)
void __iomem *port_mmio = ap->ioaddr.cmd_addr;
struct ata_eh_info *ehi = &ap->link.eh_info;
struct ahci_port_priv *pp = ap->private_data;
struct ahci_host_priv *hpriv = ap->host->private_data;
u32 status, qc_active;
int rc, known_irq = 0;

Expand All @@ -1432,17 +1433,28 @@ static void ahci_port_intr(struct ata_port *ap)
}

if (status & PORT_IRQ_SDB_FIS) {
/* If the 'N' bit in word 0 of the FIS is set, we just
* received asynchronous notification. Tell libata
* about it. Note that as the SDB FIS itself is
* accessible, SNotification can be emulated by the
* driver but don't bother for the time being.
/* If SNotification is available, leave notification
* handling to sata_async_notification(). If not,
* emulate it by snooping SDB FIS RX area.
*
* Snooping FIS RX area is probably cheaper than
* poking SNotification but some constrollers which
* implement SNotification, ICH9 for example, don't
* store AN SDB FIS into receive area.
*/
const __le32 *f = pp->rx_fis + RX_FIS_SDB;
u32 f0 = le32_to_cpu(f[0]);

if (f0 & (1 << 15))
if (hpriv->cap & HOST_CAP_SNTF)
sata_async_notification(ap);
else {
/* If the 'N' bit in word 0 of the FIS is set,
* we just received asynchronous notification.
* Tell libata about it.
*/
const __le32 *f = pp->rx_fis + RX_FIS_SDB;
u32 f0 = le32_to_cpu(f[0]);

if (f0 & (1 << 15))
sata_async_notification(ap);
}
}

/* pp->active_link is valid iff any command is in flight */
Expand Down

0 comments on commit 46c9db9

Please sign in to comment.