Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Fix wrong usage of PCI_PRODUCT(), ixl(4)



details:   https://anonhg.NetBSD.org/src/rev/05333b07d159
branches:  trunk
changeset: 1006457:05333b07d159
user:      yamaguchi <yamaguchi%NetBSD.org@localhost>
date:      Thu Jan 16 07:19:47 2020 +0000

description:
Fix wrong usage of PCI_PRODUCT(), ixl(4)

diffstat:

 sys/dev/pci/if_ixl.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r 0b500b3e30e6 -r 05333b07d159 sys/dev/pci/if_ixl.c
--- a/sys/dev/pci/if_ixl.c      Thu Jan 16 07:18:08 2020 +0000
+++ b/sys/dev/pci/if_ixl.c      Thu Jan 16 07:19:47 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ixl.c,v 1.22 2020/01/16 07:16:04 yamaguchi Exp $    */
+/*     $NetBSD: if_ixl.c,v 1.23 2020/01/16 07:19:47 yamaguchi Exp $    */
 
 /*
  * Copyright (c) 2013-2015, Intel Corporation
@@ -1050,7 +1050,7 @@
        struct ixl_softc *sc;
        struct pci_attach_args *pa = aux;
        struct ifnet *ifp;
-       pcireg_t memtype, reg;
+       pcireg_t memtype;
        uint32_t firstq, port, ari, func;
        uint64_t phy_types = 0;
        char xnamebuf[32];
@@ -1065,8 +1065,7 @@
            pa->pa_dmat64 : pa->pa_dmat;
        sc->sc_aq_regs = &ixl_pf_aq_regs;
 
-       reg = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_SUBSYS_ID_REG);
-       sc->sc_mac_type = ixl_mactype(PCI_PRODUCT(reg));
+       sc->sc_mac_type = ixl_mactype(PCI_PRODUCT(pa->pa_id));
 
        memtype = pci_mapreg_type(pa->pa_pc, pa->pa_tag, IXL_PCIREG);
        if (pci_mapreg_map(pa, IXL_PCIREG, memtype, 0,



Home | Main Index | Thread Index | Old Index