diff options
author | Auke Kok <auke-jan.h.kok@intel.com> | 2006-06-27 09:06:28 -0700 |
---|---|---|
committer | Auke Kok <juke-jan.h.kok@intel.com> | 2006-06-27 09:06:28 -0700 |
commit | 2db10a081c5c1082d58809a1bcf1a6073f4db160 (patch) | |
tree | f54772ef60f2c5bf5f8d602a83d6dc508158a0e0 /drivers/net/e1000/e1000.h | |
parent | acfbc9fde2ec7f304398f6ad7644002e07bf84bc (diff) | |
download | op-kernel-dev-2db10a081c5c1082d58809a1bcf1a6073f4db160.zip op-kernel-dev-2db10a081c5c1082d58809a1bcf1a6073f4db160.tar.gz |
e1000: rework driver hardware reset locking
After studying the driver mac reset code it was found that there
were multiple race conditions possible to reset the unit twice or
bring it e1000_up() double. This fixes all occurences where the
driver needs to reset the mac.
We also remove irq requesting/releasing into _open and _close so
that while the device is _up we will never touch the irq's. This fixes
the double free irq bug that people saw.
To make sure that the watchdog task doesn't cause another race we let
it run as a non-scheduled task.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Diffstat (limited to 'drivers/net/e1000/e1000.h')
-rw-r--r-- | drivers/net/e1000/e1000.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h index 2bc34fb..2b96ad0 100644 --- a/drivers/net/e1000/e1000.h +++ b/drivers/net/e1000/e1000.h @@ -69,7 +69,6 @@ #ifdef NETIF_F_TSO #include <net/checksum.h> #endif -#include <linux/workqueue.h> #include <linux/mii.h> #include <linux/ethtool.h> #include <linux/if_vlan.h> @@ -255,7 +254,6 @@ struct e1000_adapter { spinlock_t tx_queue_lock; #endif atomic_t irq_sem; - struct work_struct watchdog_task; struct work_struct reset_task; uint8_t fc_autoneg; @@ -340,8 +338,13 @@ struct e1000_adapter { #ifdef NETIF_F_TSO boolean_t tso_force; #endif + unsigned long flags; }; +enum e1000_state_t { + __E1000_DRIVER_TESTING, + __E1000_RESETTING, +}; /* e1000_main.c */ extern char e1000_driver_name[]; @@ -349,6 +352,7 @@ extern char e1000_driver_version[]; int e1000_up(struct e1000_adapter *adapter); void e1000_down(struct e1000_adapter *adapter); void e1000_reset(struct e1000_adapter *adapter); +void e1000_reinit_locked(struct e1000_adapter *adapter); int e1000_setup_all_tx_resources(struct e1000_adapter *adapter); void e1000_free_all_tx_resources(struct e1000_adapter *adapter); int e1000_setup_all_rx_resources(struct e1000_adapter *adapter); |