Skip to contentSkip to conversation

atl1c:use common_task instead of reset_task and link_chg_task

PATCH Applied [email protected] 2 participants 2 messages Dec 7, 2009 – Dec 9, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 atl1c:use common_task instead of reset_task and link_chg_task

From: Jie Yang <[email protected]>

use common_task instead of reset_task and link_chg_task, so it fix "call cancel_work_sync from the work itself".

---

 drivers/net/atl1c/atl1c.h      |    6 ++-
 drivers/net/atl1c/atl1c_main.c |   72 ++++++++++++++++++---------------------
 2 files changed, 37 insertions(+), 41 deletions(-)
drivers/net/atl1c/atl1c.h +4 -2
index a348a22..b020723 100644
@@ -550,6 +550,9 @@ struct atl1c_adapter {
 #define __AT_TESTING        0x0001
 #define __AT_RESETTING      0x0002
 #define __AT_DOWN           0x0003
+	u8 work_event;
+#define ATL1C_WORK_EVENT_RESET 		0x01
+#define ATL1C_WORK_EVENT_LINK_CHANGE	0x02
 	u32 msg_enable;
 
 	bool have_msi;
@@ -561,8 +564,7 @@ struct atl1c_adapter {
 	spinlock_t tx_lock;
 	atomic_t irq_sem;
 
-	struct work_struct reset_task;
-	struct work_struct link_chg_task;
+	struct work_struct common_task;
 	struct timer_list watchdog_timer;
 	struct timer_list phy_config_timer;
 
drivers/net/atl1c/atl1c_main.c +33 -39

128 lines not on this page · raw message