summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>2022-02-20 12:17:53 +0900
committerMartin K. Petersen <martin.petersen@oracle.com>2022-02-22 21:31:19 -0500
commitaa028141ab0bc62c44a84d42f09db35d82df82a2 (patch)
tree8d7f621a5b597f70b303e0a8cc6cb6f568411055 /scripts
parent23c486d19a6c5e4f96dfb25c9439089997588318 (diff)
downloadlinux-aa028141ab0bc62c44a84d42f09db35d82df82a2.tar.gz
scsi: pm8001: Fix NCQ NON DATA command task initialization
In the pm8001_chip_sata_req() and pm80xx_chip_sata_req() functions, all
tasks with a DMA direction of DMA_NONE (no data transfer) are initialized
using the ATAP value 0x04. However, NCQ NON DATA commands, while being
DMA_NONE commands are NCQ commands and need to be initialized using the
value 0x07 for ATAP, similarly to other NCQ commands.

Make sure that NCQ NON DATA command tasks are initialized similarly to
other NCQ commands by also testing the task "use_ncq" field in addition to
the DMA direction. While at it, reorganize the code into a chain of if -
else if - else to avoid useless affectations and debug messages.

Link: https://lore.kernel.org/r/20220220031810.738362-15-damien.lemoal@opensource.wdc.com
Fixes: dbf9bfe61571 ("[SCSI] pm8001: add SAS/SATA HBA driver")
Reviewed-by: Jack Wang <jinpu.wang@ionos.com>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions