# HG changeset patch # User Florian Pose # Date 1217233722 0 # Node ID 04bcd38cf8dc7e89d9674ac1edfb919f3b19de4a # Parent 352a471d388fa6e7b93fbb844ef0f412119936e2 Fixed missing protection for a spin_lock_irqrestore() call. diff -r 352a471d388f -r 04bcd38cf8dc NEWS --- a/NEWS Mon Jul 28 08:17:01 2008 +0000 +++ b/NEWS Mon Jul 28 08:28:42 2008 +0000 @@ -87,6 +87,8 @@ 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 -r 352a471d388f -r 04bcd38cf8dc devices/e1000/e1000_main-2.6.20-ethercat.c --- a/devices/e1000/e1000_main-2.6.20-ethercat.c Mon Jul 28 08:17:01 2008 +0000 +++ b/devices/e1000/e1000_main-2.6.20-ethercat.c Mon Jul 28 08:28:42 2008 +0000 @@ -3446,7 +3446,9 @@ /* 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 -r 352a471d388f -r 04bcd38cf8dc devices/e1000/e1000_main-2.6.22-ethercat.c --- a/devices/e1000/e1000_main-2.6.22-ethercat.c Mon Jul 28 08:17:01 2008 +0000 +++ b/devices/e1000/e1000_main-2.6.22-ethercat.c Mon Jul 28 08:28:42 2008 +0000 @@ -3427,7 +3427,9 @@ /* 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 -r 352a471d388f -r 04bcd38cf8dc devices/e1000/e1000_main-2.6.24-ethercat.c --- a/devices/e1000/e1000_main-2.6.24-ethercat.c Mon Jul 28 08:17:01 2008 +0000 +++ b/devices/e1000/e1000_main-2.6.24-ethercat.c Mon Jul 28 08:28:42 2008 +0000 @@ -3425,7 +3425,9 @@ /* 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; }