mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
scsi: ibmvfc: Fix erroneous use of rtas_busy_delay with hcall return code
[ Upstream commit 670106eb4c8b23475f8c2b3416005a312afa622f ] Commit0217a272fe("scsi: ibmvfc: Store return code of H_FREE_SUB_CRQ during cleanup") wrongly changed the busy loop check to use rtas_busy_delay() instead of H_BUSY and H_IS_LONG_BUSY(). The busy return codes for RTAS and hypercalls are not the same. Fix this issue by restoring the use of H_BUSY and H_IS_LONG_BUSY(). Fixes:0217a272fe("scsi: ibmvfc: Store return code of H_FREE_SUB_CRQ during cleanup") Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com> Link: https://lore.kernel.org/r/20230921225435.3537728-5-tyreld@linux.ibm.com Reviewed-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b79c7d684c
commit
d4ad0c1a83
@@ -22,7 +22,6 @@
|
|||||||
#include <linux/bsg-lib.h>
|
#include <linux/bsg-lib.h>
|
||||||
#include <asm/firmware.h>
|
#include <asm/firmware.h>
|
||||||
#include <asm/irq.h>
|
#include <asm/irq.h>
|
||||||
#include <asm/rtas.h>
|
|
||||||
#include <asm/vio.h>
|
#include <asm/vio.h>
|
||||||
#include <scsi/scsi.h>
|
#include <scsi/scsi.h>
|
||||||
#include <scsi/scsi_cmnd.h>
|
#include <scsi/scsi_cmnd.h>
|
||||||
@@ -5802,7 +5801,7 @@ static int ibmvfc_register_scsi_channel(struct ibmvfc_host *vhost,
|
|||||||
irq_failed:
|
irq_failed:
|
||||||
do {
|
do {
|
||||||
rc = 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 (rtas_busy_delay(rc));
|
} while (rc == H_BUSY || H_IS_LONG_BUSY(rc));
|
||||||
reg_failed:
|
reg_failed:
|
||||||
LEAVE;
|
LEAVE;
|
||||||
return rc;
|
return rc;
|
||||||
|
|||||||
Reference in New Issue
Block a user