From: Nikolay Borisov <nik.borisov@suse.com>
To: linux-ide@vger.kernel.org
Cc: dlemoal@kernel.org, cassel@kernel.org, rosenp@gmail.com,
Nikolay Borisov <nik.borisov@suse.com>
Subject: [PATCH v4] ata: sata_dwc_460ex: Don't enable interrupt if libATA core registration fails
Date: Thu, 17 Sep 2026 18:07:07 +0300 [thread overview]
Message-ID: <20260917150707.1643330-1-nik.borisov@suse.com> (raw)
Recent 4bbc16a353a9 commit changed the timing when interrupts are
enabled. However it didn't account for the libATA registration step. So
it's possible that interrupts are enabled when the device is not
registered with libATA core.
Resolve the issue by failing the entire registration process in case of
failure to register with libATA.
Fixes: 4bbc16a353a9 ("ata: sata_dwc_460ex: enable SATA interrupts only after IRQ handler is registered")
Signed-off-by: Nikolay Borisov <nik.borisov@suse.com>
---
Changes since v1:
* Added proper goto label
Changes since v2:
* Rework logic so that interrupts are enabled if everything is successful
and don't call phy_exit otherwise, as the driver is quite broken w.r.t to it.
Changes since v3:
* Revert to the code as in v2 of the patch following a series that has been
merged in the mean time
drivers/ata/sata_dwc_460ex.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c
index 8e3fc713891a..aa816a1a4c54 100644
--- a/drivers/ata/sata_dwc_460ex.c
+++ b/drivers/ata/sata_dwc_460ex.c
@@ -1185,11 +1185,14 @@ static int sata_dwc_probe(struct platform_device *ofdev)
* error_handler() to execute a dummy Softreset EH session
*/
err = ata_host_activate(host, irq, sata_dwc_isr, 0, &sata_dwc_sht);
- if (err)
+ if (err) {
dev_err(dev, "failed to activate host");
+ goto error_out;
+ }
/* Enable SATA Interrupts */
sata_dwc_enable_interrupts(hsdev);
+
return 0;
error_out:
base-commit: 52d19459ca79fef362126e472b9e9a3bfc5020b8
--
2.55.0
next reply other threads:[~2026-09-17 15:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 15:07 Nikolay Borisov [this message]
2026-09-17 18:04 ` [PATCH v4] ata: sata_dwc_460ex: Don't enable interrupt if libATA core registration fails Niklas Cassel
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=20260917150707.1643330-1-nik.borisov@suse.com \
--to=nik.borisov@suse.com \
--cc=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=rosenp@gmail.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