]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ata: libata-pmp: add JMicron JMS562 quirk
authorXu Rao <raoxu@uniontech.com>
Wed, 10 Jun 2026 05:28:35 +0000 (13:28 +0800)
committerNiklas Cassel <cassel@kernel.org>
Wed, 10 Jun 2026 09:39:37 +0000 (11:39 +0200)
JMicron JMS562, as used in QNAP QDA-A2AR RAID1 adapters, may
keep the exported ATA device not ready while the array is rebuilding.

In this state, libata may repeatedly try to softreset and classify
the fan-out link.  On the affected adapter, this can time out, make
PMP/SCR access fail, and eventually disable the fan-out link before
the RAID volume is exported.

A failing boot shows the fan-out link failing SRST, PMP access
timing out, SCR read failing, and the link being disabled:

  ata4.00: softreset failed (device not ready)
  ata4.15: qc timeout after 3000 msecs (cmd 0xe4)
  ata4.00: failed to read SCR 0 (Emask=0x4)
  ata4.00: failed to recover link after 3 tries, disabling

After that, the root filesystem on the exported RAID volume cannot
be found.

Add JMS562 to the existing JMicron PMP quirk that disables LPM,
avoids softreset on fan-out links, and assumes an ATA device.  This
prevents libata from dropping the exported RAID volume during rebuild
recovery.

Signed-off-by: Xu Rao <raoxu@uniontech.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Niklas Cassel <cassel@kernel.org>
drivers/ata/libata-pmp.c

index 736eaf0586f7da3670d91034b653ca6f4451a1b0..904f418387d11a0d15e49c961339c51de87dd719 100644 (file)
@@ -457,8 +457,13 @@ static void sata_pmp_quirks(struct ata_port *ap)
                 * otherwise.  Don't try hard to recover it.
                 */
                ap->pmp_link[ap->nr_pmp_links - 1].flags |= ATA_LFLAG_NO_RETRY;
-       } else if (vendor == 0x197b && (devid == 0x2352 || devid == 0x0325)) {
+       } else if (vendor == 0x197b &&
+                  (devid == 0x0562 || devid == 0x2352 || devid == 0x0325)) {
                /*
+                * 0x0562: JMicron JMS562, as used in QNAP QDA-A2AR RAID1
+                *         adapters.  The exported device may stay not ready
+                *         while the array is rebuilding, and SRST/classify can
+                *         time out before the RAID volume is exported.
                 * 0x2352: found in Thermaltake BlackX Duet, jmicron JMB350?
                 * 0x0325: jmicron JMB394.
                 */