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

Commit e8e9941b authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull SCSI fixes from James Bottomley:
 "This is actually just a small set of mainly bug fixes for the original
  merge window code plus a few trivial updates and qedi boot from SAN
  support feature patch"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: libfc: pass an error pointer to fc_disc_error()
  scsi: hisi_sas: make several const arrays static
  scsi: qla2xxx: Off by one in qlt_ctio_to_cmd()
  scsi: sg: fix SG_DXFER_FROM_DEV transfers
  scsi: virtio_scsi: always read VPD pages for multiqueue too
  scsi: qedf: fix spelling mistake: "offlading" -> "offloading"
  scsi: qedi: fix another spelling mistake: "alloction" -> "allocation"
  scsi: isci: fix typo in function names
  scsi: cxlflash: return -EFAULT if copy_from_user() fails
  scsi: qedi: Add support for Boot from SAN over iSCSI offload
parents cb0fbbf2 6f37e210
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -3401,11 +3401,12 @@ static int cxlflash_afu_debug(struct cxlflash_cfg *cfg,
		if (is_write) {
			req_flags |= SISL_REQ_FLAGS_HOST_WRITE;

			rc = copy_from_user(kbuf, ubuf, ulen);
			if (unlikely(rc))
			if (copy_from_user(kbuf, ubuf, ulen)) {
				rc = -EFAULT;
				goto out;
			}
		}
	}

	memset(&rcb, 0, sizeof(rcb));
	memset(&asa, 0, sizeof(asa));
@@ -3431,8 +3432,10 @@ static int cxlflash_afu_debug(struct cxlflash_cfg *cfg,
		goto out;
	}

	if (ulen && !is_write)
		rc = copy_to_user(ubuf, kbuf, ulen);
	if (ulen && !is_write) {
		if (copy_to_user(ubuf, kbuf, ulen))
			rc = -EFAULT;
	}
out:
	kfree(buf);
	dev_dbg(dev, "%s: returning rc=%d\n", __func__, rc);
