Changeset 30549


Ignore:
Timestamp:
2012-02-15T14:47:50+01:00 (6 years ago)
Author:
juhosg
Message:

ramips: raeth: serialize ramips_link_adjust calls

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ramips/files/drivers/net/ramips.c

    r30547 r30549  
    408408ramips_phy_start(struct raeth_priv *re) 
    409409{ 
     410        unsigned long flags; 
     411 
    410412        if (re->phy_dev) { 
    411413                phy_start(re->phy_dev); 
    412414        } else { 
     415                spin_lock_irqsave(&re->phy_lock, flags); 
    413416                re->link = 1; 
    414417                ramips_link_adjust(re); 
     418                spin_unlock_irqrestore(&re->phy_lock, flags); 
    415419        } 
    416420} 
     
    419423ramips_phy_stop(struct raeth_priv *re) 
    420424{ 
     425        unsigned long flags; 
     426 
    421427        if (re->phy_dev) { 
    422428                phy_stop(re->phy_dev); 
    423429        } else { 
     430                spin_lock_irqsave(&re->phy_lock, flags); 
    424431                re->link = 0; 
    425432                ramips_link_adjust(re); 
     433                spin_unlock_irqrestore(&re->phy_lock, flags); 
    426434        } 
    427435} 
Note: See TracChangeset for help on using the changeset viewer.