Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6986be4 authored by James Bottomley's avatar James Bottomley
Browse files

Merge remote-tracking branch 'mkp-scsi/4.6/scsi-fixes' into misc

parents b86c75fd ba083116
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -958,23 +958,22 @@ static void fnic_fcpio_icmnd_cmpl_handler(struct fnic *fnic,
	case FCPIO_INVALID_PARAM:    /* some parameter in request invalid */
	case FCPIO_REQ_NOT_SUPPORTED:/* request type is not supported */
	default:
		shost_printk(KERN_ERR, fnic->lport->host, "hdr status = %s\n",
			     fnic_fcpio_status_to_str(hdr_status));
		sc->result = (DID_ERROR << 16) | icmnd_cmpl->scsi_status;
		break;
	}

	if (hdr_status != FCPIO_SUCCESS) {
		atomic64_inc(&fnic_stats->io_stats.io_failures);
		shost_printk(KERN_ERR, fnic->lport->host, "hdr status = %s\n",
			     fnic_fcpio_status_to_str(hdr_status));
	}
	/* Break link with the SCSI command */
	CMD_SP(sc) = NULL;
	CMD_FLAGS(sc) |= FNIC_IO_DONE;

	spin_unlock_irqrestore(io_lock, flags);

	if (hdr_status != FCPIO_SUCCESS) {
		atomic64_inc(&fnic_stats->io_stats.io_failures);
		shost_printk(KERN_ERR, fnic->lport->host, "hdr status = %s\n",
			     fnic_fcpio_status_to_str(hdr_status));
	}

	fnic_release_ioreq_buf(fnic, io_req, sc);

	mempool_free(io_req, fnic->io_req_pool);
+3 −2
Original line number Diff line number Diff line
@@ -2860,7 +2860,7 @@ lpfc_online(struct lpfc_hba *phba)
	}

	vports = lpfc_create_vport_work_array(phba);
	if (vports != NULL)
	if (vports != NULL) {
		for (i = 0; i <= phba->max_vports && vports[i] != NULL; i++) {
			struct Scsi_Host *shost;
			shost = lpfc_shost_from_vport(vports[i]);
@@ -2877,6 +2877,7 @@ lpfc_online(struct lpfc_hba *phba)
			}
			spin_unlock_irq(shost->host_lock);
		}
	}
	lpfc_destroy_vport_work_array(phba, vports);

	lpfc_unblock_mgmt_io(phba);
+2 −1
Original line number Diff line number Diff line
@@ -6656,13 +6656,14 @@ megasas_mgmt_fw_ioctl(struct megasas_instance *instance,
	}

	for (i = 0; i < ioc->sge_count; i++) {
		if (kbuff_arr[i])
		if (kbuff_arr[i]) {
			dma_free_coherent(&instance->pdev->dev,
					  le32_to_cpu(kern_sge32[i].length),
					  kbuff_arr[i],
					  le32_to_cpu(kern_sge32[i].phys_addr));
			kbuff_arr[i] = NULL;
		}
	}

	megasas_return_cmd(instance, cmd);
	return error;
+9 −7
Original line number Diff line number Diff line
@@ -1872,15 +1872,17 @@ static int qlt_check_reserve_free_req(struct scsi_qla_host *vha,
		else
			vha->req->cnt = vha->req->length -
			    (vha->req->ring_index - cnt);
	}

		if (unlikely(vha->req->cnt < (req_cnt + 2))) {
			ql_dbg(ql_dbg_io, vha, 0x305a,
			    "qla_target(%d): There is no room in the request ring: vha->req->ring_index=%d, vha->req->cnt=%d, req_cnt=%d Req-out=%d Req-in=%d Req-Length=%d\n",
			    vha->vp_idx, vha->req->ring_index,
		    vha->req->cnt, req_cnt, cnt, cnt_in, vha->req->length);
			    vha->req->cnt, req_cnt, cnt, cnt_in,
			    vha->req->length);
			return -EAGAIN;
		}
	}

	vha->req->cnt -= req_cnt;

	return 0;
+10 −2
Original line number Diff line number Diff line
@@ -278,8 +278,16 @@ int scsi_set_sense_information(u8 *buf, int buf_len, u64 info)
		ucp[3] = 0;
		put_unaligned_be64(info, &ucp[4]);
	} else if ((buf[0] & 0x7f) == 0x70) {
		/*
		 * Only set the 'VALID' bit if we can represent the value
		 * correctly; otherwise just fill out the lower bytes and
		 * clear the 'VALID' flag.
		 */
		if (info <= 0xffffffffUL)
			buf[0] |= 0x80;
		put_unaligned_be64(info, &buf[3]);
		else
			buf[0] &= 0x7f;
		put_unaligned_be32((u32)info, &buf[3]);
	}

	return 0;
Loading