mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 17:13:52 +02:00
Merge patch series "scsi: qla2xxx: Fix incorrect sign of error code"
Qianfeng Rong <rongqianfeng@vivo.com> says: qla2x00_start_sp() returns only negative error codes or QLA_SUCCESS. Therefore, comparing its return value with positive error codes (e.g., if (_rval == EAGAIN)) causes logical errors. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
commit
d125deba5c
|
|
@ -1798,7 +1798,7 @@ qla24xx_sadb_update(struct bsg_job *bsg_job)
|
|||
switch (rval) {
|
||||
case QLA_SUCCESS:
|
||||
break;
|
||||
case EAGAIN:
|
||||
case -EAGAIN:
|
||||
msleep(EDIF_MSLEEP_INTERVAL);
|
||||
cnt++;
|
||||
if (cnt < EDIF_RETRY_COUNT)
|
||||
|
|
@ -3649,7 +3649,7 @@ int qla_edif_process_els(scsi_qla_host_t *vha, struct bsg_job *bsg_job)
|
|||
p->e.extra_rx_xchg_address, p->e.extra_control_flags,
|
||||
sp->handle, sp->remap.req.len, bsg_job);
|
||||
break;
|
||||
case EAGAIN:
|
||||
case -EAGAIN:
|
||||
msleep(EDIF_MSLEEP_INTERVAL);
|
||||
cnt++;
|
||||
if (cnt < EDIF_RETRY_COUNT)
|
||||
|
|
|
|||
|
|
@ -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; \
|
||||
|
|
|
|||
|
|
@ -419,7 +419,7 @@ static int qla_nvme_xmt_ls_rsp(struct nvme_fc_local_port *lport,
|
|||
switch (rval) {
|
||||
case QLA_SUCCESS:
|
||||
break;
|
||||
case EAGAIN:
|
||||
case -EAGAIN:
|
||||
msleep(PURLS_MSLEEP_INTERVAL);
|
||||
cnt++;
|
||||
if (cnt < PURLS_RETRY_COUNT)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user