]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
scsi: hisi_sas: workaround a v3 hw hilink bug
authorXiaofei Tan <tanxiaofei@huawei.com>
Wed, 2 May 2018 15:56:34 +0000 (23:56 +0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Jun 2018 19:13:18 +0000 (15:13 -0400)
commit70230be356b2da5efef162df41eb3ac5c35a98a0
tree8cae430060f3977eff3e63a32ce3b575e7890a63
parent70bfdcae13c33b0a6277566727244949d91cbe72
scsi: hisi_sas: workaround a v3 hw hilink bug

BugLink: https://bugs.launchpad.net/bugs/1774467
There is an SoC bug of v3 hw development version. When hot- unplugging a
directly attached disk, the PHY down interrupt may not happen. It is
very easy to appear on some boards.

When this issue occurs, the controller will receive many invalid dword
frames, and the "alos" fields of register HILINK_ERR_DFX can indicate
that disk was unplugged.

As an workaround solution, this patch detects this issue in the channel
interrupt, and workaround it by following steps:

 - Disable the PHY
 - Clear error code and interrupt
 - Enable the PHY

Then the HW will reissue PHY down interrupt.

Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit f70c1251deb5ab17dec70119c03f2428288ebada linux-next)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c