All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 4.9 01/91] scsi: lpfc: Fix dif and first burst use in write commands
@ 2019-11-22  6:00 Sasha Levin
  2019-11-22  6:00   ` Sasha Levin
                   ` (88 more replies)
  0 siblings, 89 replies; 118+ messages in thread
From: Sasha Levin @ 2019-11-22  6:00 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: James Smart, Dick Kennedy, Martin K . Petersen, Sasha Levin, linux-scsi

From: James Smart <jsmart2021@gmail.com>

[ Upstream commit 7c4042a4d0b7532cfbc90478fd3084b2dab5849e ]

When dif and first burst is used in a write command wqe, the driver was not
properly setting fields in the io command request. This resulted in no dif
bytes being sent and invalid xfer_rdy's, resulting in the io being aborted
by the hardware.

Correct the wqe initializaton when both dif and first burst are used.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/scsi/lpfc/lpfc_scsi.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index d197aa176dee3..d489cc1018b5c 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -2707,6 +2707,7 @@ lpfc_bg_scsi_prep_dma_buf_s3(struct lpfc_hba *phba,
 	int datasegcnt, protsegcnt, datadir = scsi_cmnd->sc_data_direction;
 	int prot_group_type = 0;
 	int fcpdl;
+	struct lpfc_vport *vport = phba->pport;
 
 	/*
 	 * Start the lpfc command prep by bumping the bpl beyond fcp_cmnd
@@ -2812,6 +2813,14 @@ lpfc_bg_scsi_prep_dma_buf_s3(struct lpfc_hba *phba,
 	 */
 	iocb_cmd->un.fcpi.fcpi_parm = fcpdl;
 
+	/*
+	 * For First burst, we may need to adjust the initial transfer
+	 * length for DIF
+	 */
+	if (iocb_cmd->un.fcpi.fcpi_XRdy &&
+	    (fcpdl < vport->cfg_first_burst_size))
+		iocb_cmd->un.fcpi.fcpi_XRdy = fcpdl;
+
 	return 0;
 err:
 	if (lpfc_cmd->seg_cnt)
@@ -3364,6 +3373,7 @@ lpfc_bg_scsi_prep_dma_buf_s4(struct lpfc_hba *phba,
 	int datasegcnt, protsegcnt, datadir = scsi_cmnd->sc_data_direction;
 	int prot_group_type = 0;
 	int fcpdl;
+	struct lpfc_vport *vport = phba->pport;
 
 	/*
 	 * Start the lpfc command prep by bumping the sgl beyond fcp_cmnd
@@ -3479,6 +3489,14 @@ lpfc_bg_scsi_prep_dma_buf_s4(struct lpfc_hba *phba,
 	 */
 	iocb_cmd->un.fcpi.fcpi_parm = fcpdl;
 
+	/*
+	 * For First burst, we may need to adjust the initial transfer
+	 * length for DIF
+	 */
+	if (iocb_cmd->un.fcpi.fcpi_XRdy &&
+	    (fcpdl < vport->cfg_first_burst_size))
+		iocb_cmd->un.fcpi.fcpi_XRdy = fcpdl;
+
 	/*
 	 * If the OAS driver feature is enabled and the lun is enabled for
 	 * OAS, set the oas iocb related flags.
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 118+ messages in thread

end of thread, other threads:[~2019-11-22  7:31 UTC | newest]

Thread overview: 118+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-22  6:00 [PATCH AUTOSEL 4.9 01/91] scsi: lpfc: Fix dif and first burst use in write commands Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 03/91] ARM: dts: imx53-voipac-dmm-668: Fix memory node duplication Sasha Levin
2019-11-22  6:00   ` Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 04/91] parisc: Fix serio address output Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 05/91] parisc: Fix HP SDC hpa " Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 06/91] arm64: mm: Prevent mismatched 52-bit VA support Sasha Levin
2019-11-22  6:00   ` Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 07/91] arm64: smp: Handle errors reported by the firmware Sasha Levin
2019-11-22  6:00   ` Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 08/91] PM / AVS: SmartReflex: NULL check before some freeing functions is not needed Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 09/91] ARM: ks8695: fix section mismatch warning Sasha Levin
2019-11-22  6:00   ` Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 10/91] ACPI / LPSS: Ignore acpi_device_fix_up_power() return value Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 11/91] crypto: user - support incremental algorithm dumps Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 12/91] mwifiex: fix potential NULL dereference and use after free Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 13/91] mwifiex: debugfs: correct histogram spacing, formatting Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 14/91] rtl818x: fix potential use after free Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 15/91] xfs: require both realtime inodes to mount Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 16/91] ubi: Put MTD device after it is not used Sasha Levin
2019-11-22  6:00   ` Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 17/91] ubi: Do not drop UBI device reference before using Sasha Levin
2019-11-22  6:00   ` Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 18/91] microblaze: adjust the help to the real behavior Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 19/91] microblaze: move "... is ready" messages to arch/microblaze/Makefile Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 20/91] gpiolib: Fix return value of gpio_to_desc() stub if !GPIOLIB Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 21/91] VSOCK: bind to random port for VMADDR_PORT_ANY Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 22/91] mtd: rawnand: sunxi: Write pageprog related opcodes to WCMD_SET Sasha Levin
2019-11-22  6:00   ` Sasha Levin
2019-11-22  6:00   ` Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 23/91] btrfs: only track ref_heads in delayed_ref_updates Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 24/91] HID: intel-ish-hid: fixes incorrect error handling Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 25/91] xen/pciback: Check dev_data before using it Sasha Levin
2019-11-22  6:00   ` [Xen-devel] " Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 26/91] pinctrl: xway: fix gpio-hog related boot issues Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 27/91] net/mlx5: Continue driver initialization despite debugfs failure Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 28/91] KVM: s390: unregister debug feature on failing arch init Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 29/91] pinctrl: sh-pfc: sh7264: Fix PFCR3 and PFCR0 register configuration Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 30/91] pinctrl: sh-pfc: sh7734: Fix shifted values in IPSR10 Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 31/91] HID: doc: fix wrong data structure reference for UHID_OUTPUT Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 32/91] dm flakey: Properly corrupt multi-page bios Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 33/91] gfs2: take jdata unstuff into account in do_grow Sasha Levin
2019-11-22  6:00   ` [Cluster-devel] " Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 34/91] xfs: Align compat attrlist_by_handle with native implementation Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 35/91] xfs: Fix bulkstat compat ioctls on x32 userspace Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 36/91] IB/qib: Fix an error code in qib_sdma_verbs_send() Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 37/91] powerpc/book3s/32: fix number of bats in p/v_block_mapped() Sasha Levin
2019-11-22  6:00   ` Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 38/91] powerpc/xmon: fix dump_segments() Sasha Levin
2019-11-22  6:00   ` Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 39/91] drivers/regulator: fix a missing check of return value Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 40/91] serial: max310x: Fix tx_empty() callback Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 41/91] openrisc: Fix broken paths to arch/or32 Sasha Levin
2019-11-22  6:00   ` [OpenRISC] " Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 42/91] RDMA/srp: Propagate ib_post_send() failures to the SCSI mid-layer Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 43/91] scsi: qla2xxx: deadlock by configfs_depend_item Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 44/91] scsi: csiostor: fix incorrect dma device in case of vport Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 45/91] ath6kl: Only use match sets when firmware supports it Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 46/91] ath6kl: Fix off by one error in scan completion Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 47/91] powerpc/prom: fix early DEBUG messages Sasha Levin
2019-11-22  6:00   ` Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 48/91] powerpc/mm: Make NULL pointer deferences explicit on bad page faults Sasha Levin
2019-11-22  6:00   ` Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 49/91] powerpc/44x/bamboo: Fix PCI range Sasha Levin
2019-11-22  6:00   ` Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 50/91] vfio/spapr_tce: Get rid of possible infinite loop Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 51/91] powerpc/powernv/eeh/npu: Fix uninitialized variables in opal_pci_eeh_freeze_status Sasha Levin
2019-11-22  6:00   ` Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 52/91] drbd: ignore "all zero" peer volume sizes in handshake Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 53/91] drbd: reject attach of unsuitable uuids even if connected Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 54/91] drbd: do not block when adjusting "disk-options" while IO is frozen Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 55/91] drbd: fix print_st_err()'s prototype to match the definition Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 56/91] regulator: tps65910: fix a missing check of return value Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 57/91] powerpc/83xx: handle machine check caused by watchdog timer Sasha Levin
2019-11-22  6:00   ` Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 58/91] powerpc/pseries: Fix node leak in update_lmb_associativity_index() Sasha Levin
2019-11-22  6:00   ` Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 59/91] crypto: mxc-scc - fix build warnings on ARM64 Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 60/91] pwm: clps711x: Fix period calculation Sasha Levin
2019-11-22  6:00   ` Sasha Levin
2019-11-22  6:00 ` [PATCH AUTOSEL 4.9 61/91] net/net_namespace: Check the return value of register_pernet_subsys() Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 62/91] um: Make GCOV depend on !KCOV Sasha Levin
2019-11-22  6:01   ` Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 63/91] net: stmicro: fix a missing check of clk_prepare Sasha Levin
2019-11-22  6:01   ` Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 64/91] net: dsa: bcm_sf2: Propagate error value from mdio_write Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 65/91] atl1e: checking the status of atl1e_write_phy_reg Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 66/91] tipc: fix a missing check of genlmsg_put Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 67/91] net/wan/fsl_ucc_hdlc: Avoid double free in ucc_hdlc_probe() Sasha Levin
2019-11-22  6:01   ` Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 68/91] ocfs2: clear journal dirty flag after shutdown journal Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 69/91] vmscan: return NODE_RECLAIM_NOSCAN in node_reclaim() when CONFIG_NUMA is n Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 70/91] lib/genalloc.c: fix allocation of aligned buffer from non-aligned chunk Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 71/91] lib/genalloc.c: use vzalloc_node() to allocate the bitmap Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 72/91] drivers/base/platform.c: kmemleak ignore a known leak Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 73/91] lib/genalloc.c: include vmalloc.h Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 74/91] mtd: Check add_mtd_device() ret code Sasha Levin
2019-11-22  6:01   ` Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 75/91] tipc: fix memory leak in tipc_nl_compat_publ_dump Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 76/91] net/core/neighbour: tell kmemleak about hash tables Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 77/91] net/core/neighbour: fix kmemleak minimal reference count for " Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 78/91] sfc: suppress duplicate nvmem partition types in efx_ef10_mtd_probe Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 79/91] ip_tunnel: Make none-tunnel-dst tunnel port work with lwtunnel Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 80/91] decnet: fix DN_IFREQ_SIZE Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 81/91] tipc: fix skb may be leaky in tipc_link_input Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 82/91] sfc: initialise found bitmap in efx_ef10_mtd_probe Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 83/91] net: fix possible overflow in __sk_mem_raise_allocated() Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 84/91] sctp: don't compare hb_timer expire date before starting it Sasha Levin
2019-11-22  6:01   ` Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 85/91] net: dev: Use unsigned integer as an argument to left-shift Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 86/91] iommu/amd: Fix NULL dereference bug in match_hid_uid Sasha Levin
2019-11-22  6:01   ` Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 87/91] scsi: libsas: Support SATA PHY connection rate unmatch fixing during discovery Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 88/91] ACPI / APEI: Switch estatus pool to use vmalloc memory Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 89/91] scsi: libsas: Check SMP PHY control function result Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 90/91] powerpc/pseries/dlpar: Fix a missing check in dlpar_parse_cc_property() Sasha Levin
2019-11-22  6:01   ` Sasha Levin
2019-11-22  6:01 ` [PATCH AUTOSEL 4.9 91/91] mtd: Remove a debug trace in mtdpart.c Sasha Levin
2019-11-22  6:01   ` Sasha Levin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.