From 2d63291b352f16d2f20972d83f899d3b97c5f5f4 Mon Sep 17 00:00:00 2001 From: Florian Pose Date: Mon, 28 Jul 2008 08:28:42 +0000 Subject: [PATCH] Fixed missing protection for a spin_lock_irqrestore() call. --- NEWS | 2 ++ devices/e1000/e1000_main-2.6.20-ethercat.c | 4 +++- devices/e1000/e1000_main-2.6.22-ethercat.c | 4 +++- devices/e1000/e1000_main-2.6.24-ethercat.c | 4 +++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index fe7ca2d6..5ea0a644 100644 --- a/NEWS +++ b/NEWS @@ -87,6 +87,8 @@ Changes in version 1.4.0: Hassan. - Fixed unnecessary watchdog executions in e1000 drivers (thanks to Olav Zarges). + - Fixed missing protection for a spin_lock_irqrestore() call in e1000 + drivers from 2.6.20 to 2.6.24 (thanks to Olav Zarges). * Removed the "bus validation" routines. Slave scanning is now done any time the bus topology changes, even during realtime operation. Because of this, the bus_tainted flag was deprecated and removed. diff --git a/devices/e1000/e1000_main-2.6.20-ethercat.c b/devices/e1000/e1000_main-2.6.20-ethercat.c index 698ce609..0c5cdf64 100644 --- a/devices/e1000/e1000_main-2.6.20-ethercat.c +++ b/devices/e1000/e1000_main-2.6.20-ethercat.c @@ -3446,7 +3446,9 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) /* need: count + 2 desc gap to keep tail from touching * head, otherwise try next time */ if (unlikely(e1000_maybe_stop_tx(netdev, tx_ring, count + 2))) { - spin_unlock_irqrestore(&tx_ring->tx_lock, flags); + if (!adapter->ecdev) { + spin_unlock_irqrestore(&tx_ring->tx_lock, flags); + } return NETDEV_TX_BUSY; } diff --git a/devices/e1000/e1000_main-2.6.22-ethercat.c b/devices/e1000/e1000_main-2.6.22-ethercat.c index 5a7b536e..de89ace2 100644 --- a/devices/e1000/e1000_main-2.6.22-ethercat.c +++ b/devices/e1000/e1000_main-2.6.22-ethercat.c @@ -3427,7 +3427,9 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) /* need: count + 2 desc gap to keep tail from touching * head, otherwise try next time */ if (unlikely(e1000_maybe_stop_tx(netdev, tx_ring, count + 2))) { - spin_unlock_irqrestore(&tx_ring->tx_lock, flags); + if (!adapter->ecdev) { + spin_unlock_irqrestore(&tx_ring->tx_lock, flags); + } return NETDEV_TX_BUSY; } diff --git a/devices/e1000/e1000_main-2.6.24-ethercat.c b/devices/e1000/e1000_main-2.6.24-ethercat.c index c5ae603f..00cfaf56 100644 --- a/devices/e1000/e1000_main-2.6.24-ethercat.c +++ b/devices/e1000/e1000_main-2.6.24-ethercat.c @@ -3425,7 +3425,9 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) /* need: count + 2 desc gap to keep tail from touching * head, otherwise try next time */ if (unlikely(e1000_maybe_stop_tx(netdev, tx_ring, count + 2))) { - spin_unlock_irqrestore(&tx_ring->tx_lock, flags); + if (!adapter->ecdev) { + spin_unlock_irqrestore(&tx_ring->tx_lock, flags); + } return NETDEV_TX_BUSY; }