Module Name: src Committed By: msaitoh Date: Thu Jul 13 08:41:20 UTC 2017
Modified Files: src/sys/dev/pci: pci_subr.c pcireg.h Log Message: - Official shortname of LN Requester is LNR, so change PCI_EXTCAP_LN_REQ to PCI_EXTCAP_LNR - Use macro. To generate a diff of this commit: cvs rdiff -u -r1.189 -r1.190 src/sys/dev/pci/pci_subr.c cvs rdiff -u -r1.131 -r1.132 src/sys/dev/pci/pcireg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/pci_subr.c diff -u src/sys/dev/pci/pci_subr.c:1.189 src/sys/dev/pci/pci_subr.c:1.190 --- src/sys/dev/pci/pci_subr.c:1.189 Thu Jun 15 15:38:18 2017 +++ src/sys/dev/pci/pci_subr.c Thu Jul 13 08:41:19 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_subr.c,v 1.189 2017/06/15 15:38:18 flxd Exp $ */ +/* $NetBSD: pci_subr.c,v 1.190 2017/07/13 08:41:19 msaitoh Exp $ */ /* * Copyright (c) 1997 Zubin D. Dittia. All rights reserved. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.189 2017/06/15 15:38:18 flxd Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.190 2017/07/13 08:41:19 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_pci.h" @@ -2087,7 +2087,7 @@ pci_conf_print_pcie_cap(const pcireg_t * break; } printf(" OBFF Supported: "); - switch ((reg & PCIE_DCAP2_OBFF) >> 18) { + switch (__SHIFTOUT(reg, PCIE_DCAP2_OBFF)) { case 0x0: printf("Not supported\n"); break; @@ -2139,7 +2139,7 @@ pci_conf_print_pcie_cap(const pcireg_t * onoff("Emergency Power Reduction Request", reg, PCIE_DCSR2_EMGPWRRED_REQ); printf(" OBFF: "); - switch ((reg & PCIE_DCSR2_OBFF_EN) >> 13) { + switch (__SHIFTOUT(reg, PCIE_DCSR2_OBFF_EN)) { case 0x0: printf("Disabled\n"); break; @@ -3939,7 +3939,7 @@ static struct { NULL }, { PCI_EXTCAP_PASID, "Process Address Space ID", pci_conf_print_pasid_cap }, - { PCI_EXTCAP_LN_REQ, "LN Requester", + { PCI_EXTCAP_LNR, "LN Requester", pci_conf_print_lnr_cap }, { PCI_EXTCAP_DPC, "Downstream Port Containment", pci_conf_print_dpc_cap }, Index: src/sys/dev/pci/pcireg.h diff -u src/sys/dev/pci/pcireg.h:1.131 src/sys/dev/pci/pcireg.h:1.132 --- src/sys/dev/pci/pcireg.h:1.131 Thu Jun 15 06:51:18 2017 +++ src/sys/dev/pci/pcireg.h Thu Jul 13 08:41:19 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pcireg.h,v 1.131 2017/06/15 06:51:18 msaitoh Exp $ */ +/* $NetBSD: pcireg.h,v 1.132 2017/07/13 08:41:19 msaitoh Exp $ */ /* * Copyright (c) 1995, 1996, 1999, 2000 @@ -1433,7 +1433,7 @@ struct pci_rom { #define PCI_EXTCAP_SEC_PCIE 0x0019 /* Secondary PCI Express */ #define PCI_EXTCAP_PMUX 0x001a /* Protocol Multiplexing */ #define PCI_EXTCAP_PASID 0x001b /* Process Address Space ID */ -#define PCI_EXTCAP_LN_REQ 0x001c /* LN Requester */ +#define PCI_EXTCAP_LNR 0x001c /* LN Requester */ #define PCI_EXTCAP_DPC 0x001d /* Downstream Port Containment */ #define PCI_EXTCAP_L1PM 0x001e /* L1 PM Substates */ #define PCI_EXTCAP_PTM 0x001f /* Precision Time Management */