netdev
[Top] [All Lists]

RE: tg3 kernel oops when setting flow control while interface is down (2

To: "Daniel Willmann" <d.willmann@xxxxxxxx>, netdev@xxxxxxxxxxx
Subject: RE: tg3 kernel oops when setting flow control while interface is down (2.6.10)
From: "Michael Chan" <mchan@xxxxxxxxxxxx>
Date: Mon, 28 Feb 2005 09:26:25 -0800
Cc: jluebbe@xxxxxxxxx, davem@xxxxxxxxxx
Sender: netdev-bounce@xxxxxxxxxxx
Thread-index: AcUdQbo1knAA0OAjRVOnkMkTkmDJBAAeDANQ
Thread-topic: tg3 kernel oops when setting flow control while interface is down (2.6.10)
> 
> --- drivers/net/tg3.c.old     2005-02-27 23:26:48.000000000 +0100
> +++ drivers/net/tg3.c 2005-02-28 02:01:11.000000000 +0100
> @@ -6155,6 +6155,10 @@
>  {
>       struct tg3 *tp = netdev_priv(dev);
>    
> +     if (!(tp->tg3_flags & TG3_FLAG_INIT_COMPLETE) ||
> +         tp->link_config.phy_is_low_power)
> +             return -EAGAIN;
> +
>       tg3_netif_stop(tp);
>       spin_lock_irq(&tp->lock);
>       spin_lock(&tp->tx_lock);
> 
> --------

I think it is better to just set the PAUSE flags and return 0 if
!netif_running(). This way, the settings will take effect when the device is
subsequently brought up.

Michael



<Prev in Thread] Current Thread [Next in Thread>