Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8cf32ac6578a70025be1103466da9d1d6141429e
Commit:     8cf32ac6578a70025be1103466da9d1d6141429e
Parent:     2cc3a8f6ac0fb1e6095a47001d31aadcf9722bde
Author:     Tejun Heo <[EMAIL PROTECTED]>
AuthorDate: Sat Dec 8 08:45:27 2007 +0900
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Mon Dec 17 20:33:11 2007 -0500

    sata_sil: fix spurious IRQ handling
    
    Interestingly, sata_sil raises spurious interrupts if it's coupled
    with Sil SATA_PATA bridge.  Currently, sata_sil interrupt handler is
    strict about spurious interrupts and freezes the port when it occurs.
    This patch makes it more forgiving.
    
    * On SATA PHY event interrupt, serror value is checked to see whether
      it really is PHYRDY CHG event.  If not, SATA PHY event interrupt is
      ignored.
    
    * If ATA interrupt occurs while no command is in progress, it's
      cleared and ignored.
    
    This fixes bugzilla bug 9505.
    
      http://bugzilla.kernel.org/show_bug.cgi?id=9505
    
    Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/ata/sata_sil.c |   29 +++++++++++++++++------------
 1 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c
index 4e6e381..025622b 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)
                sil_scr_read(ap, SCR_ERROR, &serror);
                sil_scr_write(ap, SCR_ERROR, serror);
 
-               /* Trigger hotplug and accumulate SError only if the
-                * port isn't already frozen.  Otherwise, PHY events
-                * during hardreset makes controllers with broken SIEN
-                * repeat probing needlessly.
+               /* Sometimes spurious interrupts occur, double check
+                * it's PHYRDY CHG.
                 */
-               if (!(ap->pflags & ATA_PFLAG_FROZEN)) {
-                       ata_ehi_hotplugged(&ap->link.eh_info);
-                       ap->link.eh_info.serror |= serror;
+               if (serror & SERR_PHYRDY_CHG) {
+                       /* Trigger hotplug and accumulate SError only
+                        * 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;
+               if (!(bmdma2 & SIL_DMA_COMPLETE))
+                       return;
        }
 
-       if (unlikely(!qc))
-               goto freeze;
-
-       if (unlikely(qc->tf.flags & ATA_TFLAG_POLLING)) {
+       if (unlikely(!qc || (qc->tf.flags & ATA_TFLAG_POLLING))) {
                /* this sometimes happens, just clear IRQ */
                ata_chk_status(ap);
                return;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to