Loading drivers/net/bnx2.c +55 −56 Original line number Diff line number Diff line Loading @@ -4173,29 +4173,11 @@ bnx2_test_intr(struct bnx2 *bp) } static void bnx2_timer(unsigned long data) bnx2_5706_serdes_timer(struct bnx2 *bp) { struct bnx2 *bp = (struct bnx2 *) data; u32 msg; if (!netif_running(bp->dev)) return; if (atomic_read(&bp->intr_sem) != 0) goto bnx2_restart_timer; msg = (u32) ++bp->fw_drv_pulse_wr_seq; REG_WR_IND(bp, bp->shmem_base + BNX2_DRV_PULSE_MB, msg); bp->stats_blk->stat_FwRxDrop = REG_RD_IND(bp, BNX2_FW_RX_DROP_COUNT); if ((bp->phy_flags & PHY_SERDES_FLAG) && (CHIP_NUM(bp) == CHIP_NUM_5706)) { spin_lock(&bp->phy_lock); if (bp->serdes_an_pending) { if (bp->serdes_an_pending) bp->serdes_an_pending--; } else if ((bp->link_up == 0) && (bp->autoneg & AUTONEG_SPEED)) { u32 bmcr; Loading @@ -4218,11 +4200,9 @@ bnx2_timer(unsigned long data) !(phy2 & 0x20)) { /* no CONFIG */ bmcr &= ~BMCR_ANENABLE; bmcr |= BMCR_SPEED1000 | BMCR_FULLDPLX; bmcr |= BMCR_SPEED1000 | BMCR_FULLDPLX; bnx2_write_phy(bp, MII_BMCR, bmcr); bp->phy_flags |= PHY_PARALLEL_DETECT_FLAG; bp->phy_flags |= PHY_PARALLEL_DETECT_FLAG; } } } Loading @@ -4240,15 +4220,34 @@ bnx2_timer(unsigned long data) bnx2_write_phy(bp, MII_BMCR, bmcr); bp->phy_flags &= ~PHY_PARALLEL_DETECT_FLAG; } } else } else bp->current_interval = bp->timer_interval; spin_unlock(&bp->phy_lock); } static void bnx2_timer(unsigned long data) { struct bnx2 *bp = (struct bnx2 *) data; u32 msg; if (!netif_running(bp->dev)) return; if (atomic_read(&bp->intr_sem) != 0) goto bnx2_restart_timer; msg = (u32) ++bp->fw_drv_pulse_wr_seq; REG_WR_IND(bp, bp->shmem_base + BNX2_DRV_PULSE_MB, msg); bp->stats_blk->stat_FwRxDrop = REG_RD_IND(bp, BNX2_FW_RX_DROP_COUNT); if ((bp->phy_flags & PHY_SERDES_FLAG) && (CHIP_NUM(bp) == CHIP_NUM_5706)) bnx2_5706_serdes_timer(bp); bnx2_restart_timer: mod_timer(&bp->timer, jiffies + bp->current_interval); } Loading Loading
drivers/net/bnx2.c +55 −56 Original line number Diff line number Diff line Loading @@ -4173,29 +4173,11 @@ bnx2_test_intr(struct bnx2 *bp) } static void bnx2_timer(unsigned long data) bnx2_5706_serdes_timer(struct bnx2 *bp) { struct bnx2 *bp = (struct bnx2 *) data; u32 msg; if (!netif_running(bp->dev)) return; if (atomic_read(&bp->intr_sem) != 0) goto bnx2_restart_timer; msg = (u32) ++bp->fw_drv_pulse_wr_seq; REG_WR_IND(bp, bp->shmem_base + BNX2_DRV_PULSE_MB, msg); bp->stats_blk->stat_FwRxDrop = REG_RD_IND(bp, BNX2_FW_RX_DROP_COUNT); if ((bp->phy_flags & PHY_SERDES_FLAG) && (CHIP_NUM(bp) == CHIP_NUM_5706)) { spin_lock(&bp->phy_lock); if (bp->serdes_an_pending) { if (bp->serdes_an_pending) bp->serdes_an_pending--; } else if ((bp->link_up == 0) && (bp->autoneg & AUTONEG_SPEED)) { u32 bmcr; Loading @@ -4218,11 +4200,9 @@ bnx2_timer(unsigned long data) !(phy2 & 0x20)) { /* no CONFIG */ bmcr &= ~BMCR_ANENABLE; bmcr |= BMCR_SPEED1000 | BMCR_FULLDPLX; bmcr |= BMCR_SPEED1000 | BMCR_FULLDPLX; bnx2_write_phy(bp, MII_BMCR, bmcr); bp->phy_flags |= PHY_PARALLEL_DETECT_FLAG; bp->phy_flags |= PHY_PARALLEL_DETECT_FLAG; } } } Loading @@ -4240,15 +4220,34 @@ bnx2_timer(unsigned long data) bnx2_write_phy(bp, MII_BMCR, bmcr); bp->phy_flags &= ~PHY_PARALLEL_DETECT_FLAG; } } else } else bp->current_interval = bp->timer_interval; spin_unlock(&bp->phy_lock); } static void bnx2_timer(unsigned long data) { struct bnx2 *bp = (struct bnx2 *) data; u32 msg; if (!netif_running(bp->dev)) return; if (atomic_read(&bp->intr_sem) != 0) goto bnx2_restart_timer; msg = (u32) ++bp->fw_drv_pulse_wr_seq; REG_WR_IND(bp, bp->shmem_base + BNX2_DRV_PULSE_MB, msg); bp->stats_blk->stat_FwRxDrop = REG_RD_IND(bp, BNX2_FW_RX_DROP_COUNT); if ((bp->phy_flags & PHY_SERDES_FLAG) && (CHIP_NUM(bp) == CHIP_NUM_5706)) bnx2_5706_serdes_timer(bp); bnx2_restart_timer: mod_timer(&bp->timer, jiffies + bp->current_interval); } Loading