From: Guangshuo Li <lgs201920130244@gmail.com>
To: Ram Vegesna <ram.vegesna@broadcom.com>,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Guangshuo Li <lgs201920130244@gmail.com>,
Thomas Gleixner <tglx@kernel.org>, Kees Cook <kees@kernel.org>,
Daniel Wagner <dwagner@suse.de>, Hannes Reinecke <hare@suse.de>,
James Smart <jsmart2021@gmail.com>,
linux-scsi@vger.kernel.org, target-devel@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Subject: [PATCH] scsi: efct: clear MWI on remove
Date: Sat, 19 Sep 2026 02:13:26 +0800 [thread overview]
Message-ID: <20260918181326.3633765-1-lgs201920130244@gmail.com> (raw)
efct_pci_probe() enables PCI Memory-Write-Invalidate with pci_set_mwi().
The probe failure path clears this state with pci_clear_mwi(), but the
normal remove path does not perform the corresponding cleanup.
pci_disable_device() only disables PCI bus mastering and does not clear
the PCI_COMMAND_INVALIDATE bit. As a result, the MWI configuration can
remain enabled after the driver is removed.
Call pci_clear_mwi() in efct_pci_remove(), matching the probe error
path.
This issue was found by manual code inspection.
Fixes: 4df84e8466242 ("scsi: elx: efct: Driver initialization routines")
Cc: stable@vger.kernel.org
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
---
drivers/scsi/elx/efct/efct_driver.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/elx/efct/efct_driver.c b/drivers/scsi/elx/efct/efct_driver.c
index 07c2f453459e..720bad7b3517 100644
--- a/drivers/scsi/elx/efct/efct_driver.c
+++ b/drivers/scsi/elx/efct/efct_driver.c
@@ -613,6 +613,7 @@ efct_pci_remove(struct pci_dev *pdev)
pci_release_regions(pdev);
+ pci_clear_mwi(pdev);
pci_disable_device(pdev);
}
--
2.43.0
next reply other threads:[~2026-09-18 18:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 18:13 Guangshuo Li [this message]
2026-09-21 12:20 ` Daniel Wagner
2026-09-21 15:13 ` krzk
2026-09-22 2:50 ` Guangshuo Li
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=20260918181326.3633765-1-lgs201920130244@gmail.com \
--to=lgs201920130244@gmail.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=bigeasy@linutronix.de \
--cc=dwagner@suse.de \
--cc=hare@suse.de \
--cc=jsmart2021@gmail.com \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=ram.vegesna@broadcom.com \
--cc=stable@vger.kernel.org \
--cc=target-devel@vger.kernel.org \
--cc=tglx@kernel.org \
/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®