scsi: hisi_sas: print PHY RX errors count for later revision of v3 hw
authorXiaofei Tan <tanxiaofei@huawei.com>
Thu, 28 Feb 2019 14:50:59 +0000 (22:50 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 7 Mar 2019 00:26:46 +0000 (19:26 -0500)
commitaaeb82323d12f3b61015878e035d74600e1f2c85
tree840ed2cff889d8e34a1d3fcdf5f71dc8b9d6590f
parent4790595723d4b833b18c994973d39f9efb842887
scsi: hisi_sas: print PHY RX errors count for later revision of v3 hw

The later revision of v3 hw has added an function of interrupt coalesce
according to time for PHY RX errors. We set the coalesce time to 1s.  Then
we print PHY RX errors count when PHY RX errors happen, and don't need to
worry that there may be too much log prints.

Besides, we use hisi_sas_phy.lock to protect error count value. Because we
update them by calling phy_get_events_v3_hw(), which is also used by core
driver (for get PHY events function).

We relocate phy_get_events_v3_hw() to avoid a further declaration.

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>
drivers/scsi/hisi_sas/hisi_sas.h
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c