ibmvnic: queue reset when CRQ gets closed during reset

"Linux Kernel Mailing List" <[email protected]>
Newsgroups gmane.linux.kernel.commits.head
Message-ID <[email protected]>
Web:        https://git.kernel.org/torvalds/c/ec95dffa408f0c24c0b358f3723c6ba262190965
Commit:     ec95dffa408f0c24c0b358f3723c6ba262190965
Parent:     583133b35ecaea84590e92e2732d1a472747ca7d
Refname:    refs/heads/master
Author:     Nathan Fontenot <[email protected]>
AuthorDate: Wed Feb 7 13:00:24 2018 -0600
Committer:  David S. Miller <[email protected]>
CommitDate: Thu Feb 8 15:11:15 2018 -0500

    ibmvnic: queue reset when CRQ gets closed during reset
    
    While handling a driver reset we get a H_CLOSED return trying
    to send a CRQ event. When this occurs we need to queue up another
    reset attempt. Without doing this we see instances where the driver
    is left in a closed state because the reset failed and there is no
    further attempts to reset the driver.
    
    Signed-off-by: Nathan Fontenot <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
---
 drivers/net/ethernet/ibm/ibmvnic.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 8dabc9d9dfa6..dd4a2946e1da 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -2914,8 +2914,12 @@ static int ibmvnic_send_crq(struct ibmvnic_adapter *adapter,
 				cpu_to_be64(u64_crq[1]));
 
 	if (rc) {
-		if (rc == H_CLOSED)
+		if (rc == H_CLOSED) {
 			dev_warn(dev, "CRQ Queue closed\n");
+			if (adapter->resetting)
+				ibmvnic_reset(adapter, VNIC_RESET_FATAL);
+		}
+
 		dev_warn(dev, "Send error (rc=%d)\n", rc);
 	}
 
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.