aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/sata_sil.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c
index 4e6e381279cc..025622b14efb 100644
--- a/drivers/ata/sata_sil.c
+++ b/drivers/ata/sata_sil.c
@@ -390,23 +390,28 @@ static void sil_host_intr(struct ata_port *ap, u32 bmdma2)
390 sil_scr_read(ap, SCR_ERROR, &serror); 390 sil_scr_read(ap, SCR_ERROR, &serror);
391 sil_scr_write(ap, SCR_ERROR, serror); 391 sil_scr_write(ap, SCR_ERROR, serror);
392 392
393 /* Trigger hotplug and accumulate SError only if the 393 /* Sometimes spurious interrupts occur, double check
394 * port isn't already frozen. Otherwise, PHY events 394 * it's PHYRDY CHG.
395 * during hardreset makes controllers with broken SIEN
396 * repeat probing needlessly.
397 */ 395 */
398 if (!(ap->pflags & ATA_PFLAG_FROZEN)) { 396 if (serror & SERR_PHYRDY_CHG) {
399 ata_ehi_hotplugged(&ap->link.eh_info); 397 /* Trigger hotplug and accumulate SError only
400 ap->link.eh_info.serror |= serror; 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;
401 } 408 }
402 409
403 goto freeze; 410 if (!(bmdma2 & SIL_DMA_COMPLETE))
411 return;
404 } 412 }
405 413
406 if (unlikely(!qc)) 414 if (unlikely(!qc || (qc->tf.flags & ATA_TFLAG_POLLING))) {
407 goto freeze;
408
409 if (unlikely(qc->tf.flags & ATA_TFLAG_POLLING)) {
410 /* this sometimes happens, just clear IRQ */ 415 /* this sometimes happens, just clear IRQ */
411 ata_chk_status(ap); 416 ata_chk_status(ap);
412 return; 417 return;