From f68230eea43455e09501292d8eb5cf0b388bcdf1 Mon Sep 17 00:00:00 2001 From: Michal Suchanek Date: Feb 24 2021 09:41:38 +0000 Subject: ibmvfc: store return code of H_FREE_SUB_CRQ during cleanup (bsc#1182632 ltc#191222). --- diff --git a/patches.suse/ibmvfc-store-return-code-of-H_FREE_SUB_CRQ-during-cl.patch b/patches.suse/ibmvfc-store-return-code-of-H_FREE_SUB_CRQ-during-cl.patch new file mode 100644 index 0000000..9f70430 --- /dev/null +++ b/patches.suse/ibmvfc-store-return-code-of-H_FREE_SUB_CRQ-during-cl.patch @@ -0,0 +1,42 @@ +From 3ccefdfd4f8e84cf164a61898a599a8f29755887 Mon Sep 17 00:00:00 2001 +From: Tyrel Datwyler +Date: Thu, 11 Feb 2021 12:57:42 -0600 +Subject: [PATCH 4/4] ibmvfc: store return code of H_FREE_SUB_CRQ during + cleanup + +References: bsc#1182632 ltc#191222 +Patch-mainline: submitted https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=229197 + +The H_FREE_SUB_CRQ hypercall can return a retry delay return code that +indicates the call needs to be retried after a specific amount of time +delay. The error path to free a sub-CRQ in case of a failure during +channel registration fails to capture the return code of H_FREE_SUB_CRQ +which will result in the delay loop being skipped in the case of a retry +delay return code. + +Store the return code result of the H_FREE_SUB_CRQ call such that the +return code check in the delay loop evaluates a meaningful value. + +Fixes: 9288d35d70b5 ("ibmvfc: map/request irq and register Sub-CRQ interrupt handler") +Signed-off-by: Tyrel Datwyler +Acked-by: Michal Suchanek +--- + drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c +index 2e6f3524c6c6..b9a5a61f1cc1 100644 +--- a/drivers/scsi/ibmvscsi/ibmvfc.c ++++ b/drivers/scsi/ibmvscsi/ibmvfc.c +@@ -5672,7 +5672,7 @@ static int ibmvfc_register_scsi_channel(struct ibmvfc_host *vhost, + + irq_failed: + do { +- plpar_hcall_norets(H_FREE_SUB_CRQ, vdev->unit_address, scrq->cookie); ++ rc = plpar_hcall_norets(H_FREE_SUB_CRQ, vdev->unit_address, scrq->cookie); + } while (rc == H_BUSY || H_IS_LONG_BUSY(rc)); + reg_failed: + ibmvfc_free_queue(vhost, scrq); +-- +2.26.2 + diff --git a/series.conf b/series.conf index aa67881..cfa578e 100644 --- a/series.conf +++ b/series.conf @@ -46887,6 +46887,7 @@ patches.suse/ibmvfc-simplify-handling-of-sub-CRQ-initialization.patch patches.suse/ibmvfc-fix-invalid-sub-CRQ-handles-after-hard-reset.patch patches.suse/ibmvfc-treat-H_CLOSED-as-success-during-sub-CRQ-regi.patch + patches.suse/ibmvfc-store-return-code-of-H_FREE_SUB_CRQ-during-cl.patch ######################################################## # end of sorted patches