+5 −5
Original line number Diff line number Diff line
@@ -1693,7 +1693,7 @@ static int prep_ssp_v2_hw(struct hisi_hba *hisi_hba,

static int parse_trans_tx_err_code_v2_hw(u32 err_msk)
{
	const u8 trans_tx_err_code_prio[] = {
	static const u8 trans_tx_err_code_prio[] = {
		TRANS_TX_OPEN_FAIL_WITH_IT_NEXUS_LOSS,
		TRANS_TX_ERR_PHY_NOT_ENABLE,
		TRANS_TX_OPEN_CNX_ERR_WRONG_DESTINATION,
@@ -1738,7 +1738,7 @@ static int parse_trans_tx_err_code_v2_hw(u32 err_msk)

static int parse_trans_rx_err_code_v2_hw(u32 err_msk)
{
	const u8 trans_rx_err_code_prio[] = {
	static const u8 trans_rx_err_code_prio[] = {
		TRANS_RX_ERR_WITH_RXFRAME_CRC_ERR,
		TRANS_RX_ERR_WITH_RXFIS_8B10B_DISP_ERR,
		TRANS_RX_ERR_WITH_RXFRAME_HAVE_ERRPRM,
@@ -1784,7 +1784,7 @@ static int parse_trans_rx_err_code_v2_hw(u32 err_msk)

static int parse_dma_tx_err_code_v2_hw(u32 err_msk)
{
	const u8 dma_tx_err_code_prio[] = {
	static const u8 dma_tx_err_code_prio[] = {
		DMA_TX_UNEXP_XFER_ERR,
		DMA_TX_UNEXP_RETRANS_ERR,
		DMA_TX_XFER_LEN_OVERFLOW,
@@ -1810,7 +1810,7 @@ static int parse_dma_tx_err_code_v2_hw(u32 err_msk)

static int parse_sipc_rx_err_code_v2_hw(u32 err_msk)
{
	const u8 sipc_rx_err_code_prio[] = {
	static const u8 sipc_rx_err_code_prio[] = {
		SIPC_RX_FIS_STATUS_ERR_BIT_VLD,
		SIPC_RX_PIO_WRSETUP_STATUS_DRQ_ERR,
		SIPC_RX_FIS_STATUS_BSY_BIT_ERR,
@@ -1836,7 +1836,7 @@ static int parse_sipc_rx_err_code_v2_hw(u32 err_msk)

static int parse_dma_rx_err_code_v2_hw(u32 err_msk)
{
	const u8 dma_rx_err_code_prio[] = {
	static const u8 dma_rx_err_code_prio[] = {
		DMA_RX_UNKNOWN_FRM_ERR,
		DMA_RX_DATA_LEN_OVERFLOW,
		DMA_RX_DATA_LEN_UNDERFLOW,
+7 −7
Original line number Diff line number Diff line
@@ -213,7 +213,7 @@ static void sci_task_request_build_ssp_task_iu(struct isci_request *ireq)
 * @task_context:
 *
 */
static void scu_ssp_reqeust_construct_task_context(
static void scu_ssp_request_construct_task_context(
	struct isci_request *ireq,
	struct scu_task_context *task_context)
{
@@ -425,7 +425,7 @@ static void scu_ssp_io_request_construct_task_context(struct isci_request *ireq,
	u8 prot_type = scsi_get_prot_type(scmd);
	u8 prot_op = scsi_get_prot_op(scmd);

	scu_ssp_reqeust_construct_task_context(ireq, task_context);
	scu_ssp_request_construct_task_context(ireq, task_context);

	task_context->ssp_command_iu_length =
		sizeof(struct ssp_cmd_iu) / sizeof(u32);
@@ -472,7 +472,7 @@ static void scu_ssp_task_request_construct_task_context(struct isci_request *ire
{
	struct scu_task_context *task_context = ireq->tc;

	scu_ssp_reqeust_construct_task_context(ireq, task_context);
	scu_ssp_request_construct_task_context(ireq, task_context);

	task_context->control_frame                = 1;
	task_context->priority                     = SCU_TASK_PRIORITY_HIGH;
@@ -495,7 +495,7 @@ static void scu_ssp_task_request_construct_task_context(struct isci_request *ire
 * the command buffer is complete. none Revisit task context construction to
 * determine what is common for SSP/SMP/STP task context structures.
 */
static void scu_sata_reqeust_construct_task_context(
static void scu_sata_request_construct_task_context(
	struct isci_request *ireq,
	struct scu_task_context *task_context)
{
@@ -562,7 +562,7 @@ static void scu_stp_raw_request_construct_task_context(struct isci_request *ireq
{
	struct scu_task_context *task_context = ireq->tc;

	scu_sata_reqeust_construct_task_context(ireq, task_context);
	scu_sata_request_construct_task_context(ireq, task_context);

	task_context->control_frame         = 0;
	task_context->priority              = SCU_TASK_PRIORITY_NORMAL;
@@ -613,7 +613,7 @@ static void sci_stp_optimized_request_construct(struct isci_request *ireq,
	struct scu_task_context *task_context = ireq->tc;

	/* Build the STP task context structure */
	scu_sata_reqeust_construct_task_context(ireq, task_context);
	scu_sata_request_construct_task_context(ireq, task_context);

	/* Copy over the SGL elements */
	sci_request_build_sgl(ireq);
@@ -1401,7 +1401,7 @@ static enum sci_status sci_stp_request_pio_data_out_transmit_data(struct isci_re
 * @data_buffer: The buffer of data to be copied.
 * @length: The length of the data transfer.
 *
 * Copy the data from the buffer for the length specified to the IO reqeust SGL
 * Copy the data from the buffer for the length specified to the IO request SGL
 * specified data region. enum sci_status
 */
static enum sci_status
+1 −1
Original line number Diff line number Diff line
@@ -573,7 +573,7 @@ static void fc_disc_gpn_ft_resp(struct fc_seq *sp, struct fc_frame *fp,
		event = DISC_EV_FAILED;
	}
	if (error)
		fc_disc_error(disc, fp);
		fc_disc_error(disc, ERR_PTR(error));
	else if (event != DISC_EV_NONE)
		fc_disc_done(disc, event);
	fc_frame_free(fp);
+1 −1
Original line number Diff line number Diff line
@@ -1227,7 +1227,7 @@ static void qedf_rport_event_handler(struct fc_lport *lport,

		if (rdata->spp_type != FC_TYPE_FCP) {
			QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC,
			    "Not offlading since since spp type isn't FCP\n");
			    "Not offloading since spp type isn't FCP\n");
			break;
		}
		if (!(rdata->ids.roles & FC_RPORT_ROLE_FCP_TARGET)) {
Loading