linux-stable/drivers/scsi/pm8001
peter chang 91a43fa61f scsi: pm80xx: Fix command issue sizing
The commands to the controller are sent in fixed sized chunks which are set
per-chip-generation and stashed in iomb_size. The driver fills in structs
matching the register layout and memcpy this to memory shared with the
controller. However, there are two problem cases:

	1) Things like phy_start_req are too large because they share the
	sas_identify_frame definition with libsas, and it includes the crc
	word. This means that it's overwriting the start of the next
	command block, that's ok except if it happens at the end of the
	shared memory area.

	2) Things like set_nvm_data_req which are shared between the HAL
	layers. This means that it's sending 'random' data for things that
	are in the reserved area. So far we haven't found a case where the
	controller FW cares, but sending possible gibberish (for most of
	the structures this is in the reserved area so previously zeroed)
	is not recommended.

Link: https://lore.kernel.org/r/20191114100910.6153-9-deepak.ukey@microchip.com
Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Signed-off-by: peter chang <dpf@google.com>
Signed-off-by: Deepak Ukey <deepak.ukey@microchip.com>
Signed-off-by: Viswas G <Viswas.G@microchip.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-11-19 21:37:33 -05:00
..
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pm80xx_hwi.c scsi: pm80xx: Fix command issue sizing 2019-11-19 21:37:33 -05:00
pm80xx_hwi.h scsi: pm80xx: Increase timeout for pm80xx mpi_uninit_check 2019-11-19 21:37:33 -05:00
pm8001_chips.h
pm8001_ctl.c scsi: pm80xx: Modified the logic to collect IOP event logs 2019-06-27 00:03:21 -04:00
pm8001_ctl.h
pm8001_defs.h scsi: pm80xx: Fix for phy enable/disable functionality 2018-09-11 21:13:08 -04:00
pm8001_hwi.c scsi: pm80xx: Fix command issue sizing 2019-11-19 21:37:33 -05:00
pm8001_hwi.h scsi: pm80xx: Fix for phy enable/disable functionality 2018-09-11 21:13:08 -04:00
pm8001_init.c scsi: pm80xx: Squashed logging cleanup changes 2019-11-19 21:37:33 -05:00
pm8001_sas.c scsi: pm80xx: Fix dereferencing dangling pointer 2019-11-19 21:37:33 -05:00
pm8001_sas.h scsi: pm80xx: Fix command issue sizing 2019-11-19 21:37:33 -05:00