Module Name: src Committed By: msaitoh Date: Mon Apr 17 09:33:00 UTC 2017
Modified Files: src/sys/dev/pci: pci_subr.c pcireg.h Log Message: Use macro. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.172 -r1.173 src/sys/dev/pci/pci_subr.c cvs rdiff -u -r1.125 -r1.126 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.172 src/sys/dev/pci/pci_subr.c:1.173 --- src/sys/dev/pci/pci_subr.c:1.172 Thu Apr 6 08:57:01 2017 +++ src/sys/dev/pci/pci_subr.c Mon Apr 17 09:33:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_subr.c,v 1.172 2017/04/06 08:57:01 msaitoh Exp $ */ +/* $NetBSD: pci_subr.c,v 1.173 2017/04/17 09:33:00 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.172 2017/04/06 08:57:01 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.173 2017/04/17 09:33:00 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_pci.h" @@ -1907,13 +1907,13 @@ pci_conf_print_pcie_cap(const pcireg_t * case 0x0: printf("reserved\n"); break; - case 0x1: + case PCIE_SLCSR_IND_ON: printf("on\n"); break; - case 0x2: + case PCIE_SLCSR_IND_BLINK: printf("blink\n"); break; - case 0x3: + case PCIE_SLCSR_IND_OFF: printf("off\n"); break; } @@ -1922,13 +1922,13 @@ pci_conf_print_pcie_cap(const pcireg_t * case 0x0: printf("reserved\n"); break; - case 0x1: + case PCIE_SLCSR_IND_ON: printf("on\n"); break; - case 0x2: + case PCIE_SLCSR_IND_BLINK: printf("blink\n"); break; - case 0x3: + case PCIE_SLCSR_IND_OFF: printf("off\n"); break; } Index: src/sys/dev/pci/pcireg.h diff -u src/sys/dev/pci/pcireg.h:1.125 src/sys/dev/pci/pcireg.h:1.126 --- src/sys/dev/pci/pcireg.h:1.125 Tue Mar 28 10:47:44 2017 +++ src/sys/dev/pci/pcireg.h Mon Apr 17 09:33:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pcireg.h,v 1.125 2017/03/28 10:47:44 msaitoh Exp $ */ +/* $NetBSD: pcireg.h,v 1.126 2017/04/17 09:33:00 msaitoh Exp $ */ /* * Copyright (c) 1995, 1996, 1999, 2000 @@ -1001,6 +1001,9 @@ typedef u_int8_t pci_revision_t; #define PCIE_SLCSR_HPE __BIT(5) /* Hot Plug Interrupt Enable */ #define PCIE_SLCSR_AIC __BITS(7, 6) /* Attention Indicator Control*/ #define PCIE_SLCSR_PIC __BITS(9, 8) /* Power Indicator Control */ +#define PCIE_SLCSR_IND_ON 0x1 /* Attn/Power Indicator On */ +#define PCIE_SLCSR_IND_BLINK 0x2 /* Attn/Power Indicator Blink */ +#define PCIE_SLCSR_IND_OFF 0x3 /* Attn/Power Indicator Off */ #define PCIE_SLCSR_PCC __BIT(10) /* * Power Controller Control: * 0: Power on, 1: Power off.