Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/dev/pci Pull up the following revisions, requested by...



details:   https://anonhg.NetBSD.org/src/rev/3ba1c0ca0041
branches:  netbsd-8
changeset: 1026629:3ba1c0ca0041
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Dec 03 17:54:30 2021 +0000

description:
Pull up the following revisions, requested by msaitoh in ticket #1711:

        sys/dev/pci/ichsmb.c            1.69, 1.71, 1.73-1.75 via patch

- Add Intel 400, 495, and 500 series support.
- Add Intel Jasper Lake and Elkhart Lake support.
- Ignores the SMBALERT# interrupt. Same as other OSes.

diffstat:

 sys/dev/pci/ichsmb.c |  28 ++++++++++++++++------------
 1 files changed, 16 insertions(+), 12 deletions(-)

diffs (86 lines):

diff -r f8a248feae53 -r 3ba1c0ca0041 sys/dev/pci/ichsmb.c
--- a/sys/dev/pci/ichsmb.c      Fri Dec 03 17:39:55 2021 +0000
+++ b/sys/dev/pci/ichsmb.c      Fri Dec 03 17:54:30 2021 +0000
@@ -1,5 +1,5 @@
-/*     $NetBSD: ichsmb.c,v 1.50.6.4 2020/08/05 15:54:30 martin Exp $   */
-/*     $OpenBSD: ichiic.c,v 1.18 2007/05/03 09:36:26 dlg Exp $ */
+/*     $NetBSD: ichsmb.c,v 1.50.6.5 2021/12/03 17:54:30 martin Exp $   */
+/*     $OpenBSD: ichiic.c,v 1.44 2020/10/07 11:23:05 jsg Exp $ */
 
 /*
  * Copyright (c) 2005, 2006 Alexander Yurchenko <grange%openbsd.org@localhost>
@@ -22,7 +22,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.50.6.4 2020/08/05 15:54:30 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.50.6.5 2021/12/03 17:54:30 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -119,6 +119,8 @@
                case PCI_PRODUCT_INTEL_2HS_SMB:
                case PCI_PRODUCT_INTEL_3HS_SMB:
                case PCI_PRODUCT_INTEL_3HS_U_SMB:
+               case PCI_PRODUCT_INTEL_4HS_H_SMB:
+               case PCI_PRODUCT_INTEL_4HS_V_SMB:
                case PCI_PRODUCT_INTEL_CORE4G_M_SMB:
                case PCI_PRODUCT_INTEL_CORE5G_M_SMB:
                case PCI_PRODUCT_INTEL_CMTLK_SMB:
@@ -126,6 +128,8 @@
                case PCI_PRODUCT_INTEL_BSW_PCU_SMB:
                case PCI_PRODUCT_INTEL_APL_SMB:
                case PCI_PRODUCT_INTEL_GLK_SMB:
+               case PCI_PRODUCT_INTEL_EHL_SMB:
+               case PCI_PRODUCT_INTEL_JSL_SMB:
                case PCI_PRODUCT_INTEL_C600_SMBUS:
                case PCI_PRODUCT_INTEL_C600_SMB_0:
                case PCI_PRODUCT_INTEL_C600_SMB_1:
@@ -138,6 +142,9 @@
                case PCI_PRODUCT_INTEL_DH89XXCL_SMB:
                case PCI_PRODUCT_INTEL_C2000_PCU_SMBUS:
                case PCI_PRODUCT_INTEL_C3K_SMBUS_LEGACY:
+               case PCI_PRODUCT_INTEL_495_YU_SMB:
+               case PCI_PRODUCT_INTEL_5HS_H_SMB:
+               case PCI_PRODUCT_INTEL_5HS_LP_SMB:
                        return 1;
                }
        }
@@ -383,11 +390,6 @@
        /*
         * Transfer timeout. Kill the transaction and clear status bits.
         */
-       snprintb(fbuf, sizeof(fbuf), LPCIB_SMB_HS_BITS, st);
-       aprint_error_dev(sc->sc_dev,
-           "exec: op %d, addr 0x%02x, cmdlen %zd, len %zd, "
-           "flags 0x%02x: timeout, status %s\n",
-           op, addr, cmdlen, len, flags, fbuf);
        bus_space_write_1(sc->sc_iot, sc->sc_ioh, LPCIB_SMB_HC,
            LPCIB_SMB_HC_KILL);
        DELAY(ICHIIC_DELAY);
@@ -414,9 +416,14 @@
 
        /* Read status */
        st = bus_space_read_1(sc->sc_iot, sc->sc_ioh, LPCIB_SMB_HS);
+
+       /* Clear status bits */
+       bus_space_write_1(sc->sc_iot, sc->sc_ioh, LPCIB_SMB_HS, st);
+
+       /* XXX Ignore SMBALERT# for now */
        if ((st & LPCIB_SMB_HS_BUSY) != 0 || (st & (LPCIB_SMB_HS_INTR |
            LPCIB_SMB_HS_DEVERR | LPCIB_SMB_HS_BUSERR | LPCIB_SMB_HS_FAILED |
-           LPCIB_SMB_HS_SMBAL | LPCIB_SMB_HS_BDONE)) == 0)
+           LPCIB_SMB_HS_BDONE)) == 0)
                /* Interrupt was not for us */
                return (0);
 
@@ -425,9 +432,6 @@
        printf("%s: intr st %s\n", device_xname(sc->sc_dev), fbuf);
 #endif
 
-       /* Clear status bits */
-       bus_space_write_1(sc->sc_iot, sc->sc_ioh, LPCIB_SMB_HS, st);
-
        /* Check for errors */
        if (st & (LPCIB_SMB_HS_DEVERR | LPCIB_SMB_HS_BUSERR | LPCIB_SMB_HS_FAILED)) {
                sc->sc_i2c_xfer.error = 1;



Home | Main Index | Thread Index | Old Index