]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: hisi_sas: Enable force phy when SATA disk directly connected
authorXingui Yang <yangxingui@huawei.com>
Wed, 12 Mar 2025 09:51:34 +0000 (17:51 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:44:08 +0000 (07:44 +0200)
commit00999e369e9e2ade264ecc210fe3cf765ec8bcb3
treef45b8f401a1d7661b64a2154472c4b94112e01cf
parent31676d55028a3aa2b0f6b5c0b747449b5e9ccb48
scsi: hisi_sas: Enable force phy when SATA disk directly connected

[ Upstream commit 8aa580cd92843b60d4d6331f3b0a9e8409bb70eb ]

when a SATA disk is directly connected the SAS controller determines the
disk to which I/Os are delivered based on the port ID in the DQ entry.

When many phys are disconnected and reconnect, the port ID of phys were
changed and used by other link, resulting in I/O being sent to incorrect
disk. Data inconsistency on the SATA disk may occur during I/O retries
using the old port ID. So enable force phy, then force the command to be
executed in a certain phy, and if the actual phy ID of the port does not
match the phy configured in the command, the chip will stop delivering the
I/O to disk.

Fixes: ce60689e12dd ("scsi: hisi_sas: add v3 code to send ATA frame")
Signed-off-by: Xingui Yang <yangxingui@huawei.com>
Link: https://lore.kernel.org/r/20250312095135.3048379-2-yangxingui@huawei.com
Reviewed-by: Yihang Li <liyihang9@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c