Commit d125deba authored by Martin K. Petersen's avatar Martin K. Petersen
Browse files

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: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parents fb1f4568 9877c004
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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)
+2 −2
Original line number Diff line number Diff line
@@ -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; \
+1 −1
Original line number Diff line number Diff line
@@ -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)