hi robert, I have fixed a bug in rhel4u5 2.6.9-55 when running adma mode with HDS7250SASUN500G. Could you check this code and if no problem, then help me to submit to the newest kernel.
for 2.6.9-55 diff -Nupr a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c --- a/drivers/ata/sata_nv.c 2008-01-14 14:37:32.000000000 +0800 +++ b/drivers/ata/sata_nv.c 2008-01-14 14:37:21.000000000 +0800 @@ -802,7 +802,7 @@ static irqreturn_t nv_adma_interrupt(int ata_port_printk(ap, KERN_ERR, "CPB error, stat=0x%x\n", status); have_global_err = 1; } - if ((status & NV_ADMA_STAT_DONE) || have_global_err) { + if ((status & (NV_ADMA_STAT_CMD_COMPLETE | NV_ADMA_STAT_DONE)) || have_global_err) { /** Check CPBs for completed commands */ if(ata_tag_valid(ap->active_tag)) @@ -814,6 +814,7 @@ static irqreturn_t nv_adma_interrupt(int u32 active = ap->sactive; while( (pos = ffs(active)) ) { pos--; + if ((notifier_clears[i] & (1 << pos)) || have_global_err) nv_adma_check_cpb(ap, pos, have_global_err || (notifier_error & (1 << pos)) ); active &= ~(1 << pos ); for 2.6.24-rc7 diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index ed5dc7c..6bffd39 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c @@ -1010,8 +1010,7 @@ static irqreturn_t nv_adma_interrupt(int irq, void *dev_instance) continue; } - if (status & (NV_ADMA_STAT_DONE | - NV_ADMA_STAT_CPBERR)) { + if (status & (NV_ADMA_STAT_DONE | NV_ADMA_STAT_CMD_COMPLETE | NV_ADMA_STAT_CPBERR)) { u32 check_commands; int pos, error = 0; @@ -1023,8 +1022,8 @@ static irqreturn_t nv_adma_interrupt(int irq, void *dev_instance) /** Check CPBs for completed commands */ while ((pos = ffs(check_commands)) && !error) { pos--; - error = nv_adma_check_cpb(ap, pos, - notifier_error & (1 << pos)); + if ((notifier_clears[i] & (1 << pos)) || (status & NV_ADMA_STAT_CPBERR)) + error = nv_adma_check_cpb(ap, pos, notifier_error & (1 << pos)); check_commands &= ~(1 << pos); } } ----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. ----------------------------------------------------------------------------------- - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html