Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci In a close run thing use #define<tab> everywhere...



details:   https://anonhg.NetBSD.org/src/rev/57434d793825
branches:  trunk
changeset: 1029120:57434d793825
user:      skrll <skrll%NetBSD.org@localhost>
date:      Wed Dec 22 07:19:34 2021 +0000

description:
In a close run thing use #define<tab> everywhere for consistency

diffstat:

 sys/dev/pci/if_wmreg.h |  1024 ++++++++++++++++++++++++------------------------
 1 files changed, 512 insertions(+), 512 deletions(-)

diffs (truncated from 1453 to 300 lines):

diff -r 937805ad88c2 -r 57434d793825 sys/dev/pci/if_wmreg.h
--- a/sys/dev/pci/if_wmreg.h    Wed Dec 22 07:16:44 2021 +0000
+++ b/sys/dev/pci/if_wmreg.h    Wed Dec 22 07:19:34 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wmreg.h,v 1.123 2021/12/22 07:16:44 skrll Exp $     */
+/*     $NetBSD: if_wmreg.h,v 1.124 2021/12/22 07:19:34 skrll Exp $     */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -144,7 +144,7 @@
        } erx_ctx;
 } __packed ext_rxdesc_t;
 
-#define EXTRXD_DD_MASK         __BIT(0)
+#define        EXTRXD_DD_MASK          __BIT(0)
 
 /*
  * erxc_rsshash is used for below 2 patterns
@@ -156,57 +156,57 @@
  *     (2) RSS Hash
  *         when RXCSUM.PCSD bit is set
  */
-#define EXTRXC_IP_ID_MASK      __BITS(15,0)
-#define EXTRXC_FRAG_CSUM_MASK  __BITS(31,16)
-#define EXTRXC_IP_ID(rsshash)  __SHIFTOUT(rsshash,ERXC_IP_ID_MASK)
-#define EXTRXC_FRAG_CSUM(rsshash) __SHIFTOUT(rsshash,ERXC_FRAG_CSUM_MASK)
+#define        EXTRXC_IP_ID_MASK       __BITS(15,0)
+#define        EXTRXC_FRAG_CSUM_MASK   __BITS(31,16)
+#define        EXTRXC_IP_ID(rsshash)   __SHIFTOUT(rsshash,ERXC_IP_ID_MASK)
+#define        EXTRXC_FRAG_CSUM(rsshash) __SHIFTOUT(rsshash,ERXC_FRAG_CSUM_MASK)
 
 /* macros for nrxc_mrq */
-#define EXTRXC_RSS_TYPE_MASK           __BITS(3,0)
+#define        EXTRXC_RSS_TYPE_MASK            __BITS(3,0)
 /* __BITS(7,4) is reserved */
-#define EXTRXC_QUEUE_MASK              __BITS(12,8)
+#define        EXTRXC_QUEUE_MASK               __BITS(12,8)
 /* __BITS(31,13) is reserved */
-#define EXTRXC_RSS_TYPE(mrq)   __SHIFTOUT(mrq,EXTRXC_RSS_TYPE_MASK)
-#define EXTRXC_QUEUE(mrq)      __SHIFTOUT(mrq,EXTRXC_QUEUE_MASK)
+#define        EXTRXC_RSS_TYPE(mrq)    __SHIFTOUT(mrq,EXTRXC_RSS_TYPE_MASK)
+#define        EXTRXC_QUEUE(mrq)       __SHIFTOUT(mrq,EXTRXC_QUEUE_MASK)
 
-#define EXTRXC_RSS_TYPE_NONE           0x0 /* No hash computation done. */
-#define EXTRXC_RSS_TYPE_TCP_IPV4       0x1
-#define EXTRXC_RSS_TYPE_IPV4           0x2
-#define EXTRXC_RSS_TYPE_TCP_IPV6       0x3
-#define EXTRXC_RSS_TYPE_IPV6_EX                0x4
-#define EXTRXC_RSS_TYPE_IPV6           0x5
+#define        EXTRXC_RSS_TYPE_NONE            0x0 /* No hash computation done. */
+#define        EXTRXC_RSS_TYPE_TCP_IPV4        0x1
+#define        EXTRXC_RSS_TYPE_IPV4            0x2
+#define        EXTRXC_RSS_TYPE_TCP_IPV6        0x3
+#define        EXTRXC_RSS_TYPE_IPV6_EX         0x4
+#define        EXTRXC_RSS_TYPE_IPV6            0x5
 /*0x6:0xF is reserved. */
 
