Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/87186ea60d3a
branches:  netbsd-9
changeset: 1026621:87186ea60d3a
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Dec 03 17:49:41 2021 +0000

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

        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.
- Ignore 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 aba8296352e0 -r 87186ea60d3a sys/dev/pci/ichsmb.c
--- a/sys/dev/pci/ichsmb.c      Fri Dec 03 17:34:19 2021 +0000
+++ b/sys/dev/pci/ichsmb.c      Fri Dec 03 17:49:41 2021 +0000
@@ -1,5 +1,5 @@
-/*     $NetBSD: ichsmb.c,v 1.60.4.2 2020/07/10 11:31:59 martin Exp $   */
-/*     $OpenBSD: ichiic.c,v 1.18 2007/05/03 09:36:26 dlg Exp $ */
+/*     $NetBSD: ichsmb.c,v 1.60.4.3 2021/12/03 17:49:41 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.60.4.2 2020/07/10 11:31:59 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.60.4.3 2021/12/03 17:49:41 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -126,6 +126,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:
@@ -133,6 +135,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:
@@ -145,6 +149,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;
                }
        }
@@ -424,11 +431,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);
@@ -455,9 +457,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);
 
@@ -466,9 +473,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