Changeset 27702


Ignore:
Timestamp:
2011-07-20T14:04:29+02:00 (7 years ago)
Author:
nbd
Message:

ar71xx: make sure that rx and interrupts are disabled before issuing the hardware reset

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c

    r27701 r27702  
    424424                         FIFO_CFG5_17 | FIFO_CFG5_SF) 
    425425 
     426static void ag71xx_hw_stop(struct ag71xx *ag) 
     427{ 
     428        /* disable all interrupts and stop the rx engine */ 
     429        ag71xx_wr(ag, AG71XX_REG_INT_ENABLE, 0); 
     430        ag71xx_wr(ag, AG71XX_REG_RX_CTRL, 0); 
     431} 
     432 
    426433static void ag71xx_hw_init(struct ag71xx *ag) 
    427434{ 
    428435        struct ag71xx_platform_data *pdata = ag71xx_get_pdata(ag); 
     436 
     437        ag71xx_hw_stop(ag); 
    429438 
    430439        ag71xx_sb(ag, AG71XX_REG_MAC_CFG1, MAC_CFG1_SR); 
     
    470479        /* enable interrupts */ 
    471480        ag71xx_wr(ag, AG71XX_REG_INT_ENABLE, AG71XX_INT_INIT); 
    472 } 
    473  
    474 static void ag71xx_hw_stop(struct ag71xx *ag) 
    475 { 
    476         /* disable all interrupts and stop the rx engine */ 
    477         ag71xx_wr(ag, AG71XX_REG_INT_ENABLE, 0); 
    478         ag71xx_wr(ag, AG71XX_REG_RX_CTRL, 0); 
    479481} 
    480482 
Note: See TracChangeset for help on using the changeset viewer.