-#define EXTRXC_STATUS_MASK     __BITS(19,0)
-#define EXTRXC_ERROR_MASK      __BITS(31,20)
-#define EXTRXC_STATUS(err_stat)        __SHIFTOUT(err_stat,EXTRXC_STATUS_MASK)
-#define EXTRXC_ERROR(err_stat) __SHIFTOUT(err_stat,EXTRXC_ERROR_MASK)
+#define        EXTRXC_STATUS_MASK      __BITS(19,0)
+#define        EXTRXC_ERROR_MASK       __BITS(31,20)
+#define        EXTRXC_STATUS(err_stat) __SHIFTOUT(err_stat,EXTRXC_STATUS_MASK)
+#define        EXTRXC_ERROR(err_stat)  __SHIFTOUT(err_stat,EXTRXC_ERROR_MASK)
 
 /* 3:0 is reserved. */
-#define EXTRXC_ERROR_CE                __BIT(4) /* The same as WRX_ER_CE. */
-#define EXTRXC_ERROR_SE                __BIT(5) /* The same as WRX_ER_SE. */
-#define EXTRXC_ERROR_SEQ       __BIT(6) /* The same as WRX_ER_SEQ. */
+#define        EXTRXC_ERROR_CE         __BIT(4) /* The same as WRX_ER_CE. */
+#define        EXTRXC_ERROR_SE         __BIT(5) /* The same as WRX_ER_SE. */
+#define        EXTRXC_ERROR_SEQ        __BIT(6) /* The same as WRX_ER_SEQ. */
 /* 7 is reserved. */
-#define EXTRXC_ERROR_CXE       __BIT(8) /* The same as WRX_ER_CXE. */
-#define EXTRXC_ERROR_TCPE      __BIT(9) /* The same as WRX_ER_TCPE. */
-#define EXTRXC_ERROR_IPE       __BIT(10) /* The same as WRX_ER_IPE. */
-#define EXTRXC_ERROR_RXE       __BIT(11) /* The same as WRX_ER_RXE. */
+#define        EXTRXC_ERROR_CXE        __BIT(8) /* The same as WRX_ER_CXE. */
+#define        EXTRXC_ERROR_TCPE       __BIT(9) /* The same as WRX_ER_TCPE. */
+#define        EXTRXC_ERROR_IPE        __BIT(10) /* The same as WRX_ER_IPE. */
+#define        EXTRXC_ERROR_RXE        __BIT(11) /* The same as WRX_ER_RXE. */
 
-#define EXTRXC_STATUS_DD               __BIT(0) /* The same as WRX_ST_DD. */
-#define EXTRXC_STATUS_EOP              __BIT(1) /* The same as WRX_ST_EOP. */
+#define        EXTRXC_STATUS_DD                __BIT(0) /* The same as WRX_ST_DD. */
+#define        EXTRXC_STATUS_EOP               __BIT(1) /* The same as WRX_ST_EOP. */
 /* 2 is reserved. */
-#define EXTRXC_STATUS_VP               __BIT(3) /* The same as WRX_ST_VP. */
-#define EXTRXC_STATUS_UDPCS            __BIT(4) /* UDP checksum calculated on packet. */
-#define EXTRXC_STATUS_TCPCS            __BIT(5) /* The same as WRX_ST_TCPCS. */
-#define EXTRXC_STATUS_IPCS             __BIT(6) /* The same as WRX_ST_IPCS. */
+#define        EXTRXC_STATUS_VP                __BIT(3) /* The same as WRX_ST_VP. */
+#define        EXTRXC_STATUS_UDPCS             __BIT(4) /* UDP checksum calculated on packet. */
+#define        EXTRXC_STATUS_TCPCS             __BIT(5) /* The same as WRX_ST_TCPCS. */
+#define        EXTRXC_STATUS_IPCS              __BIT(6) /* The same as WRX_ST_IPCS. */
 /* 7 is reserved. */
