On Sat, 30 Jul 2005 01:46:13 +0100
Daniel Drake <[EMAIL PROTECTED]> wrote:

> Hi, its your favourite bug reporter again ;)
> 
> A Gentoo user (on CC) has reported many of these messages appearing:
> 
>       skge ignoring bogus sensor interrups
> 
> They appear so frequently that 3GB of logs are generated in 1 hour of
> usage.
> 

Try this:
Index: skge-2.6/drivers/net/skge.c
===================================================================
--- skge-2.6.orig/drivers/net/skge.c    2005-07-29
13:07:16.000000000 -0700 +++ skge-2.6/drivers/net/skge.c
2005-07-30 17:12:35.000000000 -0700 @@ -2670,18 +2670,6 @@
                /* Timestamp (unused) overflow */
                if (hwstatus & IS_IRQ_TIST_OV)
                        skge_write8(hw, GMAC_TI_ST_CTRL,
GMT_ST_CLR_IRQ); -
-               if (hwstatus & IS_IRQ_SENSOR) {
-                       /* no sensors on 32-bit Yukon */
-                       if (!(skge_read16(hw, B0_CTST) &
CS_BUS_SLOT_SZ)) {
-                               printk(KERN_ERR PFX "ignoring bogus
sensor interrups\n");
-                               skge_write32(hw, B0_HWE_IMSK,
-                                            IS_ERR_MSK &
~IS_IRQ_SENSOR);
-                       } else
-                               printk(KERN_WARNING PFX "sensor
interrupt\n");
-               }
-
-
        }
 
        if (hwstatus & IS_RAM_RD_PAR) {
@@ -2712,9 +2700,10 @@
 
                skge_pci_clear(hw);
 
+               /* if error still set then just ignore it */
                hwstatus = skge_read32(hw, B0_HWE_ISRC);
                if (hwstatus & IS_IRQ_STAT) {
-                       printk(KERN_WARNING PFX "IRQ status %x: still
set ignoring hardware errors\n",
+                       pr_debug("IRQ status %x: still set ignoring
hardware errors\n", hwstatus);
                        hw->intr_mask &= ~IS_HW_ERR;
                }
@@ -2948,12 +2937,20 @@
        else
                hw->ram_size = t8 * 4096;
 
+       hw->intr_mask = IS_HW_ERR | IS_EXT_REG;
        if (hw->chip_id == CHIP_ID_GENESIS)
                genesis_init(hw);
        else {
                /* switch power to VCC (WA for VAUX problem) */
                skge_write8(hw, B0_POWER_CTRL,
                            PC_VAUX_ENA | PC_VCC_ENA | PC_VAUX_OFF |
PC_VCC_ON);
+               /* avoid boards with stuck Hardware error bits */
+               if ((skge_read32(hw, B0_ISRC) & IS_HW_ERR) &&
+                   (skge_read32(hw, B0_HWE_ISRC) & IS_IRQ_SENSOR)) {
+                       printk(KERN_WARNING PFX "stuck hardware sensor
bit\n");
+                       hw->intr_mask &= ~IS_HW_ERR;
+               }
+
                for (i = 0; i < hw->ports; i++) {
                        skge_write16(hw, SK_REG(i, GMAC_LINK_CTRL),
GMLC_RST_SET); skge_write16(hw, SK_REG(i, GMAC_LINK_CTRL),
GMLC_RST_CLR); @@ -2994,7 +2991,6 @@
        skge_write32(hw, B2_IRQM_INI, skge_usecs2clk(hw, 100));
        skge_write32(hw, B2_IRQM_CTRL, TIM_START);
 
-       hw->intr_mask = IS_HW_ERR | IS_EXT_REG;
        skge_write32(hw, B0_IMSK, hw->intr_mask);
 
        if (hw->chip_id != CHIP_ID_GENESIS)
Index: skge-2.6/drivers/net/skge.h
===================================================================
--- skge-2.6.orig/drivers/net/skge.h    2005-07-29
13:07:15.000000000 -0700 +++ skge-2.6/drivers/net/skge.h
2005-07-30 17:12:18.000000000 -0700 @@ -214,8 +214,6 @@
 
 /*     B2_IRQM_HWE_MSK 32 bit  IRQ Moderation HW Error
Mask */ enum {
-       IS_ERR_MSK      = 0x00003fff,/*                 All Error
bits */ -
        IS_IRQ_TIST_OV  = 1<<13, /* Time Stamp Timer Overflow
(YUKON only) */ IS_IRQ_SENSOR   = 1<<12, /* IRQ from Sensor (YUKON
only) */ IS_IRQ_MST_ERR = 1<<11, /* IRQ master error detected */
@@ -230,6 +228,12 @@
        IS_M2_PAR_ERR   = 1<<2, /* MAC 2 Parity Error */
        IS_R1_PAR_ERR   = 1<<1, /* Queue R1 Parity Error */
        IS_R2_PAR_ERR   = 1<<0, /* Queue R2 Parity Error */
+
+       IS_ERR_MSK      = IS_IRQ_MST_ERR | IS_IRQ_STAT
+                       | IS_NO_STAT_M1 | IS_NO_STAT_M2
+                       | IS_RAM_RD_PAR | IS_RAM_WR_PAR
+                       | IS_M1_PAR_ERR | IS_M2_PAR_ERR
+                       | IS_R1_PAR_ERR | IS_R2_PAR_ERR,
 };
 
 /*     B2_TST_CTRL1     8 bit  Test Control Register 1 */
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to