From cf44d9fbbf021d09b4f9096f3fca2723a6abc734 Mon Sep 17 00:00:00 2001 From: Robert Hancock Date: Tue, 29 Jan 2008 19:53:19 -0600 Subject: [PATCH] --- yaml --- r: 82057 b: refs/heads/master c: a1fe782414b7122d4c0501d3a0988b7302fa586f h: refs/heads/master i: 82055: 112f34679ef473b3235e8273ba0bcb7e1f700fe2 v: v3 --- [refs] | 2 +- trunk/drivers/ata/sata_nv.c | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 165033aef72f..c78da4f6588e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7bb3c5290ca0ec9e65947c907495c2b56e895e46 +refs/heads/master: a1fe782414b7122d4c0501d3a0988b7302fa586f diff --git a/trunk/drivers/ata/sata_nv.c b/trunk/drivers/ata/sata_nv.c index a0f98fdab7a0..bfe92a43cf89 100644 --- a/trunk/drivers/ata/sata_nv.c +++ b/trunk/drivers/ata/sata_nv.c @@ -1011,14 +1011,20 @@ static irqreturn_t nv_adma_interrupt(int irq, void *dev_instance) } if (status & (NV_ADMA_STAT_DONE | - NV_ADMA_STAT_CPBERR)) { - u32 check_commands; + NV_ADMA_STAT_CPBERR | + NV_ADMA_STAT_CMD_COMPLETE)) { + u32 check_commands = notifier_clears[i]; int pos, error = 0; - if (ata_tag_valid(ap->link.active_tag)) - check_commands = 1 << ap->link.active_tag; - else - check_commands = ap->link.sactive; + if (status & NV_ADMA_STAT_CPBERR) { + /* Check all active commands */ + if (ata_tag_valid(ap->link.active_tag)) + check_commands = 1 << + ap->link.active_tag; + else + check_commands = ap-> + link.sactive; + } /** Check CPBs for completed commands */ while ((pos = ffs(check_commands)) && !error) {