sata_vsc with iq3124h regression in 2.6.20
Quoted 9 lines
As I recall, the 31244 and VSC-7174 always send an interrupt, so the driver should account for this. I thought we had code already in the driver to handle this, but perhaps recent changes stomped that.
It would be good to standardize the way we handle these sorts of controllers, because (I think) Mark Lord has the same problem on
sata_qstor(orpdc_adma?).Jeff
The error interrupt handling code is still in there and is working. The following patch works for me.
---sata_vsc: handle unexpected interrupts when executing a polled IDENTIFY
From: Dan Williams <[email protected]>
---
drivers/ata/sata_vsc.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/ata/sata_vsc.c +3 -1
@@ -258,7 +258,9 @@ static irqreturn_t vsc_sata_interrupt (int irq, void *dev_instance)/* Clear interrupt status */ ata_chk_status (ap); handled++; - } + }else if (qc->tf.command ==ATA_CMD_ID_ATA ) +/* 31244 interrupts on polled IDENTIFY commands */ +ata_chk_status (ap); } } }
Quoted 19 lines · Dan Williams
The error interrupt handling code is still in there and is working. The following patch works for me.
---
sata_vsc: handle unexpected interrupts when executing a polled IDENTIFYFrom: Dan Williams <[email protected]>
Signed-off-by Dan Williams <[email protected]>---
drivers/ata/sata_vsc.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)drivers/ata/sata_vsc.c +0
-0
drivers/ata/sata_vsc.c static irqreturn_t vsc_sata_interrupt (int irq, void *dev_instance) · line 266
Quoted 10 lines
drivers/ata/sata_vsc.c +3
-1@@ -258,7 +258,9 @@ static irqreturn_t vsc_sata_interrupt (int irq, void *dev_instance)/* Clear interrupt status */ ata_chk_status (ap); handled++; - } + }else if (qc->tf.command ==ATA_CMD_ID_ATA ) +/* 31244 interrupts on polled IDENTIFY commands */ +ata_chk_status (ap); } } }
I see. Can you please...
1. move per-port interrupt handling code (everything inside the for loop) to a separate function
2. make the if/else control block look like the following?
if (unlikely(no irq))
return 0;
if (intr command in progress)
return ata_host_intr()
if (error_intr())
error intr handling sans irq clearing.
clear IRQ
return 1;
3. Post the patch (probably two patches, one to separate out vsc_port_intr() and another to fix the problem) with proper subject lines.
Thanks.
Signature · 1 line
tejun