The START_SP_W_RETRIES macro incorrectly checked _rval with a positive EAGAIN, despite qla2x00_start_sp consistently returning -EAGAIN for retriable conditions. This mismatch could cause improper looping behavior, failing to retry as intended and potentially leading to unintended results in the system. This patch fixes the macro to handle EAGAIN as -EAGAIN, ensuring consistent error handling. This change prevents any potential misinterpretation that could introduce unexpected behavior. Signed-off-by: Ingyu Jang <ingyujang25@xxxxxxxxxxx> --- Â drivers/scsi/qla2xxx/qla_init.c | 2 +- Â 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 31fc6a0eca3e..763bdcc47567 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -2063,7 +2063,7 @@ static void qla_marker_sp_done(srb_t *sp, int res) Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â break; \ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â } \ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â _rval = qla2x00_start_sp(_sp); \ -Â Â Â Â Â Â Â Â Â Â Â Â Â Â if (_rval == EAGAIN) \ +Â Â Â Â Â Â Â Â Â Â Â Â Â Â if (_rval == -EAGAIN) \ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â msleep(1); \ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â else \ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â break; \ -- 2.34.1