Skip to content

Commit

Permalink
Tsi108_eth: remove not needed code
Browse files Browse the repository at this point in the history
Code clean-up for tsi108_eth network driver.
This patch removes not needed dummy read and the corresponding comment.
The PHY logic requires two reads from the status register to get
current link status. This is done correctly inside mii_check_media().

Signed-off-by: Alexandre Bounine <alexandreb@tundra.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Alex Bounine authored and Jeff Garzik committed Feb 11, 2008
1 parent 6a87155 commit 85bbe21
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions drivers/net/tsi108_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,18 +297,11 @@ static void tsi108_check_phy(struct net_device *dev)
u32 speed;
unsigned long flags;

/* Do a dummy read, as for some reason the first read
* after a link becomes up returns link down, even if
* it's been a while since the link came up.
*/

spin_lock_irqsave(&phy_lock, flags);

if (!data->phy_ok)
goto out;

tsi108_read_mii(data, MII_BMSR);

duplex = mii_check_media(&data->mii_if, netif_msg_link(data), data->init_media);
data->init_media = 0;

Expand Down

0 comments on commit 85bbe21

Please sign in to comment.