* [PATCH] sata_nv: add back some verbosity into ADMA error_handler
@ 2007-02-12 0:34 Robert Hancock
2007-02-20 15:52 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Robert Hancock @ 2007-02-12 0:34 UTC (permalink / raw)
To: linux-kernel, linux-ide, Jeff Garzik, Andrew Morton
Some debug output in the ADMA error_handler function was removed recently,
but it may be useful in certain cases, like NCQ commands timing out. Add it
back in, but make it a bit more intelligent so that it only prints if
command(s) are active and only prints the CPBs for those commands.
That way it won't spew at inappropriate times like suspend/resume.
Signed-off-by: Robert Hancock <hancockr@shaw.ca>
--- linux-2.6.20-git6/drivers/ata/sata_nv.c 2007-02-11 17:31:19.000000000 -0600
+++ linux-2.6.20-git6edit/drivers/ata/sata_nv.c 2007-02-11 17:40:48.000000000 -0600
@@ -1442,6 +1442,26 @@ static void nv_adma_error_handler(struct
void __iomem *mmio = pp->ctl_block;
int i;
u16 tmp;
+
+ if(ata_tag_valid(ap->active_tag) || ap->sactive) {
+ u32 notifier = readl(mmio + NV_ADMA_NOTIFIER);
+ u32 notifier_error = readl(mmio + NV_ADMA_NOTIFIER_ERROR);
+ u32 gen_ctl = readl(pp->gen_block + NV_ADMA_GEN_CTL);
+ u32 status = readw(mmio + NV_ADMA_STAT);
+
+ ata_port_printk(ap, KERN_ERR, "EH in ADMA mode, notifier 0x%X "
+ "notifier_error 0x%X gen_ctl 0x%X status 0x%X\n",
+ notifier, notifier_error, gen_ctl, status);
+
+ for( i=0;i<NV_ADMA_MAX_CPBS;i++) {
+ struct nv_adma_cpb *cpb = &pp->cpb[i];
+ if( (ata_tag_valid(ap->active_tag) && i == ap->active_tag) ||
+ ap->sactive & (1 << i) )
+ ata_port_printk(ap, KERN_ERR,
+ "CPB %d: ctl_flags 0x%x, resp_flags 0x%x\n",
+ i, cpb->ctl_flags, cpb->resp_flags);
+ }
+ }
/* Push us back into port register mode for error handling. */
nv_adma_register_mode(ap);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] sata_nv: add back some verbosity into ADMA error_handler
2007-02-12 0:34 [PATCH] sata_nv: add back some verbosity into ADMA error_handler Robert Hancock
@ 2007-02-20 15:52 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2007-02-20 15:52 UTC (permalink / raw)
To: Robert Hancock; +Cc: linux-kernel, linux-ide, Andrew Morton
Robert Hancock wrote:
> Some debug output in the ADMA error_handler function was removed recently,
> but it may be useful in certain cases, like NCQ commands timing out. Add it
> back in, but make it a bit more intelligent so that it only prints if
> command(s) are active and only prints the CPBs for those commands.
> That way it won't spew at inappropriate times like suspend/resume.
>
> Signed-off-by: Robert Hancock <hancockr@shaw.ca>
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-02-20 15:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-12 0:34 [PATCH] sata_nv: add back some verbosity into ADMA error_handler Robert Hancock
2007-02-20 15:52 ` Jeff Garzik
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.