Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Use macro. Remove extra semicolon. No functional...



details:   https://anonhg.NetBSD.org/src/rev/74c06ae33f4c
branches:  trunk
changeset: 785138:74c06ae33f4c
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Tue Feb 26 11:03:17 2013 +0000

description:
Use macro. Remove extra semicolon. No functional change.

diffstat:

 sys/dev/pci/if_bge.c    |  10 +++++-----
 sys/dev/pci/if_bgereg.h |   4 +++-
 2 files changed, 8 insertions(+), 6 deletions(-)

diffs (59 lines):

diff -r 7ed9a3433116 -r 74c06ae33f4c sys/dev/pci/if_bge.c
--- a/sys/dev/pci/if_bge.c      Tue Feb 26 00:45:27 2013 +0000
+++ b/sys/dev/pci/if_bge.c      Tue Feb 26 11:03:17 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bge.c,v 1.204 2013/02/25 00:36:22 msaitoh Exp $     */
+/*     $NetBSD: if_bge.c,v 1.205 2013/02/26 11:03:17 msaitoh Exp $     */
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.204 2013/02/25 00:36:22 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.205 2013/02/26 11:03:17 msaitoh Exp $");
 
 #include "vlan.h"
 
@@ -1495,7 +1495,7 @@
        for (i = 0; i < BGE_JUMBO_RX_RING_CNT; i++) {
                if (bge_newbuf_jumbo(sc, i, NULL) == ENOBUFS)
                        return ENOBUFS;
-       };
+       }
 
        sc->bge_jumbo = i - 1;
        sc->bge_flags |= BGE_JUMBO_RXRING_VALID;
@@ -4969,11 +4969,11 @@
 {
        uint32_t mac_addr;
 
-       mac_addr = bge_readmem_ind(sc, 0x0c14);
+       mac_addr = bge_readmem_ind(sc, BGE_SRAM_MAC_ADDR_HIGH_MB);
        if ((mac_addr >> 16) == 0x484b) {
                ether_addr[0] = (uint8_t)(mac_addr >> 8);
                ether_addr[1] = (uint8_t)mac_addr;
-               mac_addr = bge_readmem_ind(sc, 0x0c18);
+               mac_addr = bge_readmem_ind(sc, BGE_SRAM_MAC_ADDR_LOW_MB);
                ether_addr[2] = (uint8_t)(mac_addr >> 24);
                ether_addr[3] = (uint8_t)(mac_addr >> 16);
                ether_addr[4] = (uint8_t)(mac_addr >> 8);
diff -r 7ed9a3433116 -r 74c06ae33f4c sys/dev/pci/if_bgereg.h
--- a/sys/dev/pci/if_bgereg.h   Tue Feb 26 00:45:27 2013 +0000
+++ b/sys/dev/pci/if_bgereg.h   Tue Feb 26 11:03:17 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bgereg.h,v 1.58 2013/02/25 00:36:22 msaitoh Exp $   */
+/*     $NetBSD: if_bgereg.h,v 1.59 2013/02/26 11:03:17 msaitoh Exp $   */
 /*
  * Copyright (c) 2001 Wind River Systems
  * Copyright (c) 1997, 1998, 1999, 2001
@@ -78,6 +78,8 @@
 #define        BGE_SOFTWARE_GENCOMM_FW         0x00000B78
 #define        BGE_SOFTWARE_GENNCOMM_FW_LEN    0x00000B7C
 #define        BGE_SOFTWARE_GENNCOMM_FW_DATA   0x00000B80
+#define        BGE_SRAM_MAC_ADDR_HIGH_MB       0x00000C14
+#define        BGE_SRAM_MAC_ADDR_LOW_MB        0x00000C18
 #define BGE_SOFTWARE_GENCOMM_END       0x00000FFF
 #define BGE_UNMAPPED                   0x00001000
 #define BGE_UNMAPPED_END               0x00001FFF



Home | Main Index | Thread Index | Old Index