-#define EXTRXC_STATUS_TST              __BIT(8) /* Time stamp taken. */
-#define EXTRXC_STATUS_IPIDV            __BIT(9) /* IP identification valid. */
-#define EXTRXC_STATUS_UDPV             __BIT(10) /* Valid UDP XSUM. */
+#define        EXTRXC_STATUS_TST               __BIT(8) /* Time stamp taken. */
+#define        EXTRXC_STATUS_IPIDV             __BIT(9) /* IP identification valid. */
+#define        EXTRXC_STATUS_UDPV              __BIT(10) /* Valid UDP XSUM. */
 /* 14:11 is reserved. */
-#define EXTRXC_STATUS_ACK              __BIT(15) /* ACK packet indication. */
-#define EXTRXC_STATUS_PKTTYPE_MASK     __BITS(19,16)
-#define EXTRXC_STATUS_PKTTYPE(status)  __SHIFTOUT(status,EXTRXC_STATUS_PKTTYPE_MASK)
+#define        EXTRXC_STATUS_ACK               __BIT(15) /* ACK packet indication. */
+#define        EXTRXC_STATUS_PKTTYPE_MASK      __BITS(19,16)
+#define        EXTRXC_STATUS_PKTTYPE(status)   __SHIFTOUT(status,EXTRXC_STATUS_PKTTYPE_MASK)
 
 /* advanced RX descriptor for 82575 and newer */
 typedef union nq_rxdesc {
@@ -228,11 +228,11 @@
 } __packed nq_rxdesc_t;
 
 /* for nrxd_paddr macros */
-#define NQRXD_A0_MASK          __BIT(0)
-#define NQRXD_NSE_MASK         __BIT(0)
-#define NQRXD_ADDR_MASK                __BITS(63,1)
+#define        NQRXD_A0_MASK           __BIT(0)
+#define        NQRXD_NSE_MASK          __BIT(0)
+#define        NQRXD_ADDR_MASK         __BITS(63,1)
 /* for nrxd_haddr macros */
-#define NQRXD_DD_MASK          __BIT(0)
+#define        NQRXD_DD_MASK           __BIT(0)
 
 /*
  * nrxc_rsshash is used for below 2 patterns
@@ -244,90 +244,90 @@
  *     (2) RSS Hash
  *         when RXCSUM.PCSD bit is set
  */
-#define NQRXC_IP_ID_MASK       __BITS(15,0)
-#define NQRXC_FRAG_CSUM_MASK   __BITS(31,16)
-#define NQRXC_IP_ID(rsshash)   __SHIFTOUT(rsshash,NRXC_IP_ID_MASK)
-#define NQRXC_FRAG_CSUM(rsshash) __SHIFTOUT(rsshash,NRXC_FRAG_CSUM_MASK)
+#define        NQRXC_IP_ID_MASK        __BITS(15,0)
+#define        NQRXC_FRAG_CSUM_MASK    __BITS(31,16)
+#define        NQRXC_IP_ID(rsshash)    __SHIFTOUT(rsshash,NRXC_IP_ID_MASK)
+#define        NQRXC_FRAG_CSUM(rsshash) __SHIFTOUT(rsshash,NRXC_FRAG_CSUM_MASK)
 
 /* macros for nrxc_misc */
-#define NQRXC_RSS_TYPE_MASK            __BITS(3,0)
-#define NQRXC_PKT_TYPE_ID_MASK         __BITS(11,4)
-#define NQRXC_PKT_TYPE_ETQF_INDEX_MASK __BITS(11,4)
-#define NQRXC_PKT_TYPE_ETQF_VALID_MASK __BIT(15)
-#define NQRXC_PKT_TYPE_VLAN_MASK       __BIT(16)
-#define NQRXC_PKT_TYPE_MASK            __BITS(16,4)
+#define        NQRXC_RSS_TYPE_MASK             __BITS(3,0)
+#define        NQRXC_PKT_TYPE_ID_MASK          __BITS(11,4)
+#define        NQRXC_PKT_TYPE_ETQF_INDEX_MASK  __BITS(11,4)
+#define        NQRXC_PKT_TYPE_ETQF_VALID_MASK  __BIT(15)
+#define        NQRXC_PKT_TYPE_VLAN_MASK        __BIT(16)
+#define        NQRXC_PKT_TYPE_MASK             __BITS(16,4)
 /* __BITS(18,17) is reserved */
