scsi: libsas: no need to join wide port again in sas_ex_discover_dev()
authorJason Yan <yanaijie@huawei.com>
Mon, 20 May 2019 14:06:00 +0000 (22:06 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 18 Jun 2019 23:46:23 +0000 (19:46 -0400)
commita1b6fb947f92352bc8edab901d773306c5b80b8b
tree4bf8e49f502f890b307303ec0189d6edc82708e2
parenta5c990eea5ddd587bcd9af6dc973a1653c8d94af
scsi: libsas: no need to join wide port again in sas_ex_discover_dev()

Since we are processing events synchronously now, the second call of
sas_ex_join_wide_port() in sas_ex_discover_dev() is not needed. There will
be no races with other works in disco workqueue. So remove the second
sas_ex_join_wide_port().

I did not change the return value of 'res' to error when discover failed
because we need to continue to discover other phys if one phy discover
failed. So let's keep that logic as before and just add a debug log to
detect the failure. And directly return if second fanout expander attatched
to the parent expander because it has nothing to do after the phy is
disabled.

Signed-off-by: Jason Yan <yanaijie@huawei.com>
Reviewed-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/libsas/sas_expander.c