Commit 8875cf9c authored by David S. Miller's avatar David S. Miller

Merge branch 'ibmvnic-serialization-fixes'

Juliet Kim says:

====================
net/ibmvnic: serialization fixes

This series includes two fixes. The first improves reset code to allow
linkwatch_event to proceed during reset. The second ensures that no more
than one thread runs in reset at a time.

v2:
- Separate change param reset from do_reset()
- Return IBMVNIC_OPEN_FAILED if __ibmvnic_open fails
- Remove setting wait_for_reset to false from __ibmvnic_reset(), this
  is done in wait_for_reset()
- Move the check for force_reset_recovery from patch 1 to patch 2

v3:
- Restore reset’s successful return in open failure case

v4:
- Change resetting flag access to atomic
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 5aafeb74 7ed5b31f
This diff is collapsed.
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#define IBMVNIC_INVALID_MAP -1 #define IBMVNIC_INVALID_MAP -1
#define IBMVNIC_STATS_TIMEOUT 1 #define IBMVNIC_STATS_TIMEOUT 1
#define IBMVNIC_INIT_FAILED 2 #define IBMVNIC_INIT_FAILED 2
#define IBMVNIC_OPEN_FAILED 3
/* basic structures plus 100 2k buffers */ /* basic structures plus 100 2k buffers */
#define IBMVNIC_IO_ENTITLEMENT_DEFAULT 610305 #define IBMVNIC_IO_ENTITLEMENT_DEFAULT 610305
...@@ -38,6 +39,8 @@ ...@@ -38,6 +39,8 @@
#define IBMVNIC_MAX_LTB_SIZE ((1 << (MAX_ORDER - 1)) * PAGE_SIZE) #define IBMVNIC_MAX_LTB_SIZE ((1 << (MAX_ORDER - 1)) * PAGE_SIZE)
#define IBMVNIC_BUFFER_HLEN 500 #define IBMVNIC_BUFFER_HLEN 500
#define IBMVNIC_RESET_DELAY 100
static const char ibmvnic_priv_flags[][ETH_GSTRING_LEN] = { static const char ibmvnic_priv_flags[][ETH_GSTRING_LEN] = {
#define IBMVNIC_USE_SERVER_MAXES 0x1 #define IBMVNIC_USE_SERVER_MAXES 0x1
"use-server-maxes" "use-server-maxes"
...@@ -1076,7 +1079,8 @@ struct ibmvnic_adapter { ...@@ -1076,7 +1079,8 @@ struct ibmvnic_adapter {
spinlock_t rwi_lock; spinlock_t rwi_lock;
struct list_head rwi_list; struct list_head rwi_list;
struct work_struct ibmvnic_reset; struct work_struct ibmvnic_reset;
bool resetting; struct delayed_work ibmvnic_delayed_reset;
unsigned long resetting;
bool napi_enabled, from_passive_init; bool napi_enabled, from_passive_init;
bool failover_pending; bool failover_pending;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment