aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/sata_nv.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index 57dace43b337..745d85686f5e 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -854,22 +854,14 @@ static irqreturn_t nv_adma_interrupt(int irq, void *dev_instance)
854 854
855 if (status & (NV_ADMA_STAT_DONE | 855 if (status & (NV_ADMA_STAT_DONE |
856 NV_ADMA_STAT_CPBERR)) { 856 NV_ADMA_STAT_CPBERR)) {
857 u32 check_commands = notifier | notifier_error;
858 int pos, error = 0;
857 /** Check CPBs for completed commands */ 859 /** Check CPBs for completed commands */
858 860 while ((pos = ffs(check_commands)) && !error) {
859 if (ata_tag_valid(ap->active_tag)) { 861 pos--;
860 /* Non-NCQ command */ 862 error = nv_adma_check_cpb(ap, pos,
861 nv_adma_check_cpb(ap, ap->active_tag, 863 notifier_error & (1 << pos) );
862 notifier_error & (1 << ap->active_tag)); 864 check_commands &= ~(1 << pos );
863 } else {
864 int pos, error = 0;
865 u32 active = ap->sactive;
866
867 while ((pos = ffs(active)) && !error) {
868 pos--;
869 error = nv_adma_check_cpb(ap, pos,
870 notifier_error & (1 << pos) );
871 active &= ~(1 << pos );
872 }
873 } 865 }
874 } 866 }
875 } 867 }