-#define NQRXC_HDRLEN_HIGH_MASK         __BITS(20,19)
-#define NQRXC_HDRLEN_LOW_MASK          __BITS(30,21)
-#define NQRXC_SPH_MASK                 __BIT(31)
+#define        NQRXC_HDRLEN_HIGH_MASK          __BITS(20,19)
+#define        NQRXC_HDRLEN_LOW_MASK           __BITS(30,21)
+#define        NQRXC_SPH_MASK                  __BIT(31)
 
-#define NQRXC_RSS_TYPE(misc)   __SHIFTOUT(misc,NQRXC_RSS_TYPE_MASK)
-#define NQRXC_PKT_TYPE_ID(pkttype) \
+#define        NQRXC_RSS_TYPE(misc)    __SHIFTOUT(misc,NQRXC_RSS_TYPE_MASK)
+#define        NQRXC_PKT_TYPE_ID(pkttype) \
                __SHIFTOUT(pkttype,NQRXC_PKT_TYPE_ID_MASK)
-#define NQRXC_PKT_TYPE(misc)   __SHIFTOUT(misc,NQRXC_PKT_TYPE_MASK)
-#define NQRXC_PKT_TYPE_ETQF_INDEX(pkttype) \
+#define        NQRXC_PKT_TYPE(misc)    __SHIFTOUT(misc,NQRXC_PKT_TYPE_MASK)
+#define        NQRXC_PKT_TYPE_ETQF_INDEX(pkttype) \
                __SHIFTOUT(pkttype,NQRXC_PKT_TYPE_ETQF_INDEX_MASK)
-#define NQRXC_PKT_TYPE_ETQF_VALID NQRXC_PKT_TYPE_ETQF_VALID_MASK
-#define NQRXC_PKT_TYPE_VLAN    NQRXC_PKT_TYPE_VLAN_MASK
-#define NQRXC_HEADER_LEN(misc) (__SHIFTOUT(misc,NQRXC_HDRLEN_LOW_MASK) \
+#define        NQRXC_PKT_TYPE_ETQF_VALID NQRXC_PKT_TYPE_ETQF_VALID_MASK
+#define        NQRXC_PKT_TYPE_VLAN     NQRXC_PKT_TYPE_VLAN_MASK
+#define        NQRXC_HEADER_LEN(misc)  (__SHIFTOUT(misc,NQRXC_HDRLEN_LOW_MASK) \
                | __SHIFTOUT(misc,NQRXC_HDRLEN_HIGH_MASK) << 10)
-#define NQRXC_SPH              NQRXC_SPH_MASK
+#define        NQRXC_SPH               NQRXC_SPH_MASK
 
-#define NQRXC_RSS_TYPE_NONE            0x0 /* No hash computation done. */
-#define NQRXC_RSS_TYPE_TCP_IPV4                0x1
-#define NQRXC_RSS_TYPE_IPV4            0x2
-#define NQRXC_RSS_TYPE_TCP_IPV6                0x3
-#define NQRXC_RSS_TYPE_IPV6_EX         0x4
-#define NQRXC_RSS_TYPE_IPV6            0x5
-#define NQRXC_RSS_TYPE_TCP_IPV6_EX     0x6
-#define NQRXC_RSS_TYPE_UDP_IPV4                0x7
-#define NQRXC_RSS_TYPE_UDP_IPV6                0x8
-#define NQRXC_RSS_TYPE_UDP_IPV6_EX     0x9
+#define        NQRXC_RSS_TYPE_NONE             0x0 /* No hash computation done. */
+#define        NQRXC_RSS_TYPE_TCP_IPV4         0x1
+#define        NQRXC_RSS_TYPE_IPV4             0x2
+#define        NQRXC_RSS_TYPE_TCP_IPV6         0x3
+#define        NQRXC_RSS_TYPE_IPV6_EX          0x4
+#define        NQRXC_RSS_TYPE_IPV6             0x5
+#define        NQRXC_RSS_TYPE_TCP_IPV6_EX      0x6
+#define        NQRXC_RSS_TYPE_UDP_IPV4         0x7
+#define        NQRXC_RSS_TYPE_UDP_IPV6         0x8
+#define        NQRXC_RSS_TYPE_UDP_IPV6_EX      0x9
 /*0xA:0xF is reserved. */
 
