linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/5 v3] Tsi108_eth: remove not needed code
@ 2008-02-11 19:35 Alex Bounine
  2008-02-11 19:50 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Bounine @ 2008-02-11 19:35 UTC (permalink / raw)
  To: jgarzik, netdev; +Cc: linuxppc-dev

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>
---

diff -pNur linux-2.6.24/drivers/net/tsi108_eth.c
linux-2.6.24-fix/drivers/net/tsi108_eth.c
--- linux-2.6.24/drivers/net/tsi108_eth.c	2008-02-06 15:47:35.000000000 -0500
+++ linux-2.6.24-fix/drivers/net/tsi108_eth.c	2008-02-06
15:54:14.000000000 -0500
@@ -297,18 +297,11 @@ static void tsi108_check_phy(struct net_
 	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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 3/5 v3] Tsi108_eth: remove not needed code
  2008-02-11 19:35 [PATCH 3/5 v3] Tsi108_eth: remove not needed code Alex Bounine
@ 2008-02-11 19:50 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2008-02-11 19:50 UTC (permalink / raw)
  To: Alex Bounine; +Cc: netdev, linuxppc-dev

Alex Bounine wrote:
> 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>
> ---
> 
> diff -pNur linux-2.6.24/drivers/net/tsi108_eth.c
> linux-2.6.24-fix/drivers/net/tsi108_eth.c
> --- linux-2.6.24/drivers/net/tsi108_eth.c	2008-02-06 15:47:35.000000000 -0500
> +++ linux-2.6.24-fix/drivers/net/tsi108_eth.c	2008-02-06
> 15:54:14.000000000 -0500
> @@ -297,18 +297,11 @@ static void tsi108_check_phy(struct net_
>  	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);

applied all five, but each one was still corrupted according to git-am. 
  I was able to apply four via patch(1), which is more forgiving, but 
there are still email problems.

As as you can see from the above quoted (last) line, your email client 
is still word-wrapping patches.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-11 19:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-11 19:35 [PATCH 3/5 v3] Tsi108_eth: remove not needed code Alex Bounine
2008-02-11 19:50 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).