diff options
author | Tim Gardner <timg@tpi.com> | 2011-04-20 05:00:49 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-22 00:04:32 -0400 |
commit | cb771838715b1c470bc5735bdae709b33b18e0ad (patch) | |
tree | 9de4b9a992aa2a521bfba73b941310dd8e09ea60 /drivers/net/atl1c/atl1c.h | |
parent | e74fbd030223e29d269f4be17e3dce6de38f4c28 (diff) |
atl1c: Fix work event interrupt/task races
The mechanism used to initiate work events from the interrupt
handler has a classic read/modify/write race between the interrupt
handler that sets the condition, and the worker task that reads and
clears the condition. Close these races by using atomic
bit fields.
Cc: stable@kernel.org
Cc: Jie Yang <jie.yang@atheros.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/atl1c/atl1c.h')
-rw-r--r-- | drivers/net/atl1c/atl1c.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/atl1c/atl1c.h b/drivers/net/atl1c/atl1c.h index 7cb375e0e29c..925929d764ca 100644 --- a/drivers/net/atl1c/atl1c.h +++ b/drivers/net/atl1c/atl1c.h | |||
@@ -566,9 +566,9 @@ struct atl1c_adapter { | |||
566 | #define __AT_TESTING 0x0001 | 566 | #define __AT_TESTING 0x0001 |
567 | #define __AT_RESETTING 0x0002 | 567 | #define __AT_RESETTING 0x0002 |
568 | #define __AT_DOWN 0x0003 | 568 | #define __AT_DOWN 0x0003 |
569 | u8 work_event; | 569 | unsigned long work_event; |
570 | #define ATL1C_WORK_EVENT_RESET 0x01 | 570 | #define ATL1C_WORK_EVENT_RESET 0 |
571 | #define ATL1C_WORK_EVENT_LINK_CHANGE 0x02 | 571 | #define ATL1C_WORK_EVENT_LINK_CHANGE 1 |
572 | u32 msg_enable; | 572 | u32 msg_enable; |
573 | 573 | ||
574 | bool have_msi; | 574 | bool have_msi; |