scsi: qla2xxx: Fix incorrect sign of error code in START_SP_W_RETRIES()

Change the error code EAGAIN to -EAGAIN in START_SP_W_RETRIES() to align
with qla2x00_start_sp() returning negative error codes or QLA_SUCCESS,
preventing logical errors.  Additionally, the '_rval' variable should
store negative error codes to conform to Linux kernel error code
conventions.

Fixes: 9803fb5d27 ("scsi: qla2xxx: Fix task management cmd failure")
Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Message-ID: <20250905075446.381139-3-rongqianfeng@vivo.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Qianfeng Rong 2025-09-05 15:54:44 +08:00 committed by Martin K. Petersen
parent 066b8f3fa8
commit 1f037e3acd
1 changed files with 2 additions and 2 deletions

View File

@ -2059,11 +2059,11 @@ static void qla_marker_sp_done(srb_t *sp, int res)
int cnt = 5; \
do { \
if (_chip_gen != sp->vha->hw->chip_reset || _login_gen != sp->fcport->login_gen) {\
_rval = EINVAL; \
_rval = -EINVAL; \
break; \
} \
_rval = qla2x00_start_sp(_sp); \
if (_rval == EAGAIN) \
if (_rval == -EAGAIN) \
msleep(1); \
else \
break; \