Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/mii - Use uint16_t more for MII registers.



details:   https://anonhg.NetBSD.org/src/rev/f3e2def99c51
branches:  trunk
changeset: 450288:f3e2def99c51
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Tue Apr 09 11:28:45 2019 +0000

description:
- Use uint16_t more for MII registers.
- Whitespace.

diffstat:

 sys/dev/mii/mii.c         |   6 +++---
 sys/dev/mii/mii_physubr.c |   6 +++---
 sys/dev/mii/miivar.h      |  14 +++++++-------
 3 files changed, 13 insertions(+), 13 deletions(-)

diffs (97 lines):

diff -r 0105c23fb7ef -r f3e2def99c51 sys/dev/mii/mii.c
--- a/sys/dev/mii/mii.c Tue Apr 09 09:03:41 2019 +0000
+++ b/sys/dev/mii/mii.c Tue Apr 09 11:28:45 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mii.c,v 1.53 2019/03/25 09:20:46 msaitoh Exp $ */
+/*     $NetBSD: mii.c,v 1.54 2019/04/09 11:28:45 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mii.c,v 1.53 2019/03/25 09:20:46 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mii.c,v 1.54 2019/04/09 11:28:45 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -280,7 +280,7 @@
 }
 
 u_int
-mii_oui(u_int id1, u_int id2)
+mii_oui(uint16_t id1, uint16_t id2)
 {
        u_int h;
 
diff -r 0105c23fb7ef -r f3e2def99c51 sys/dev/mii/mii_physubr.c
--- a/sys/dev/mii/mii_physubr.c Tue Apr 09 09:03:41 2019 +0000
+++ b/sys/dev/mii/mii_physubr.c Tue Apr 09 11:28:45 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mii_physubr.c,v 1.86 2019/03/25 09:20:46 msaitoh Exp $ */
+/*     $NetBSD: mii_physubr.c,v 1.87 2019/04/09 11:28:45 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.86 2019/03/25 09:20:46 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.87 2019/04/09 11:28:45 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -699,7 +699,7 @@
 /*
  * Given an ifmedia word, return the corresponding ANAR value.
  */
-int
+uint16_t
 mii_anar(int media)
 {
        int rv;
diff -r 0105c23fb7ef -r f3e2def99c51 sys/dev/mii/miivar.h
--- a/sys/dev/mii/miivar.h      Tue Apr 09 09:03:41 2019 +0000
+++ b/sys/dev/mii/miivar.h      Tue Apr 09 11:28:45 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: miivar.h,v 1.66 2019/02/26 05:26:10 msaitoh Exp $      */
+/*     $NetBSD: miivar.h,v 1.67 2019/04/09 11:28:45 msaitoh Exp $      */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -196,9 +196,9 @@
  * An array of these structures map MII media types to BMCR/ANAR settings.
  */
 struct mii_media {
-       int     mm_bmcr;                /* BMCR settings for this media */
-       int     mm_anar;                /* ANAR settings for this media */
-       int     mm_gtcr;                /* 100base-T2 or 1000base-T CR */
+       uint16_t mm_bmcr;               /* BMCR settings for this media */
+       uint16_t mm_anar;               /* ANAR settings for this media */
+       uint16_t mm_gtcr;               /* 100base-T2 or 1000base-T CR */
 };
 
 #define        MII_MEDIA_NONE          0
@@ -291,9 +291,9 @@
 void   mii_tick(struct mii_data *);
 void   mii_pollstat(struct mii_data *);
 void   mii_down(struct mii_data *);
-int    mii_anar(int);
+uint16_t mii_anar(int);
 
-int mii_ifmedia_change(struct mii_data *);
+int    mii_ifmedia_change(struct mii_data *);
 
 int    mii_phy_activate(device_t, enum devact);
 int    mii_phy_detach(device_t, int);
@@ -317,7 +317,7 @@
 
 void   ukphy_status(struct mii_softc *);
 
-u_int  mii_oui(u_int, u_int);
+u_int  mii_oui(uint16_t, uint16_t);
 #define        MII_OUI(id1, id2)       mii_oui(id1, id2)
 #define        MII_MODEL(id2)          (((id2) & IDR2_MODEL) >> 4)
 #define        MII_REV(id2)            ((id2) & IDR2_REV)



Home | Main Index | Thread Index | Old Index