WSL2-Linux-Kernel/drivers/scsi/smartpqi
Mahesh Rajashekhara c5641494cd scsi: smartpqi: Fix DMA direction for RAID requests
[ Upstream commit 69695aeaa6 ]

Correct a SOP READ and WRITE DMA flags for some requests.

This update corrects DMA direction issues with SCSI commands removed from
the controller's internal lookup table.

Currently, SCSI READ BLOCK LIMITS (0x5) was removed from the controller
lookup table and exposed a DMA direction flag issue.

SCSI READ BLOCK LIMITS was recently removed from our controller lookup
table so the controller uses the respective IU flag field to set the DMA
data direction. Since the DMA direction is incorrect the FW never completes
the request causing a hang.

Some SCSI commands which use SCSI READ BLOCK LIMITS

      * sg_map
      * mt -f /dev/stX status

After updating controller firmware, users may notice their tape units
failing. This patch resolves the issue.

Also, the AIO path DMA direction is correct.

The DMA direction flag is a day-one bug with no reported BZ.

Fixes: 6c223761eb ("smartpqi: initial commit of Microsemi smartpqi driver")
Link: https://lore.kernel.org/r/165730605618.177165.9054223644512926624.stgit@brunhilda
Reviewed-by: Scott Benesh <scott.benesh@microchip.com>
Reviewed-by: Scott Teel <scott.teel@microchip.com>
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com>
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com>
Signed-off-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@microchip.com>
Signed-off-by: Don Brace <don.brace@microchip.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-08-17 14:23:51 +02:00
..
Kconfig scsi: smartpqi: Change Kconfig menu entry to Microchip 2021-07-19 22:00:56 -04:00
Makefile scsi: smartpqi: add spdx 2019-03-18 16:48:28 -04:00
smartpqi.h scsi: smartpqi: Replace one-element array with flexible-array member 2021-08-17 22:28:39 -04:00
smartpqi_init.c scsi: smartpqi: Fix DMA direction for RAID requests 2022-08-17 14:23:51 +02:00
smartpqi_sas_transport.c scsi: smartpqi: Update copyright notices 2021-07-19 22:00:56 -04:00
smartpqi_sis.c scsi: smartpqi: Add controller handshake during kdump 2021-11-25 09:48:27 +01:00
smartpqi_sis.h scsi: smartpqi: Add controller handshake during kdump 2021-11-25 09:48:27 +01:00