From: Shirong Zhao <shxzhaosr@163.com>
To: "Martin K . Petersen" <mkp@kernel.org>,
Sathya Prakash <sathya.prakash@broadcom.com>,
Sreekanth Reddy <sreekanth.reddy@broadcom.com>,
Dongdong Hao <doubled@leap-io-kernel.com>
Cc: "James E . J . Bottomley" <James.Bottomley@HansenPartnership.com>,
Kashyap Desai <kashyap.desai@broadcom.com>,
Sumit Saxena <sumit.saxena@broadcom.com>,
Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>,
Ranjan Kumar <ranjan.kumar@broadcom.com>,
MPT-FusionLinux.pdl@broadcom.com,
mpi3mr-linuxdrv.pdl@broadcom.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/3] scsi: mpi3mr: check set_identify result in update_links
Date: Fri, 9 Oct 2026 18:23:11 +0800 [thread overview]
Message-ID: <20261009102313.18-3-shxzhaosr@163.com> (raw)
In-Reply-To: <20261009102313.18-1-shxzhaosr@163.com>
mpi3mr_update_links() ignores the return value of
mpi3mr_set_identify(), which leaves the identify struct untouched
on FW query failure (recovery in progress, config page error, bad
IOC status). The phy is then attached using a stale
mr_sas_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@163.com>
---
drivers/scsi/mpi3mr/mpi3mr_transport.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/mpi3mr/mpi3mr_transport.c b/drivers/scsi/mpi3mr/mpi3mr_transport.c
index 232af978d..abe8c4fb9 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_transport.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_transport.c
@@ -1093,9 +1093,9 @@ void mpi3mr_update_links(struct mpi3mr_ioc *mrioc,
mr_sas_phy = &mr_sas_node->phy[phy_number];
mr_sas_phy->attached_handle = handle;
spin_unlock_irqrestore(&mrioc->sas_node_lock, flags);
- if (handle && (link_rate >= MPI3_SAS_NEG_LINK_RATE_1_5)) {
- mpi3mr_set_identify(mrioc, handle,
- &mr_sas_phy->remote_identify);
+ if (handle && link_rate >= MPI3_SAS_NEG_LINK_RATE_1_5 &&
+ !mpi3mr_set_identify(mrioc, handle,
+ &mr_sas_phy->remote_identify)) {
mpi3mr_add_phy_to_an_existing_port(mrioc, mr_sas_node,
mr_sas_phy, mr_sas_phy->remote_identify.sas_address,
hba_port);
next prev parent reply other threads:[~2026-10-09 10:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 10:23 [PATCH 0/3] scsi: " Shirong Zhao
2026-10-09 10:23 ` [PATCH 1/3] scsi: mpt3sas: " Shirong Zhao
2026-10-09 10:23 ` Shirong Zhao [this message]
2026-10-09 10:23 ` [PATCH 3/3] scsi: leapraid: " Shirong Zhao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261009102313.18-3-shxzhaosr@163.com \
--to=shxzhaosr@163.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=MPT-FusionLinux.pdl@broadcom.com \
--cc=doubled@leap-io-kernel.com \
--cc=kashyap.desai@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mkp@kernel.org \
--cc=mpi3mr-linuxdrv.pdl@broadcom.com \
--cc=ranjan.kumar@broadcom.com \
--cc=sathya.prakash@broadcom.com \
--cc=sreekanth.reddy@broadcom.com \
--cc=suganath-prabu.subramani@broadcom.com \
--cc=sumit.saxena@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®