Tue Jan 26 15:30:05 2021 UTC ()
Trailing whitespace


(skrll)
diff -r1.22 -r1.23 src/sys/dev/acpi/acpi_mcfg.c

cvs diff -r1.22 -r1.23 src/sys/dev/acpi/acpi_mcfg.c (expand / switch to unified diff)

--- src/sys/dev/acpi/acpi_mcfg.c 2021/01/26 15:29:41 1.22
+++ src/sys/dev/acpi/acpi_mcfg.c 2021/01/26 15:30:05 1.23
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: acpi_mcfg.c,v 1.22 2021/01/26 15:29:41 skrll Exp $ */ 1/* $NetBSD: acpi_mcfg.c,v 1.23 2021/01/26 15:30:05 skrll Exp $ */
2 2
3/*- 3/*-
4 * Copyright (C) 2015 NONAKA Kimihiro <nonaka@NetBSD.org> 4 * Copyright (C) 2015 NONAKA Kimihiro <nonaka@NetBSD.org>
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -18,27 +18,27 @@ @@ -18,27 +18,27 @@
18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28#include "opt_pci.h" 28#include "opt_pci.h"
29 29
30#include <sys/cdefs.h> 30#include <sys/cdefs.h>
31__KERNEL_RCSID(0, "$NetBSD: acpi_mcfg.c,v 1.22 2021/01/26 15:29:41 skrll Exp $"); 31__KERNEL_RCSID(0, "$NetBSD: acpi_mcfg.c,v 1.23 2021/01/26 15:30:05 skrll Exp $");
32 32
33#include <sys/param.h> 33#include <sys/param.h>
34#include <sys/device.h> 34#include <sys/device.h>
35#include <sys/kmem.h> 35#include <sys/kmem.h>
36#include <sys/systm.h> 36#include <sys/systm.h>
37 37
38#include <dev/pci/pcireg.h> 38#include <dev/pci/pcireg.h>
39#include <dev/pci/pcivar.h> 39#include <dev/pci/pcivar.h>
40#include <dev/pci/pciconf.h> 40#include <dev/pci/pciconf.h>
41#include <dev/pci/pcidevs.h> 41#include <dev/pci/pcidevs.h>
42 42
43#include <dev/acpi/acpireg.h> 43#include <dev/acpi/acpireg.h>
44#include <dev/acpi/acpivar.h> 44#include <dev/acpi/acpivar.h>
@@ -497,27 +497,27 @@ acpimcfg_device_probe(const struct pci_a @@ -497,27 +497,27 @@ acpimcfg_device_probe(const struct pci_a
497 PCIDEV_SET_INVALID(mb, i, j); 497 PCIDEV_SET_INVALID(mb, i, j);
498 } 498 }
499 last_func = 0; 499 last_func = 0;
500 } 500 }
501 } 501 }
502 mb->last_probed = tag; 502 mb->last_probed = tag;
503 503
504 reg = pci_conf_read(pc, tag, PCI_ID_REG); 504 reg = pci_conf_read(pc, tag, PCI_ID_REG);
505 qd = pci_lookup_quirkdata(PCI_VENDOR(reg), PCI_PRODUCT(reg)); 505 qd = pci_lookup_quirkdata(PCI_VENDOR(reg), PCI_PRODUCT(reg));
506 if (qd != NULL && (qd->quirks & PCI_QUIRK_HASEXTCNF) != 0) 506 if (qd != NULL && (qd->quirks & PCI_QUIRK_HASEXTCNF) != 0)
507 force_hasextcnf = true; 507 force_hasextcnf = true;
508 if (qd != NULL && (qd->quirks & PCI_QUIRK_NOEXTCNF) != 0) 508 if (qd != NULL && (qd->quirks & PCI_QUIRK_NOEXTCNF) != 0)
509 force_noextcnf = true; 509 force_noextcnf = true;
510  510
511 /* Probe extended configuration space. */ 511 /* Probe extended configuration space. */
512 if ((!force_hasextcnf) && ((force_noextcnf) || 512 if ((!force_hasextcnf) && ((force_noextcnf) ||
513 ((reg = pci_conf_read(pc, tag, PCI_CONF_SIZE)) == (pcireg_t)-1) 513 ((reg = pci_conf_read(pc, tag, PCI_CONF_SIZE)) == (pcireg_t)-1)
514 || (reg == 0) 514 || (reg == 0)
515 || (alias = acpimcfg_ext_conf_is_aliased(pc, tag)))) { 515 || (alias = acpimcfg_ext_conf_is_aliased(pc, tag)))) {
516 aprint_debug_dev(acpi_sc->sc_dev, 516 aprint_debug_dev(acpi_sc->sc_dev,
517 "MCFG: %03d:%02d:%d: invalid config space " 517 "MCFG: %03d:%02d:%d: invalid config space "
518 "(cfg[0x%03x]=0x%08x, alias=%s)\n", bus, dev, func, 518 "(cfg[0x%03x]=0x%08x, alias=%s)\n", bus, dev, func,
519 PCI_CONF_SIZE, reg, alias ? "true" : "false"); 519 PCI_CONF_SIZE, reg, alias ? "true" : "false");
520 EXTCONF_SET_INVALID(mb, dev, func); 520 EXTCONF_SET_INVALID(mb, dev, func);
521 } 521 }
522 522
523 aprint_debug_dev(acpi_sc->sc_dev, 523 aprint_debug_dev(acpi_sc->sc_dev,