# HG changeset patch # User Florian Pose # Date 1217233844 0 # Node ID c5757cebfaea570fdb82987c0420fd3486be3a37 # Parent dbe4a4219aa5e36669679bc9380bdc7f3f36cb70 merge -c1374 trunk: Missing spin_lock_irqrestore() protection. diff -r dbe4a4219aa5 -r c5757cebfaea NEWS --- a/NEWS Mon Jul 28 08:16:01 2008 +0000 +++ b/NEWS Mon Jul 28 08:30:44 2008 +0000 @@ -8,6 +8,10 @@ * Reading domain process data via sysfs. * Added e1000 driver for kernel 2.6.22. +* 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). * Reduced watchdog function executions in e1000 drivers. * Fixed sync manager configuration problem for some slaves. diff -r dbe4a4219aa5 -r c5757cebfaea devices/e1000/e1000_main-2.6.20-ethercat.c --- a/devices/e1000/e1000_main-2.6.20-ethercat.c Mon Jul 28 08:16:01 2008 +0000 +++ b/devices/e1000/e1000_main-2.6.20-ethercat.c Mon Jul 28 08:30:44 2008 +0000 @@ -3450,7 +3450,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 dbe4a4219aa5 -r c5757cebfaea devices/e1000/e1000_main-2.6.22-ethercat.c --- a/devices/e1000/e1000_main-2.6.22-ethercat.c Mon Jul 28 08:16:01 2008 +0000 +++ b/devices/e1000/e1000_main-2.6.22-ethercat.c Mon Jul 28 08:30:44 2008 +0000 @@ -3431,7 +3431,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; }