Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 09 May 2020 13:46:19 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 246119] ahci: MFC of r359499 in 12.1-STABLE r359972 breaks cd device detection on JMicron JMB362
Message-ID:  <bug-246119-227-YKqkrTcD36@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-246119-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-246119-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D246119

--- Comment #3 from rk <rk@ronald.org> ---
The following change from r359970 appears to be the culprit:

--- stable/12/sys/dev/ahci/ahci_pci.c   (revision 359969)
+++ stable/12/sys/dev/ahci/ahci_pci.c   (revision 359970)
@@ -247,6 +247,7 @@
        {0x2365197b, 0x00, "JMicron JMB365",    AHCI_Q_NOFORCE},
        {0x2366197b, 0x00, "JMicron JMB366",    AHCI_Q_NOFORCE},
        {0x2368197b, 0x00, "JMicron JMB368",    AHCI_Q_NOFORCE},
+       {0x0585197b, 0x00, "JMicron JMB58x",    0},
        {0x611111ab, 0x00, "Marvell 88SE6111",  AHCI_Q_NOFORCE | AHCI_Q_NOP=
MP |
            AHCI_Q_1CH | AHCI_Q_EDGEIS},
        {0x612111ab, 0x00, "Marvell 88SE6121",  AHCI_Q_NOFORCE | AHCI_Q_NOP=
MP |
@@ -399,6 +400,7 @@
                     !(ahci_ids[i].quirks & AHCI_Q_NOFORCE)))) {
                        /* Do not attach JMicrons with single PCI function.=
 */
                        if (pci_get_vendor(dev) =3D=3D 0x197b &&
+                           (ahci_ids[i].quirks & AHCI_Q_NOFORCE) &&
                            (pci_read_config(dev, 0xdf, 1) & 0x40) =3D=3D 0)
                                return (ENXIO);
                        snprintf(buf, sizeof(buf), "%s AHCI SATA controller=
",


This breaks JMB362. I've added the AHCI_Q_NOFORCE quirk to JMB362 and with
that change it works again. Tested on r360840 with the following patch:

Index: sys/dev/ahci/ahci_pci.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- sys/dev/ahci/ahci_pci.c     (revision 360840)
+++ sys/dev/ahci/ahci_pci.c     (working copy)
@@ -242,7 +242,7 @@
        {0x23238086, 0x00, "Intel DH89xxCC",    0},
        {0x2360197b, 0x00, "JMicron JMB360",    0},
        {0x2361197b, 0x00, "JMicron JMB361",    AHCI_Q_NOFORCE | AHCI_Q_1CH=
},
-       {0x2362197b, 0x00, "JMicron JMB362",    0},
+       {0x2362197b, 0x00, "JMicron JMB362",    AHCI_Q_NOFORCE},
        {0x2363197b, 0x00, "JMicron JMB363",    AHCI_Q_NOFORCE},
        {0x2365197b, 0x00, "JMicron JMB365",    AHCI_Q_NOFORCE},
        {0x2366197b, 0x00, "JMicron JMB366",    AHCI_Q_NOFORCE},

Now JMB362 works again (and cd0 is detected). I don't know if this is by
accident due to the code from r359970 or if JMB362 really needs AHCI_Q_NOFO=
RCE.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-246119-227-YKqkrTcD36>