libata: clear link->eh_info.serror from ata_std_postreset()

link->eh_info.serror is used to cache SError for controllers which
need it cleared from interrupt handler to clear IRQ.  It also should
be cleared after reset just like SError itself.

Make ata_std_postreset() clear link->eh_info.serror too and update
sata_sil such that it doesn't care about bookkeeping the value.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
Tejun Heo 2007-12-08 08:47:01 +09:00 committed by Jeff Garzik
parent 8cf32ac657
commit f7fe7ad4bc
2 changed files with 2 additions and 10 deletions

View File

@ -3923,6 +3923,7 @@ void ata_std_postreset(struct ata_link *link, unsigned int *classes)
/* clear SError */ /* clear SError */
if (sata_scr_read(link, SCR_ERROR, &serror) == 0) if (sata_scr_read(link, SCR_ERROR, &serror) == 0)
sata_scr_write(link, SCR_ERROR, serror); sata_scr_write(link, SCR_ERROR, serror);
link->eh_info.serror = 0;
/* is double-select really necessary? */ /* is double-select really necessary? */
if (classes[0] != ATA_DEV_NONE) if (classes[0] != ATA_DEV_NONE)

View File

@ -394,16 +394,7 @@ static void sil_host_intr(struct ata_port *ap, u32 bmdma2)
* it's PHYRDY CHG. * it's PHYRDY CHG.
*/ */
if (serror & SERR_PHYRDY_CHG) { if (serror & SERR_PHYRDY_CHG) {
/* Trigger hotplug and accumulate SError only ap->link.eh_info.serror |= serror;
* if the port isn't already frozen.
* Otherwise, PHY events during hardreset
* makes controllers with broken SIEN repeat
* probing needlessly.
*/
if (!(ap->pflags & ATA_PFLAG_FROZEN)) {
ata_ehi_hotplugged(&ap->link.eh_info);
ap->link.eh_info.serror |= serror;
}
goto freeze; goto freeze;
} }