netdev
[Top] [All Lists]

Re: [PATCH]: was Re: LLTX and netif_stop_queue

To: "David S. Miller" <davem@xxxxxxxxxxxxx>
Subject: Re: [PATCH]: was Re: LLTX and netif_stop_queue
From: Tommy Christensen <tommy.christensen@xxxxxxxxx>
Date: Thu, 20 Jan 2005 14:51:25 +0100
Cc: Roland Dreier <roland@xxxxxxxxxxx>, shemminger@xxxxxxxx, hadi@xxxxxxxxxx, iod00d@xxxxxx, eric.lemoine@xxxxxxxxx, netdev@xxxxxxxxxxx, ak@xxxxxxx, openib-general@xxxxxxxxxx, kaber@xxxxxxxxx
In-reply-to: <20050119230526.393a5184.davem@xxxxxxxxxxxxx>
References: <5cac192f0412230110628749e3@xxxxxxxxxxxxxx> <41CAF444.3000305@xxxxxxxxx> <5cac192f04122408102129af43@xxxxxxxxxxxxxx> <1104240717.1100.66.camel@xxxxxxxxxxxxxxxx> <5cac192f0501021530672a908a@xxxxxxxxxxxxxx> <1104764660.1048.578.camel@xxxxxxxxxxxxxxxx> <52brc68q05.fsf@xxxxxxxxxxx> <5cac192f05010308414a25b548@xxxxxxxxxxxxxx> <527jmu8nbw.fsf@xxxxxxxxxxx> <5cac192f0501030907c755135@xxxxxxxxxxxxxx> <20050103171227.GD7370@xxxxxxxxxxxxxxxxx> <1104812294.1085.53.camel@xxxxxxxxxxxxxxxx> <20050119144711.3fdd3d93.davem@xxxxxxxxxxxxx> <20050119151853.259de49a@xxxxxxxxxxxxxxxxx> <20050119164640.6c67bdfa.davem@xxxxxxxxxxxxx> <52r7kgu5n5.fsf@xxxxxxxxxxx> <20050119230526.393a5184.davem@xxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Thu, 2005-01-20 at 08:05, David S. Miller wrote:
> So I'm going to check this in and push upstream.  Let me know
> if folks find any other errors.

Hi Dave
Sorry to be the one with bad news.
I am in favour of this idea, but there are still issues that
need to be sorted out.

> ===== drivers/net/sungem.c 1.72 vs edited =====
> --- 1.72/drivers/net/sungem.c 2004-11-05 15:56:15 -08:00
> +++ edited/drivers/net/sungem.c       2005-01-19 22:29:14 -08:00

> @@ -932,12 +932,12 @@
>              readl(gp->regs + MAC_RXCFG));
>  
>       spin_lock_irq(&gp->lock);
> -     spin_lock(&gp->tx_lock);
> +     spin_lock(&dev->xmit_lock);
>  
>       gp->reset_task_pending = 2;
>       schedule_work(&gp->reset_task);
>  
> -     spin_unlock(&gp->tx_lock);
> +     spin_unlock(&dev->xmit_lock);
>       spin_unlock_irq(&gp->lock);
>  }
>  

->tx_timeout() can't take dev->xmit_lock, since dev_watchdog
already has it held.

A lot more serious is the fact that ->tx_timeout() and
->hard_start_xmit() are no longer allowed to do this:

  spin_lock_irq()
  ...
  spin_unlock_irq()

since that would leave us with irq's enabled while still
holding the xmit_lock.
This would have to be fixed for non-LLTX drivers as well.

-Tommy



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