]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
sata_nv: add back some verbosity into ADMA error_handler
authorRobert Hancock <hancockr@shaw.ca>
Mon, 12 Feb 2007 00:34:44 +0000 (18:34 -0600)
committerJeff Garzik <jeff@garzik.org>
Wed, 21 Feb 2007 09:58:17 +0000 (04:58 -0500)
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>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/sata_nv.c

index ab92f208dae2f955b9aef79d214707e90c1b10f0..f1fea96e90bde5bbd3a5e0477abc667c2e0c8c1d 100644 (file)
@@ -1446,6 +1446,26 @@ static void nv_adma_error_handler(struct ata_port *ap)
                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);