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>

authored by

Tejun Heo and committed by
Jeff Garzik
f7fe7ad4 8cf32ac6

+2 -10
+1
drivers/ata/libata-core.c
··· 3923 /* clear SError */ 3924 if (sata_scr_read(link, SCR_ERROR, &serror) == 0) 3925 sata_scr_write(link, SCR_ERROR, serror); 3926 3927 /* is double-select really necessary? */ 3928 if (classes[0] != ATA_DEV_NONE)
··· 3923 /* clear SError */ 3924 if (sata_scr_read(link, SCR_ERROR, &serror) == 0) 3925 sata_scr_write(link, SCR_ERROR, serror); 3926 + link->eh_info.serror = 0; 3927 3928 /* is double-select really necessary? */ 3929 if (classes[0] != ATA_DEV_NONE)
+1 -10
drivers/ata/sata_sil.c
··· 394 * it's PHYRDY CHG. 395 */ 396 if (serror & SERR_PHYRDY_CHG) { 397 - /* Trigger hotplug and accumulate SError only 398 - * if the port isn't already frozen. 399 - * Otherwise, PHY events during hardreset 400 - * makes controllers with broken SIEN repeat 401 - * probing needlessly. 402 - */ 403 - if (!(ap->pflags & ATA_PFLAG_FROZEN)) { 404 - ata_ehi_hotplugged(&ap->link.eh_info); 405 - ap->link.eh_info.serror |= serror; 406 - } 407 goto freeze; 408 } 409
··· 394 * it's PHYRDY CHG. 395 */ 396 if (serror & SERR_PHYRDY_CHG) { 397 + ap->link.eh_info.serror |= serror; 398 goto freeze; 399 } 400