From: Tejun Heo Date: Mon, 15 May 2006 11:58:00 +0000 (+0900) Subject: [PATCH] libata-eh-fw: clear SError in ata_std_postreset() X-Git-Tag: v2.6.18-rc1~1079^2~98^2~33 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=dc2b3515868a254b3d653d77844bff93c5d4c095;p=linux-2.6-omap-h63xx.git [PATCH] libata-eh-fw: clear SError in ata_std_postreset() Clear SError in ata_std_postreset(). This is to clear SError bits which get set during reset. Signed-off-by: Tejun Heo --- diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 9a97ebd5920..de2cd61a264 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -2528,11 +2528,17 @@ int sata_std_hardreset(struct ata_port *ap, unsigned int *class) */ void ata_std_postreset(struct ata_port *ap, unsigned int *classes) { + u32 serror; + DPRINTK("ENTER\n"); /* print link status */ sata_print_link_status(ap); + /* clear SError */ + if (sata_scr_read(ap, SCR_ERROR, &serror) == 0) + sata_scr_write(ap, SCR_ERROR, serror); + /* re-enable interrupts */ if (ap->ioaddr.ctl_addr) /* FIXME: hack. create a hook instead */ ata_irq_on(ap);