scsi: hisi_sas: optimise port id refresh function
authorXiaofei Tan <tanxiaofei@huawei.com>
Fri, 8 Dec 2017 17:16:35 +0000 (01:16 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 15 Dec 2017 02:25:02 +0000 (21:25 -0500)
commita669bdbf4939ac72eff6b3ae33f771a1ef28448c
tree99a5a87347227f9dea03016b0f181d80b72fcfa7
parent0258141aaab3007949ba0e67c3d28436354429bb
scsi: hisi_sas: optimise port id refresh function

Currently refreshing the PHY port id after reset is done in the rescan
topology function, which is quite late in the reset process. It could be moved
earlier in the process, as the port id can be refreshed once the PHYs become
ready.

In addition to this, we should set the hisi_sas_dev port id to 0xff (invalid
port id) if all PHYs of this port remain down for the same device.

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_main.c