-#define NQRXC_PKT_TYPE_IPV4            __BIT(0)
-#define NQRXC_PKT_TYPE_IPV4E           __BIT(1)
-#define NQRXC_PKT_TYPE_IPV6            __BIT(2)
-#define NQRXC_PKT_TYPE_IPV6E           __BIT(3)
-#define NQRXC_PKT_TYPE_TCP             __BIT(4)
-#define NQRXC_PKT_TYPE_UDP             __BIT(5)
-#define NQRXC_PKT_TYPE_SCTP            __BIT(6)
-#define NQRXC_PKT_TYPE_NFS             __BIT(7)
+#define        NQRXC_PKT_TYPE_IPV4             __BIT(0)
+#define        NQRXC_PKT_TYPE_IPV4E            __BIT(1)
+#define        NQRXC_PKT_TYPE_IPV6             __BIT(2)
+#define        NQRXC_PKT_TYPE_IPV6E            __BIT(3)
+#define        NQRXC_PKT_TYPE_TCP              __BIT(4)
+#define        NQRXC_PKT_TYPE_UDP              __BIT(5)
+#define        NQRXC_PKT_TYPE_SCTP             __BIT(6)
+#define        NQRXC_PKT_TYPE_NFS              __BIT(7)
 
-#define NQRXC_STATUS_MASK      __BITS(19,0)
-#define NQRXC_ERROR_MASK       __BITS(31,20)
-#define NQRXC_STATUS(err_stat) __SHIFTOUT(err_stat,NQRXC_STATUS_MASK)
-#define NQRXC_ERROR(err_stat)  __SHIFTOUT(err_stat,NQRXC_ERROR_MASK)
+#define        NQRXC_STATUS_MASK       __BITS(19,0)
+#define        NQRXC_ERROR_MASK        __BITS(31,20)
+#define        NQRXC_STATUS(err_stat)  __SHIFTOUT(err_stat,NQRXC_STATUS_MASK)
+#define        NQRXC_ERROR(err_stat)   __SHIFTOUT(err_stat,NQRXC_ERROR_MASK)
 
 /* 2:0 is reserved. */
-#define NQRXC_ERROR_HB0                __BIT(3) /* Header Buffer Overflow. */
+#define        NQRXC_ERROR_HB0         __BIT(3) /* Header Buffer Overflow. */
 /* 6:4 is reserved. */
 /* 8:7 is reserved. */
-#define NQRXC_ERROR_L4E                __BIT(9) /* L4 error indication. */
-#define NQRXC_ERROR_IPE                __BIT(10) /* The same as WRX_ER_IPE. */
-#define NQRXC_ERROR_RXE                __BIT(11) /* The same as WRX_ER_RXE. */
+#define        NQRXC_ERROR_L4E         __BIT(9) /* L4 error indication. */
+#define        NQRXC_ERROR_IPE         __BIT(10) /* The same as WRX_ER_IPE. */
+#define        NQRXC_ERROR_RXE         __BIT(11) /* The same as WRX_ER_RXE. */
 /* XXX Where is WRX_ER_CE, WRX_ER_SE, WRX_ER_SEQ, WRX_ER_CXE error? */
 
-#define NQRXC_STATUS_DD                __BIT(0) /* The same as WRX_ST_DD. */
-#define NQRXC_STATUS_EOP       __BIT(1) /* The same as WRX_ST_EOP. */
+#define        NQRXC_STATUS_DD         __BIT(0) /* The same as WRX_ST_DD. */
+#define        NQRXC_STATUS_EOP        __BIT(1) /* The same as WRX_ST_EOP. */
 /* 2 is reserved */
