]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
scsi: hisi_sas: workaround a SoC SATA IO processing bug
authorXiaofei Tan <tanxiaofei@huawei.com>
Mon, 10 Apr 2017 13:21:57 +0000 (21:21 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 12 Apr 2017 02:01:04 +0000 (22:01 -0400)
commit32ccba52f128dbaee87c0bc5b45403f484c7e013
treedc9c96e4d44d34c012e2b82f2d62a92944f4dfec
parentc7b9d369e4073399f97e6e090570f7df80f050dc
scsi: hisi_sas: workaround a SoC SATA IO processing bug

This patch provides a workaround a SoC bug where SATA IPTTs for
different devices may conflict.

The workaround solution requests the following:
1. SATA device id must be even and not equal to SAS IPTT.
2. SATA device can not share the same IPTT with other SAS or
   SATA device.

Besides we shall consider IPTT value 0 is reserved for another SoC bug
(STP device open link at firstly after SAS controller reset).

To sum up, the solution is: Each SATA device uses independent and
continuous 32 even IPTT from 64 to 4094, then v2 hw can only support 63
SATA devices.  All SAS device(SSP/SMP devices) share odd IPTT value from
1 to 4095.

Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hisi_sas/hisi_sas.h
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c