* [PATCH] ata: libata-pmp: disable the SEMB port on Marvell 88SM9705
@ 2026-10-28 19:50 Marco Ziliani
2026-11-02 16:05 ` Niklas Cassel
0 siblings, 1 reply; 5+ messages in thread
From: Marco Ziliani @ 2026-10-28 19:50 UTC (permalink / raw)
To: Damien Le Moal, Niklas Cassel
Cc: Kyrylo Biryuk, linux-ide, linux-kernel, stable, Marco Ziliani
The Marvell 88SM9705 is a 1-to-5 SATA port multiplier with one
additional SEMB (SATA Enclosure Management Bridge) port [1]. Ports
0-4 are device ports and port 5 is the SEMB. The number of fan-out
ports in GSCR[2] is 6 when the SEMB is enabled and 5 when it is not,
so on boards without the SEMB there is no link 5 and this quirk does
nothing. That includes the common 8-port PCIe cards that pair an
88SE9215 with an 88SM9705, which report 5 ports.
The SEMB port never answers SRST. libata probes it like a device
port, and every EH round on the PMP ends in a retry loop that lasts
about a minute before EH gives up, then starts over:
ata19.15: Port Multiplier 1.2, 0x1b4b:0x9705 r160, 6 ports, feat 0x1/0x1f
ata19.05: hard resetting link
ata19.05: failed to resume link (SControl 0)
ata19.05: softreset failed (1st FIS failed)
ata19.05: hard resetting link
...
ata20.05: reset failed, giving up
Disk discovery waits for this, including disks on other controllers.
libata.force cannot work around it: the "disable" horkage only takes
effect after IDENTIFY, which the SEMB link never reaches.
Treat port 5 the same way as port 4 of the Marvell 88SM4140 and mark
the link ATA_LFLAG_DISABLED.
Tested by the user who found the problem (see the synodeb link below)
on a Synology DX1215 expansion unit (four 88SM9705 r160 behind a
Marvell 88SE9235), one disk in the DX1215 and one on a separate AHCI
controller, one boot each, Debian 6.12 libata with and without this
change:
without with
"softreset failed" lines 60 0
disk on the separate controller 200.6 s 18.6 s
disk behind an 88SM9705 203.3 s 21.3 s
Each PMP still logs one "failed to resume link (SControl 0)" for port 5
at probe time.
Link: https://www.marvell.com/content/dam/marvell/en/public-collateral/storage/marvell-storage-88sm9705-functional-specifications-2015-06.pdf [1]
Link: https://github.com/rylos/synodeb/discussions/8
Cc: stable@vger.kernel.org
Signed-off-by: Marco Ziliani <rylos78@gmail.com>
---
I don't have this hardware myself: the problem was found and measured
on a DX1215 by a user of synodeb (Debian on Synology NAS units), who
preferred not to send the patch. It is carried in the synodeb kernels.
Kyrylo, your DX1222 has the same 88SE9235 + 88SM9705 chain: if it shows
the same port 5 retry loop, a Tested-by would be very welcome.
---
drivers/ata/libata-pmp.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c
index 904f418387..72bc458568 100644
--- a/drivers/ata/libata-pmp.c
+++ b/drivers/ata/libata-pmp.c
@@ -482,6 +482,19 @@ static void sata_pmp_quirks(struct ata_port *ap)
if (link->pmp == 4)
link->flags |= ATA_LFLAG_DISABLED;
}
+ } else if (vendor == 0x1b4b && devid == 0x9705) {
+ /*
+ * Marvell 88SM9705 quirks
+ *
+ * 1-to-5 PMP with an extra SEMB port. It reports 6 ports and
+ * port 5 is the SEMB, which never answers SRST: EH spends about
+ * a minute per round retrying it, and disk discovery waits for
+ * that. Seen behind a Marvell 88SE9235 in the Synology DX1215.
+ */
+ ata_for_each_link(link, ap, EDGE) {
+ if (link->pmp == 5)
+ link->flags |= ATA_LFLAG_DISABLED;
+ }
}
}
---
base-commit: fb2c3f44a7e14627b9dca8e6b568e6cdc234b40b
change-id: 20261028-pmp-88sm9705-2f741b435f16
Best regards,
--
Marco Ziliani <rylos78@gmail.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ata: libata-pmp: disable the SEMB port on Marvell 88SM9705
2026-10-28 19:50 [PATCH] ata: libata-pmp: disable the SEMB port on Marvell 88SM9705 Marco Ziliani
@ 2026-11-02 16:05 ` Niklas Cassel
2026-11-03 21:57 ` Kyrylo Biryuk
0 siblings, 1 reply; 5+ messages in thread
From: Niklas Cassel @ 2026-11-02 16:05 UTC (permalink / raw)
To: Marco Ziliani
Cc: Damien Le Moal, Kyrylo Biryuk, linux-ide, linux-kernel, stable
On Wed, Oct 28, 2026 at 08:50:18PM +0100, Marco Ziliani wrote:
> I don't have this hardware myself: the problem was found and measured
> on a DX1215 by a user of synodeb (Debian on Synology NAS units), who
> preferred not to send the patch. It is carried in the synodeb kernels.
>
> Kyrylo, your DX1222 has the same 88SE9235 + 88SM9705 chain: if it shows
> the same port 5 retry loop, a Tested-by would be very welcome.
A Tested-by would be nice here :)
Kind regards,
Niklas
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ata: libata-pmp: disable the SEMB port on Marvell 88SM9705
2026-11-02 16:05 ` Niklas Cassel
@ 2026-11-03 21:57 ` Kyrylo Biryuk
2026-11-07 8:13 ` Kyrylo Biryuk
0 siblings, 1 reply; 5+ messages in thread
From: Kyrylo Biryuk @ 2026-11-03 21:57 UTC (permalink / raw)
To: cassel; +Cc: rylos78, dlemoal, linux-ide, linux-kernel, stable
Niklas Cassel wrote:
> A Tested-by would be nice here :)
Happy to test, I just need to prepare the hardware first. I will send
a Tested-by once that is done. Please do not wait for me if the patch
is otherwise ready.
Kyrylo Biryuk
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ata: libata-pmp: disable the SEMB port on Marvell 88SM9705
2026-11-03 21:57 ` Kyrylo Biryuk
@ 2026-11-07 8:13 ` Kyrylo Biryuk
2026-11-07 10:53 ` Marco Ziliani
0 siblings, 1 reply; 5+ messages in thread
From: Kyrylo Biryuk @ 2026-11-07 8:13 UTC (permalink / raw)
To: rylos78; +Cc: cassel, dlemoal, linux-ide, linux-kernel, stable
Tested on a Synology DX1222: four 88SM9705 (0x1b4b:0x9705 r160,
6 ports) behind an 88SE9235 that is passed through to a KVM guest,
6 disks. The same 7.4-rc1 tree built with and without the patch,
one boot each:
softreset reset failed, last disk
failed giving up attached
7.4-rc1, no libata.force 60 12 197 s
7.4-rc1, libata.force=N.05:norst 0 0 70 s
7.4-rc1 + this patch, no force 0 0 11 s
With the patch, each PMP logs one "ataN.05: failed to resume link
(SControl 0)" and port 5 is then left alone. The same disks attach
in all three boots.
Tested-by: Kyrylo Biryuk <illofspeed@gmail.com>
The test boots were scripted and run by an AI coding assistant on
my hardware; I checked the logs.
Kyrylo Biryuk
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ata: libata-pmp: disable the SEMB port on Marvell 88SM9705
2026-11-07 8:13 ` Kyrylo Biryuk
@ 2026-11-07 10:53 ` Marco Ziliani
0 siblings, 0 replies; 5+ messages in thread
From: Marco Ziliani @ 2026-11-07 10:53 UTC (permalink / raw)
To: Kyrylo Biryuk
Cc: Niklas Cassel, Damien Le Moal, linux-ide, linux-kernel, stable
Hi Kyrylo,
On Sat, Nov 07, 2026 at 09:13:35AM +0100, Kyrylo Biryuk wrote:
> softreset reset failed, last disk
> failed giving up attached
> 7.4-rc1, no libata.force 60 12 197 s
> 7.4-rc1, libata.force=N.05:norst 0 0 70 s
> 7.4-rc1 + this patch, no force 0 0 11 s
Thanks a lot for testing, and on a second unit with a different setup.
The norst row shows that the commit message is too strong where it
says libata.force cannot work around the problem: norst on port 5
removes the retry loop, but the last disk still comes up about a
minute later than with the patch. Niklas, Damien, I can send a v2
that says so, or you can reword that sentence when applying, as you
prefer.
Marco
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-07 10:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-28 19:50 [PATCH] ata: libata-pmp: disable the SEMB port on Marvell 88SM9705 Marco Ziliani
2026-11-02 16:05 ` Niklas Cassel
2026-11-03 21:57 ` Kyrylo Biryuk
2026-11-07 8:13 ` Kyrylo Biryuk
2026-11-07 10:53 ` Marco Ziliani
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®