]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
scsi: hisi_sas: workaround STP link SoC bug
authorXiaofei Tan <tanxiaofei@huawei.com>
Mon, 10 Apr 2017 13:21:56 +0000 (21:21 +0800)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Wed, 28 Jun 2017 14:24:06 +0000 (11:24 -0300)
commit88e57f80b62cad2b051a46503851e1645dfe673a
treec5faf7d3896436e8370a7cff0f584c3c0d60974f
parent33521c00346a1988ab47e9465b80fc3de1c989b9
scsi: hisi_sas: workaround STP link SoC bug

BugLink: https://bugs.launchpad.net/bugs/1695999
After resetting the controller, the process of scanning SATA disks
attached to an expander may fail occasionally. The issue is that the
controller can't close the STP link created by target if the max link
time is 0.

To workaround this issue, we reject STP link after resetting the
controller, and change the corresponding PHY to accept STP link only
after receiving data.

We do this check in cq interrupt handler. In order not to reduce
efficiency, we use an variable to control whether we should check and
change PHY to accept STP link.

The function phys_reject_stp_links_v2_hw() should be called after
resetting the controller.

The solution of another SoC bug "SATA IO timeout", that also uses the
same register to control STP link, is not effective before the PHY
accepts STP link.

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>
(cherry picked from commit c7b9d369e4073399f97e6e090570f7df80f050dc)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/scsi/hisi_sas/hisi_sas.h
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c