-#define NQRXC_STATUS_VP                __BIT(3) /* The same as WRX_ST_VP. */
-#define NQRXC_STATUS_UDPCS     __BIT(4) /* UDP checksum or IP payload checksum. */
+#define        NQRXC_STATUS_VP         __BIT(3) /* The same as WRX_ST_VP. */
+#define        NQRXC_STATUS_UDPCS      __BIT(4) /* UDP checksum or IP payload checksum. */
                                         /* XXX in I210 spec, this bit is the same as WRX_ST_BPDU(is "???" comment) */
-#define NQRXC_STATUS_L4I       __BIT(5) /* L4 integrity check was done. */
-#define NQRXC_STATUS_IPCS      __BIT(6) /* The same as WRX_ST_IPCS. */
-#define NQRXC_STATUS_PIF       __BIT(7) /* The same as WRX_ST_PIF. */
+#define        NQRXC_STATUS_L4I        __BIT(5) /* L4 integrity check was done. */
+#define        NQRXC_STATUS_IPCS       __BIT(6) /* The same as WRX_ST_IPCS. */
+#define        NQRXC_STATUS_PIF        __BIT(7) /* The same as WRX_ST_PIF. */
 /* 8 is reserved */
-#define NQRXC_STATUS_VEXT      __BIT(9) /* First VLAN is found on a bouble VLAN packet. */
-#define NQRXC_STATUS_UDPV      __BIT(10) /* The packet contains a valid checksum field in a first fragment UDP IPv4 packet. */
-#define NQRXC_STATUS_LLINT     __BIT(11) /* The packet caused an immediate interrupt. */
-#define NQRXC_STATUS_STRIPCRC  __BIT(12) /* Ethernet CRC is stripped. */
+#define        NQRXC_STATUS_VEXT       __BIT(9) /* First VLAN is found on a bouble VLAN packet. */
+#define        NQRXC_STATUS_UDPV       __BIT(10) /* The packet contains a valid checksum field in a first fragment UDP IPv4 packet. */
+#define        NQRXC_STATUS_LLINT      __BIT(11) /* The packet caused an immediate interrupt. */
+#define        NQRXC_STATUS_STRIPCRC   __BIT(12) /* Ethernet CRC is stripped. */
 /* 14:13 is reserved */
-#define NQRXC_STATUS_TSIP      __BIT(15) /* Timestamp in packet. */
-#define NQRXC_STATUS_TS                __BIT(16) /* Time stamped packet. */
+#define        NQRXC_STATUS_TSIP       __BIT(15) /* Timestamp in packet. */
+#define        NQRXC_STATUS_TS         __BIT(16) /* Time stamped packet. */
 /* 17 is reserved */
-#define NQRXC_STATUS_LB                __BIT(18) /* Sent by a local virtual machine (VM to VM switch indication). */
-#define NQRXC_STATUS_MC                __BIT(19) /* Packet received from Manageability Controller */
+#define        NQRXC_STATUS_LB         __BIT(18) /* Sent by a local virtual machine (VM to VM switch indication). */
+#define        NQRXC_STATUS_MC         __BIT(19) /* Packet received from Manageability Controller */
                                          /* "MBC" in i350 spec */
 
 /*
@@ -406,13 +406,13 @@
  */
 #define        WM_PCI_MMBA     PCI_MAPREG_START
 /* registers for FLASH access on ICH8 */
-#define WM_ICH8_FLASH  0x0014
+#define        WM_ICH8_FLASH   0x0014
 
-#define WM_PCI_LTR_CAP_LPT     0xa8
+#define        WM_PCI_LTR_CAP_LPT      0xa8
 
 /* XXX Only for PCH_SPT? */
-#define WM_PCI_DESCRING_STATUS 0xe4
-#define DESCRING_STATUS_FLUSH_REQ      __BIT(8)
+#define        WM_PCI_DESCRING_STATUS  0xe4
+#define        DESCRING_STATUS_FLUSH_REQ       __BIT(8)
 
 /*
  * Wiseman Control/Status Registers.



Home | Main Index | Thread Index | Old Index