scsi: libsas: Check SMP PHY control function result
authorJohn Garry <john.garry@huawei.com>
Fri, 4 Jan 2019 16:01:27 +0000 (00:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2019 08:21:21 +0000 (09:21 +0100)
commit647e8d791bda75e7a5a7c2a03d464e9763e5e1bb
tree270511ad1a26fe19b91df53e03a2fa1236aefd25
parent182215d7fb1759a4a2bea929ac33f7a3ae90da09
scsi: libsas: Check SMP PHY control function result

[ Upstream commit 01929a65dfa13e18d89264ab1378854a91857e59 ]

Currently the SMP PHY control execution result is checked, however the
function result for the command is not.

As such, we may be missing all potential errors, like SMP FUNCTION FAILED,
INVALID REQUEST FRAME LENGTH, etc., meaning the PHY control request has
failed.

In some scenarios we need to ensure the function result is accepted, so add
a check for this.

Tested-by: Jian Luo <luojian5@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/libsas/sas_expander.c