[openib-general] Re: [PATCH]: was Re: LLTX and netif_stop_queue

Tommy Christensen tommy.christensen at tpack.net
Thu Jan 20 05:51:25 PST 2005


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





More information about the general mailing list