linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
To: netdev@vger.kernel.org
Cc: nfont@linux.vnet.ibm.com, jallen@linux.vnet.ibm.com,
	linuxppc-dev@lists.ozlabs.org,
	Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Subject: [PATCH net-next 7/8] ibmvnic: Set resetting state at earliest possible point
Date: Wed, 23 May 2018 13:38:01 -0500	[thread overview]
Message-ID: <1527100682-23099-8-git-send-email-tlfalcon@linux.vnet.ibm.com> (raw)
In-Reply-To: <1527100682-23099-1-git-send-email-tlfalcon@linux.vnet.ibm.com>

Set device resetting state at the earliest possible point: as soon as a
reset is successfully scheduled. The reset state is toggled off when
all resets have been processed to completion.

Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
---
 drivers/net/ethernet/ibm/ibmvnic.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index f26e1f8..ee51deb 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -1919,7 +1919,6 @@ static void __ibmvnic_reset(struct work_struct *work)
 	netdev = adapter->netdev;
 
 	mutex_lock(&adapter->reset_lock);
-	adapter->resetting = true;
 	reset_state = adapter->state;
 
 	rwi = get_next_rwi(adapter);
@@ -1994,7 +1993,7 @@ static int ibmvnic_reset(struct ibmvnic_adapter *adapter,
 	rwi->reset_reason = reason;
 	list_add_tail(&rwi->list, &adapter->rwi_list);
 	mutex_unlock(&adapter->rwi_lock);
-
+	adapter->resetting = true;
 	netdev_dbg(adapter->netdev, "Scheduling reset (reason %d)\n", reason);
 	schedule_work(&adapter->ibmvnic_reset);
 
-- 
2.7.5

  parent reply	other threads:[~2018-05-23 18:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-23 18:37 [PATCH net-next 0/8] ibmvnic: Failover hardening Thomas Falcon
2018-05-23 18:37 ` [PATCH net-next 1/8] ibmvnic: Mark NAPI flag as disabled when released Thomas Falcon
2018-05-23 18:37 ` [PATCH net-next 2/8] ibmvnic: Introduce active CRQ state Thomas Falcon
2018-05-23 18:37 ` [PATCH net-next 3/8] ibmvnic: Check CRQ command return codes Thomas Falcon
2018-05-23 18:37 ` [PATCH net-next 4/8] ibmvnic: Return error code if init interrupted by transport event Thomas Falcon
2018-05-23 18:37 ` [PATCH net-next 5/8] ibmvnic: Handle error case when setting link state Thomas Falcon
2018-05-23 18:38 ` [PATCH net-next 6/8] ibmvnic: Create separate initialization routine for resets Thomas Falcon
2018-05-23 18:38 ` Thomas Falcon [this message]
2018-05-23 18:38 ` [PATCH net-next 8/8] ibmvnic: Introduce hard reset recovery Thomas Falcon
2018-05-25  2:19 ` [PATCH net-next 0/8] ibmvnic: Failover hardening David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1527100682-23099-8-git-send-email-tlfalcon@linux.vnet.ibm.com \
    --to=tlfalcon@linux.vnet.ibm.com \
    --cc=jallen@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=netdev@vger.kernel.org \
    --cc=nfont@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).