All of lore.kernel.org
 help / color / mirror / Atom feed
* sata_vsc with iq3124h regression in 2.6.20
@ 2007-02-09 22:21 Williams, Dan J
  2007-02-09 22:33 ` Jeff Garzik
  0 siblings, 1 reply; 6+ messages in thread
From: Williams, Dan J @ 2007-02-09 22:21 UTC (permalink / raw)
  To: htejun; +Cc: linux-ide, jeremy

When I fire up 2.6.20 with an iq3124h I get:

ata1: SATA max UDMA/133 cmd 0xC8822200 ctl 0xC8822229 bmdma 0xC8822270
irq 25
ata2: SATA max UDMA/133 cmd 0xC8822400 ctl 0xC8822429 bmdma 0xC8822470
irq 25
ata3: SATA max UDMA/133 cmd 0xC8822600 ctl 0xC8822629 bmdma 0xC8822670
irq 25
ata4: SATA max UDMA/133 cmd 0xC8822800 ctl 0xC8822829 bmdma 0xC8822870
irq 25
scsi0 : sata_vsc
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
irq 25: nobody cared (try booting with the "irqpoll" option)
handlers:
[<c01796e0>] (vsc_sata_interrupt+0x0/0x194)
Disabling IRQ #25

I did a git bisect and came up with: [PATCH] libata: always use polling
IDENTIFY (800b399669ad495ad4361d134df87401ae36f44f)

I could probably cobble together a workaround to use irq-driven IDENTIFY
for this card but wanted to see if there was a better way.

Thanks,

Dan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: sata_vsc with iq3124h regression in 2.6.20
  2007-02-09 22:21 sata_vsc with iq3124h regression in 2.6.20 Williams, Dan J
@ 2007-02-09 22:33 ` Jeff Garzik
  2007-02-10 14:58   ` Tejun Heo
  2007-02-10 21:08   ` Mark Lord
  0 siblings, 2 replies; 6+ messages in thread
From: Jeff Garzik @ 2007-02-09 22:33 UTC (permalink / raw)
  To: Williams, Dan J; +Cc: htejun, linux-ide, jeremy, Mark Lord

Williams, Dan J wrote:
> When I fire up 2.6.20 with an iq3124h I get:
> 
> ata1: SATA max UDMA/133 cmd 0xC8822200 ctl 0xC8822229 bmdma 0xC8822270
> irq 25
> ata2: SATA max UDMA/133 cmd 0xC8822400 ctl 0xC8822429 bmdma 0xC8822470
> irq 25
> ata3: SATA max UDMA/133 cmd 0xC8822600 ctl 0xC8822629 bmdma 0xC8822670
> irq 25
> ata4: SATA max UDMA/133 cmd 0xC8822800 ctl 0xC8822829 bmdma 0xC8822870
> irq 25
> scsi0 : sata_vsc
> ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
> irq 25: nobody cared (try booting with the "irqpoll" option)
> handlers:
> [<c01796e0>] (vsc_sata_interrupt+0x0/0x194)
> Disabling IRQ #25
> 
> I did a git bisect and came up with: [PATCH] libata: always use polling
> IDENTIFY (800b399669ad495ad4361d134df87401ae36f44f)
> 
> I could probably cobble together a workaround to use irq-driven IDENTIFY
> for this card but wanted to see if there was a better way.

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 (or pdc_adma?).

	Jeff




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: sata_vsc with iq3124h regression in 2.6.20
  2007-02-09 22:33 ` Jeff Garzik
@ 2007-02-10 14:58   ` Tejun Heo
  2007-02-10 21:08   ` Mark Lord
  1 sibling, 0 replies; 6+ messages in thread
From: Tejun Heo @ 2007-02-10 14:58 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Williams, Dan J, linux-ide, jeremy, Mark Lord

Jeff Garzik wrote:
> Williams, Dan J wrote:
>> When I fire up 2.6.20 with an iq3124h I get:
>>
>> ata1: SATA max UDMA/133 cmd 0xC8822200 ctl 0xC8822229 bmdma 0xC8822270
>> irq 25
>> ata2: SATA max UDMA/133 cmd 0xC8822400 ctl 0xC8822429 bmdma 0xC8822470
>> irq 25
>> ata3: SATA max UDMA/133 cmd 0xC8822600 ctl 0xC8822629 bmdma 0xC8822670
>> irq 25
>> ata4: SATA max UDMA/133 cmd 0xC8822800 ctl 0xC8822829 bmdma 0xC8822870
>> irq 25
>> scsi0 : sata_vsc
>> ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
>> irq 25: nobody cared (try booting with the "irqpoll" option)
>> handlers:
>> [<c01796e0>] (vsc_sata_interrupt+0x0/0x194)
>> Disabling IRQ #25
>>
>> I did a git bisect and came up with: [PATCH] libata: always use polling
>> IDENTIFY (800b399669ad495ad4361d134df87401ae36f44f)
>>
>> I could probably cobble together a workaround to use irq-driven IDENTIFY
>> for this card but wanted to see if there was a better way.
> 
> 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 (or pdc_adma?).

Yeah, it seems we need ATA_FLAG_LISTEN_IRQ_WHILE_POLLING or 
ATA_FLAG_BROKEN_NIEN or something.

-- 
tejun

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: sata_vsc with iq3124h regression in 2.6.20
  2007-02-09 22:33 ` Jeff Garzik
  2007-02-10 14:58   ` Tejun Heo
@ 2007-02-10 21:08   ` Mark Lord
  1 sibling, 0 replies; 6+ messages in thread
