[PATCH 3/3] scsi: leapraid: check set_identify result in update_links
From: Shirong Zhao
Date: Fri Oct 09 2026 - 06:28:36 EST
leapraid_transport_update_links() ignores the return value of
leapraid_transport_set_identify(), which leaves the identify struct
untouched on FW query failure (recovery in progress, config page
error). The phy is then attached using a stale
card_phy->remote_identify.sas_address from before the failed query.
Fold the call into the if condition so a failed query takes the
existing zeroing else path (same "no valid identify" state as an
invalid handle/rate) instead of attaching with stale data. The next
successful link event re-fills the identify.
Verified against scsi.git fixes (469fa055664b), the current SCSI
fixes tree.
Signed-off-by: Shirong Zhao <shxzhaosr@xxxxxxx>
---
drivers/scsi/leapraid/leapraid_transport.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/leapraid/leapraid_transport.c b/drivers/scsi/leapraid/leapraid_transport.c
index 77ffbd6dd..38e63327d 100644
--- a/drivers/scsi/leapraid/leapraid_transport.c
+++ b/drivers/scsi/leapraid/leapraid_transport.c
@@ -1150,9 +1150,9 @@ void leapraid_transport_update_links(
card_phy->attached_hdl = hdl;
spin_unlock_irqrestore(&adapter->dev_topo.topo_node_lock, flags);
- if (hdl && link_rate >= LEAPRAID_SAS_NEG_LINK_RATE_1_5) {
- leapraid_transport_set_identify(adapter, hdl,
- &card_phy->remote_identify);
+ if (hdl && link_rate >= LEAPRAID_SAS_NEG_LINK_RATE_1_5 &&
+ !leapraid_transport_set_identify(adapter, hdl,
+ &card_phy->remote_identify)) {
if (topo_node->hdl <= adapter->dev_topo.card.phys_num &&
adapter->adapter_attr.enable_mp) {
list_for_each_entry(card_port,