From: Mark Lord @ 2007-02-10 21:08 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Williams, Dan J, htejun, linux-ide, jeremy

Jeff Garzik wrote:
>
> 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 (or pdc_adma?).

sata_qstor has a different problem.
For IDENTIFY and other non-R/W commands, it behaves nicely
as a simple, dumb, PIO style interface.

For regular block I/O R/W commands, it uses full DMA with
the internal host queue, depth=1, *but* requires NIEN=1
during such commands.

It's on my near-term "to fix" list, along with migration to the new EH stuff.

Cheers

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: sata_vsc with iq3124h regression in 2.6.20
  2007-02-09 23:26 Dan Williams
@ 2007-02-12  3:19 ` Tejun Heo
  0 siblings, 0 replies; 6+ messages in thread
From: Tejun Heo @ 2007-02-12  3:19 UTC (permalink / raw)
  To: Dan Williams; +Cc: jeff, linux-ide, jeremy, liml

Dan Williams wrote:
> 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 <dan.j.williams@intel.com>
> 
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---
> 
>  drivers/ata/sata_vsc.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/ata/sata_vsc.c b/drivers/ata/sata_vsc.c
> index 0fa1b89..7425d62 100644
> --- a/drivers/ata/sata_vsc.c
> +++ b/drivers/ata/sata_vsc.c
> @@ -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.

-- 
tejun


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: sata_vsc with iq3124h regression in 2.6.20
@ 2007-02-09 23:26 Dan Williams
  2007-02-12  3:19 ` Tejun Heo
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Williams @ 2007-02-09 23:26 UTC (permalink / raw)
  To: jeff; +Cc: htejun, linux-ide, jeremy, liml

> 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 (or pdc_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 <dan.j.williams@intel.com>

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---

 drivers/ata/sata_vsc.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/ata/sata_vsc.c b/drivers/ata/sata_vsc.c
index 0fa1b89..7425d62 100644
--- a/drivers/ata/sata_vsc.c
+++ b/drivers/ata/sata_vsc.c
@@ -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);
 			}
 		}
 	}

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-02-12  6:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-09 22:21 sata_vsc with iq3124h regression in 2.6.20 Williams, Dan J
2007-02-09 22:33 ` Jeff Garzik
2007-02-10 14:58   ` Tejun Heo
2007-02-10 21:08   ` Mark Lord
2007-02-09 23:26 Dan Williams
2007-02-12  3:19 ` Tejun Heo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.