~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/mii.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/linux/mii.h (Version linux-6.12-rc7) and /include/linux/mii.h (Version linux-5.7.19)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*                                                  2 /*
  3  * linux/mii.h: definitions for MII-compatible      3  * linux/mii.h: definitions for MII-compatible transceivers
  4  * Originally drivers/net/sunhme.h.                 4  * Originally drivers/net/sunhme.h.
  5  *                                                  5  *
  6  * Copyright (C) 1996, 1999, 2001 David S. Mil      6  * Copyright (C) 1996, 1999, 2001 David S. Miller (davem@redhat.com)
  7  */                                                 7  */
  8 #ifndef __LINUX_MII_H__                             8 #ifndef __LINUX_MII_H__
  9 #define __LINUX_MII_H__                             9 #define __LINUX_MII_H__
 10                                                    10 
 11                                                    11 
 12 #include <linux/if.h>                              12 #include <linux/if.h>
 13 #include <linux/linkmode.h>                        13 #include <linux/linkmode.h>
 14 #include <uapi/linux/mii.h>                        14 #include <uapi/linux/mii.h>
 15                                                    15 
 16 struct ethtool_cmd;                                16 struct ethtool_cmd;
 17                                                    17 
 18 struct mii_if_info {                               18 struct mii_if_info {
 19         int phy_id;                                19         int phy_id;
 20         int advertising;                           20         int advertising;
 21         int phy_id_mask;                           21         int phy_id_mask;
 22         int reg_num_mask;                          22         int reg_num_mask;
 23                                                    23 
 24         unsigned int full_duplex : 1;   /* is      24         unsigned int full_duplex : 1;   /* is full duplex? */
 25         unsigned int force_media : 1;   /* is      25         unsigned int force_media : 1;   /* is autoneg. disabled? */
 26         unsigned int supports_gmii : 1; /* are     26         unsigned int supports_gmii : 1; /* are GMII registers supported? */
 27                                                    27 
 28         struct net_device *dev;                    28         struct net_device *dev;
 29         int (*mdio_read) (struct net_device *d     29         int (*mdio_read) (struct net_device *dev, int phy_id, int location);
 30         void (*mdio_write) (struct net_device      30         void (*mdio_write) (struct net_device *dev, int phy_id, int location, int val);
 31 };                                                 31 };
 32                                                    32 
 33 extern int mii_link_ok (struct mii_if_info *mi     33 extern int mii_link_ok (struct mii_if_info *mii);
 34 extern int mii_nway_restart (struct mii_if_inf     34 extern int mii_nway_restart (struct mii_if_info *mii);
 35 extern void mii_ethtool_gset(struct mii_if_inf !!  35 extern int mii_ethtool_gset(struct mii_if_info *mii, struct ethtool_cmd *ecmd);
 36 extern void mii_ethtool_get_link_ksettings(        36 extern void mii_ethtool_get_link_ksettings(
 37         struct mii_if_info *mii, struct ethtoo     37         struct mii_if_info *mii, struct ethtool_link_ksettings *cmd);
 38 extern int mii_ethtool_sset(struct mii_if_info     38 extern int mii_ethtool_sset(struct mii_if_info *mii, struct ethtool_cmd *ecmd);
 39 extern int mii_ethtool_set_link_ksettings(         39 extern int mii_ethtool_set_link_ksettings(
 40         struct mii_if_info *mii, const struct      40         struct mii_if_info *mii, const struct ethtool_link_ksettings *cmd);
 41 extern int mii_check_gmii_support(struct mii_i     41 extern int mii_check_gmii_support(struct mii_if_info *mii);
 42 extern void mii_check_link (struct mii_if_info     42 extern void mii_check_link (struct mii_if_info *mii);
 43 extern unsigned int mii_check_media (struct mi     43 extern unsigned int mii_check_media (struct mii_if_info *mii,
 44                                      unsigned      44                                      unsigned int ok_to_print,
 45                                      unsigned      45                                      unsigned int init_media);
 46 extern int generic_mii_ioctl(struct mii_if_inf     46 extern int generic_mii_ioctl(struct mii_if_info *mii_if,
 47                              struct mii_ioctl_     47                              struct mii_ioctl_data *mii_data, int cmd,
 48                              unsigned int *dup     48                              unsigned int *duplex_changed);
 49                                                    49 
 50                                                    50 
 51 static inline struct mii_ioctl_data *if_mii(st     51 static inline struct mii_ioctl_data *if_mii(struct ifreq *rq)
 52 {                                                  52 {
 53         return (struct mii_ioctl_data *) &rq->     53         return (struct mii_ioctl_data *) &rq->ifr_ifru;
 54 }                                                  54 }
 55                                                    55 
 56 /**                                                56 /**
 57  * mii_nway_result                                 57  * mii_nway_result
 58  * @negotiated: value of MII ANAR and'd with A     58  * @negotiated: value of MII ANAR and'd with ANLPAR
 59  *                                                 59  *
 60  * Given a set of MII abilities, check each bi     60  * Given a set of MII abilities, check each bit and returns the
 61  * currently supported media, in the priority      61  * currently supported media, in the priority order defined by
 62  * IEEE 802.3u.  We use LPA_xxx constants but      62  * IEEE 802.3u.  We use LPA_xxx constants but note this is not the
 63  * value of LPA solely, as described above.        63  * value of LPA solely, as described above.
 64  *                                                 64  *
 65  * The one exception to IEEE 802.3u is that 10     65  * The one exception to IEEE 802.3u is that 100baseT4 is placed
 66  * between 100T-full and 100T-half.  If your p     66  * between 100T-full and 100T-half.  If your phy does not support
 67  * 100T4 this is fine.  If your phy places 100     67  * 100T4 this is fine.  If your phy places 100T4 elsewhere in the
 68  * priority order, you will need to roll your      68  * priority order, you will need to roll your own function.
 69  */                                                69  */
 70 static inline unsigned int mii_nway_result (un     70 static inline unsigned int mii_nway_result (unsigned int negotiated)
 71 {                                                  71 {
 72         unsigned int ret;                          72         unsigned int ret;
 73                                                    73 
 74         if (negotiated & LPA_100FULL)              74         if (negotiated & LPA_100FULL)
 75                 ret = LPA_100FULL;                 75                 ret = LPA_100FULL;
 76         else if (negotiated & LPA_100BASE4)        76         else if (negotiated & LPA_100BASE4)
 77                 ret = LPA_100BASE4;                77                 ret = LPA_100BASE4;
 78         else if (negotiated & LPA_100HALF)         78         else if (negotiated & LPA_100HALF)
 79                 ret = LPA_100HALF;                 79                 ret = LPA_100HALF;
 80         else if (negotiated & LPA_10FULL)          80         else if (negotiated & LPA_10FULL)
 81                 ret = LPA_10FULL;                  81                 ret = LPA_10FULL;
 82         else                                       82         else
 83                 ret = LPA_10HALF;                  83                 ret = LPA_10HALF;
 84                                                    84 
 85         return ret;                                85         return ret;
 86 }                                                  86 }
 87                                                    87 
 88 /**                                                88 /**
 89  * mii_duplex                                      89  * mii_duplex
 90  * @duplex_lock: Non-zero if duplex is locked      90  * @duplex_lock: Non-zero if duplex is locked at full
 91  * @negotiated: value of MII ANAR and'd with A     91  * @negotiated: value of MII ANAR and'd with ANLPAR
 92  *                                                 92  *
 93  * A small helper function for a common case.      93  * A small helper function for a common case.  Returns one
 94  * if the media is operating or locked at full     94  * if the media is operating or locked at full duplex, and
 95  * returns zero otherwise.                         95  * returns zero otherwise.
 96  */                                                96  */
 97 static inline unsigned int mii_duplex (unsigne     97 static inline unsigned int mii_duplex (unsigned int duplex_lock,
 98                                        unsigne     98                                        unsigned int negotiated)
 99 {                                                  99 {
100         if (duplex_lock)                          100         if (duplex_lock)
101                 return 1;                         101                 return 1;
102         if (mii_nway_result(negotiated) & LPA_    102         if (mii_nway_result(negotiated) & LPA_DUPLEX)
103                 return 1;                         103                 return 1;
104         return 0;                                 104         return 0;
105 }                                                 105 }
106                                                   106 
107 /**                                               107 /**
108  * ethtool_adv_to_mii_adv_t                       108  * ethtool_adv_to_mii_adv_t
109  * @ethadv: the ethtool advertisement settings    109  * @ethadv: the ethtool advertisement settings
110  *                                                110  *
111  * A small helper function that translates eth    111  * A small helper function that translates ethtool advertisement
112  * settings to phy autonegotiation advertiseme    112  * settings to phy autonegotiation advertisements for the
113  * MII_ADVERTISE register.                        113  * MII_ADVERTISE register.
114  */                                               114  */
115 static inline u32 ethtool_adv_to_mii_adv_t(u32    115 static inline u32 ethtool_adv_to_mii_adv_t(u32 ethadv)
116 {                                                 116 {
117         u32 result = 0;                           117         u32 result = 0;
118                                                   118 
119         if (ethadv & ADVERTISED_10baseT_Half)     119         if (ethadv & ADVERTISED_10baseT_Half)
120                 result |= ADVERTISE_10HALF;       120                 result |= ADVERTISE_10HALF;
121         if (ethadv & ADVERTISED_10baseT_Full)     121         if (ethadv & ADVERTISED_10baseT_Full)
122                 result |= ADVERTISE_10FULL;       122                 result |= ADVERTISE_10FULL;
123         if (ethadv & ADVERTISED_100baseT_Half)    123         if (ethadv & ADVERTISED_100baseT_Half)
124                 result |= ADVERTISE_100HALF;      124                 result |= ADVERTISE_100HALF;
125         if (ethadv & ADVERTISED_100baseT_Full)    125         if (ethadv & ADVERTISED_100baseT_Full)
126                 result |= ADVERTISE_100FULL;      126                 result |= ADVERTISE_100FULL;
127         if (ethadv & ADVERTISED_Pause)            127         if (ethadv & ADVERTISED_Pause)
128                 result |= ADVERTISE_PAUSE_CAP;    128                 result |= ADVERTISE_PAUSE_CAP;
129         if (ethadv & ADVERTISED_Asym_Pause)       129         if (ethadv & ADVERTISED_Asym_Pause)
130                 result |= ADVERTISE_PAUSE_ASYM    130                 result |= ADVERTISE_PAUSE_ASYM;
131                                                   131 
132         return result;                            132         return result;
133 }                                                 133 }
134                                                   134 
135 /**                                               135 /**
136  * linkmode_adv_to_mii_adv_t                      136  * linkmode_adv_to_mii_adv_t
137  * @advertising: the linkmode advertisement se    137  * @advertising: the linkmode advertisement settings
138  *                                                138  *
139  * A small helper function that translates lin    139  * A small helper function that translates linkmode advertisement
140  * settings to phy autonegotiation advertiseme    140  * settings to phy autonegotiation advertisements for the
141  * MII_ADVERTISE register.                        141  * MII_ADVERTISE register.
142  */                                               142  */
143 static inline u32 linkmode_adv_to_mii_adv_t(co !! 143 static inline u32 linkmode_adv_to_mii_adv_t(unsigned long *advertising)
144 {                                                 144 {
145         u32 result = 0;                           145         u32 result = 0;
146                                                   146 
147         if (linkmode_test_bit(ETHTOOL_LINK_MOD    147         if (linkmode_test_bit(ETHTOOL_LINK_MODE_10baseT_Half_BIT, advertising))
148                 result |= ADVERTISE_10HALF;       148                 result |= ADVERTISE_10HALF;
149         if (linkmode_test_bit(ETHTOOL_LINK_MOD    149         if (linkmode_test_bit(ETHTOOL_LINK_MODE_10baseT_Full_BIT, advertising))
150                 result |= ADVERTISE_10FULL;       150                 result |= ADVERTISE_10FULL;
151         if (linkmode_test_bit(ETHTOOL_LINK_MOD    151         if (linkmode_test_bit(ETHTOOL_LINK_MODE_100baseT_Half_BIT, advertising))
152                 result |= ADVERTISE_100HALF;      152                 result |= ADVERTISE_100HALF;
153         if (linkmode_test_bit(ETHTOOL_LINK_MOD    153         if (linkmode_test_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT, advertising))
154                 result |= ADVERTISE_100FULL;      154                 result |= ADVERTISE_100FULL;
155         if (linkmode_test_bit(ETHTOOL_LINK_MOD    155         if (linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT, advertising))
156                 result |= ADVERTISE_PAUSE_CAP;    156                 result |= ADVERTISE_PAUSE_CAP;
157         if (linkmode_test_bit(ETHTOOL_LINK_MOD    157         if (linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, advertising))
158                 result |= ADVERTISE_PAUSE_ASYM    158                 result |= ADVERTISE_PAUSE_ASYM;
159                                                   159 
160         return result;                            160         return result;
161 }                                                 161 }
162                                                   162 
163 /**                                               163 /**
164  * mii_adv_to_ethtool_adv_t                       164  * mii_adv_to_ethtool_adv_t
165  * @adv: value of the MII_ADVERTISE register      165  * @adv: value of the MII_ADVERTISE register
166  *                                                166  *
167  * A small helper function that translates MII    167  * A small helper function that translates MII_ADVERTISE bits
168  * to ethtool advertisement settings.             168  * to ethtool advertisement settings.
169  */                                               169  */
170 static inline u32 mii_adv_to_ethtool_adv_t(u32    170 static inline u32 mii_adv_to_ethtool_adv_t(u32 adv)
171 {                                                 171 {
172         u32 result = 0;                           172         u32 result = 0;
173                                                   173 
174         if (adv & ADVERTISE_10HALF)               174         if (adv & ADVERTISE_10HALF)
175                 result |= ADVERTISED_10baseT_H    175                 result |= ADVERTISED_10baseT_Half;
176         if (adv & ADVERTISE_10FULL)               176         if (adv & ADVERTISE_10FULL)
177                 result |= ADVERTISED_10baseT_F    177                 result |= ADVERTISED_10baseT_Full;
178         if (adv & ADVERTISE_100HALF)              178         if (adv & ADVERTISE_100HALF)
179                 result |= ADVERTISED_100baseT_    179                 result |= ADVERTISED_100baseT_Half;
180         if (adv & ADVERTISE_100FULL)              180         if (adv & ADVERTISE_100FULL)
181                 result |= ADVERTISED_100baseT_    181                 result |= ADVERTISED_100baseT_Full;
182         if (adv & ADVERTISE_PAUSE_CAP)            182         if (adv & ADVERTISE_PAUSE_CAP)
183                 result |= ADVERTISED_Pause;       183                 result |= ADVERTISED_Pause;
184         if (adv & ADVERTISE_PAUSE_ASYM)           184         if (adv & ADVERTISE_PAUSE_ASYM)
185                 result |= ADVERTISED_Asym_Paus    185                 result |= ADVERTISED_Asym_Pause;
186                                                   186 
187         return result;                            187         return result;
188 }                                                 188 }
189                                                   189 
190 /**                                               190 /**
191  * ethtool_adv_to_mii_ctrl1000_t                  191  * ethtool_adv_to_mii_ctrl1000_t
192  * @ethadv: the ethtool advertisement settings    192  * @ethadv: the ethtool advertisement settings
193  *                                                193  *
194  * A small helper function that translates eth    194  * A small helper function that translates ethtool advertisement
195  * settings to phy autonegotiation advertiseme    195  * settings to phy autonegotiation advertisements for the
196  * MII_CTRL1000 register when in 1000T mode.      196  * MII_CTRL1000 register when in 1000T mode.
197  */                                               197  */
198 static inline u32 ethtool_adv_to_mii_ctrl1000_    198 static inline u32 ethtool_adv_to_mii_ctrl1000_t(u32 ethadv)
199 {                                                 199 {
200         u32 result = 0;                           200         u32 result = 0;
201                                                   201 
202         if (ethadv & ADVERTISED_1000baseT_Half    202         if (ethadv & ADVERTISED_1000baseT_Half)
203                 result |= ADVERTISE_1000HALF;     203                 result |= ADVERTISE_1000HALF;
204         if (ethadv & ADVERTISED_1000baseT_Full    204         if (ethadv & ADVERTISED_1000baseT_Full)
205                 result |= ADVERTISE_1000FULL;     205                 result |= ADVERTISE_1000FULL;
206                                                   206 
207         return result;                            207         return result;
208 }                                                 208 }
209                                                   209 
210 /**                                               210 /**
211  * linkmode_adv_to_mii_ctrl1000_t                 211  * linkmode_adv_to_mii_ctrl1000_t
212  * @advertising: the linkmode advertisement se    212  * @advertising: the linkmode advertisement settings
213  *                                                213  *
214  * A small helper function that translates lin    214  * A small helper function that translates linkmode advertisement
215  * settings to phy autonegotiation advertiseme    215  * settings to phy autonegotiation advertisements for the
216  * MII_CTRL1000 register when in 1000T mode.      216  * MII_CTRL1000 register when in 1000T mode.
217  */                                               217  */
218 static inline u32                              !! 218 static inline u32 linkmode_adv_to_mii_ctrl1000_t(unsigned long *advertising)
219 linkmode_adv_to_mii_ctrl1000_t(const unsigned  << 
220 {                                                 219 {
221         u32 result = 0;                           220         u32 result = 0;
222                                                   221 
223         if (linkmode_test_bit(ETHTOOL_LINK_MOD    222         if (linkmode_test_bit(ETHTOOL_LINK_MODE_1000baseT_Half_BIT,
224                               advertising))       223                               advertising))
225                 result |= ADVERTISE_1000HALF;     224                 result |= ADVERTISE_1000HALF;
226         if (linkmode_test_bit(ETHTOOL_LINK_MOD    225         if (linkmode_test_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT,
227                               advertising))       226                               advertising))
228                 result |= ADVERTISE_1000FULL;     227                 result |= ADVERTISE_1000FULL;
229                                                   228 
230         return result;                            229         return result;
231 }                                                 230 }
232                                                   231 
233 /**                                               232 /**
234  * mii_ctrl1000_to_ethtool_adv_t                  233  * mii_ctrl1000_to_ethtool_adv_t
235  * @adv: value of the MII_CTRL1000 register       234  * @adv: value of the MII_CTRL1000 register
236  *                                                235  *
237  * A small helper function that translates MII    236  * A small helper function that translates MII_CTRL1000
238  * bits, when in 1000Base-T mode, to ethtool      237  * bits, when in 1000Base-T mode, to ethtool
239  * advertisement settings.                        238  * advertisement settings.
240  */                                               239  */
241 static inline u32 mii_ctrl1000_to_ethtool_adv_    240 static inline u32 mii_ctrl1000_to_ethtool_adv_t(u32 adv)
242 {                                                 241 {
243         u32 result = 0;                           242         u32 result = 0;
244                                                   243 
245         if (adv & ADVERTISE_1000HALF)             244         if (adv & ADVERTISE_1000HALF)
246                 result |= ADVERTISED_1000baseT    245                 result |= ADVERTISED_1000baseT_Half;
247         if (adv & ADVERTISE_1000FULL)             246         if (adv & ADVERTISE_1000FULL)
248                 result |= ADVERTISED_1000baseT    247                 result |= ADVERTISED_1000baseT_Full;
249                                                   248 
250         return result;                            249         return result;
251 }                                                 250 }
252                                                   251 
253 /**                                               252 /**
254  * mii_lpa_to_ethtool_lpa_t                       253  * mii_lpa_to_ethtool_lpa_t
255  * @adv: value of the MII_LPA register            254  * @adv: value of the MII_LPA register
256  *                                                255  *
257  * A small helper function that translates MII    256  * A small helper function that translates MII_LPA
258  * bits, when in 1000Base-T mode, to ethtool      257  * bits, when in 1000Base-T mode, to ethtool
259  * LP advertisement settings.                     258  * LP advertisement settings.
260  */                                               259  */
261 static inline u32 mii_lpa_to_ethtool_lpa_t(u32    260 static inline u32 mii_lpa_to_ethtool_lpa_t(u32 lpa)
262 {                                                 261 {
263         u32 result = 0;                           262         u32 result = 0;
264                                                   263 
265         if (lpa & LPA_LPACK)                      264         if (lpa & LPA_LPACK)
266                 result |= ADVERTISED_Autoneg;     265                 result |= ADVERTISED_Autoneg;
267                                                   266 
268         return result | mii_adv_to_ethtool_adv    267         return result | mii_adv_to_ethtool_adv_t(lpa);
269 }                                                 268 }
270                                                   269 
271 /**                                               270 /**
272  * mii_stat1000_to_ethtool_lpa_t                  271  * mii_stat1000_to_ethtool_lpa_t
273  * @adv: value of the MII_STAT1000 register       272  * @adv: value of the MII_STAT1000 register
274  *                                                273  *
275  * A small helper function that translates MII    274  * A small helper function that translates MII_STAT1000
276  * bits, when in 1000Base-T mode, to ethtool      275  * bits, when in 1000Base-T mode, to ethtool
277  * advertisement settings.                        276  * advertisement settings.
278  */                                               277  */
279 static inline u32 mii_stat1000_to_ethtool_lpa_    278 static inline u32 mii_stat1000_to_ethtool_lpa_t(u32 lpa)
280 {                                                 279 {
281         u32 result = 0;                           280         u32 result = 0;
282                                                   281 
283         if (lpa & LPA_1000HALF)                   282         if (lpa & LPA_1000HALF)
284                 result |= ADVERTISED_1000baseT    283                 result |= ADVERTISED_1000baseT_Half;
285         if (lpa & LPA_1000FULL)                   284         if (lpa & LPA_1000FULL)
286                 result |= ADVERTISED_1000baseT    285                 result |= ADVERTISED_1000baseT_Full;
287                                                   286 
288         return result;                            287         return result;
289 }                                                 288 }
290                                                   289 
291 /**                                               290 /**
292  * mii_stat1000_mod_linkmode_lpa_t                291  * mii_stat1000_mod_linkmode_lpa_t
293  * @advertising: target the linkmode advertise    292  * @advertising: target the linkmode advertisement settings
294  * @adv: value of the MII_STAT1000 register       293  * @adv: value of the MII_STAT1000 register
295  *                                                294  *
296  * A small helper function that translates MII    295  * A small helper function that translates MII_STAT1000 bits, when in
297  * 1000Base-T mode, to linkmode advertisement     296  * 1000Base-T mode, to linkmode advertisement settings. Other bits in
298  * advertising are not changes.                   297  * advertising are not changes.
299  */                                               298  */
300 static inline void mii_stat1000_mod_linkmode_l    299 static inline void mii_stat1000_mod_linkmode_lpa_t(unsigned long *advertising,
301                                                   300                                                    u32 lpa)
302 {                                                 301 {
303         linkmode_mod_bit(ETHTOOL_LINK_MODE_100    302         linkmode_mod_bit(ETHTOOL_LINK_MODE_1000baseT_Half_BIT,
304                          advertising, lpa & LP    303                          advertising, lpa & LPA_1000HALF);
305                                                   304 
306         linkmode_mod_bit(ETHTOOL_LINK_MODE_100    305         linkmode_mod_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT,
307                          advertising, lpa & LP    306                          advertising, lpa & LPA_1000FULL);
308 }                                                 307 }
309                                                   308 
310 /**                                               309 /**
311  * ethtool_adv_to_mii_adv_x                       310  * ethtool_adv_to_mii_adv_x
312  * @ethadv: the ethtool advertisement settings    311  * @ethadv: the ethtool advertisement settings
313  *                                                312  *
314  * A small helper function that translates eth    313  * A small helper function that translates ethtool advertisement
315  * settings to phy autonegotiation advertiseme    314  * settings to phy autonegotiation advertisements for the
316  * MII_CTRL1000 register when in 1000Base-X mo    315  * MII_CTRL1000 register when in 1000Base-X mode.
317  */                                               316  */
318 static inline u32 ethtool_adv_to_mii_adv_x(u32    317 static inline u32 ethtool_adv_to_mii_adv_x(u32 ethadv)
319 {                                                 318 {
320         u32 result = 0;                           319         u32 result = 0;
321                                                   320 
322         if (ethadv & ADVERTISED_1000baseT_Half    321         if (ethadv & ADVERTISED_1000baseT_Half)
323                 result |= ADVERTISE_1000XHALF;    322                 result |= ADVERTISE_1000XHALF;
324         if (ethadv & ADVERTISED_1000baseT_Full    323         if (ethadv & ADVERTISED_1000baseT_Full)
325                 result |= ADVERTISE_1000XFULL;    324                 result |= ADVERTISE_1000XFULL;
326         if (ethadv & ADVERTISED_Pause)            325         if (ethadv & ADVERTISED_Pause)
327                 result |= ADVERTISE_1000XPAUSE    326                 result |= ADVERTISE_1000XPAUSE;
328         if (ethadv & ADVERTISED_Asym_Pause)       327         if (ethadv & ADVERTISED_Asym_Pause)
329                 result |= ADVERTISE_1000XPSE_A    328                 result |= ADVERTISE_1000XPSE_ASYM;
330                                                   329 
331         return result;                            330         return result;
332 }                                                 331 }
333                                                   332 
334 /**                                               333 /**
335  * mii_adv_to_ethtool_adv_x                       334  * mii_adv_to_ethtool_adv_x
336  * @adv: value of the MII_CTRL1000 register       335  * @adv: value of the MII_CTRL1000 register
337  *                                                336  *
338  * A small helper function that translates MII    337  * A small helper function that translates MII_CTRL1000
339  * bits, when in 1000Base-X mode, to ethtool      338  * bits, when in 1000Base-X mode, to ethtool
340  * advertisement settings.                        339  * advertisement settings.
341  */                                               340  */
342 static inline u32 mii_adv_to_ethtool_adv_x(u32    341 static inline u32 mii_adv_to_ethtool_adv_x(u32 adv)
343 {                                                 342 {
344         u32 result = 0;                           343         u32 result = 0;
345                                                   344 
346         if (adv & ADVERTISE_1000XHALF)            345         if (adv & ADVERTISE_1000XHALF)
347                 result |= ADVERTISED_1000baseT    346                 result |= ADVERTISED_1000baseT_Half;
348         if (adv & ADVERTISE_1000XFULL)            347         if (adv & ADVERTISE_1000XFULL)
349                 result |= ADVERTISED_1000baseT    348                 result |= ADVERTISED_1000baseT_Full;
350         if (adv & ADVERTISE_1000XPAUSE)           349         if (adv & ADVERTISE_1000XPAUSE)
351                 result |= ADVERTISED_Pause;       350                 result |= ADVERTISED_Pause;
352         if (adv & ADVERTISE_1000XPSE_ASYM)        351         if (adv & ADVERTISE_1000XPSE_ASYM)
353                 result |= ADVERTISED_Asym_Paus    352                 result |= ADVERTISED_Asym_Pause;
354                                                   353 
355         return result;                            354         return result;
356 }                                                 355 }
357                                                   356 
358 /**                                               357 /**
                                                   >> 358  * mii_lpa_mod_linkmode_adv_sgmii
                                                   >> 359  * @lp_advertising: pointer to destination link mode.
                                                   >> 360  * @lpa: value of the MII_LPA register
                                                   >> 361  *
                                                   >> 362  * A small helper function that translates MII_LPA bits to
                                                   >> 363  * linkmode advertisement settings for SGMII.
                                                   >> 364  * Leaves other bits unchanged.
                                                   >> 365  */
                                                   >> 366 static inline void
                                                   >> 367 mii_lpa_mod_linkmode_lpa_sgmii(unsigned long *lp_advertising, u32 lpa)
                                                   >> 368 {
                                                   >> 369         u32 speed_duplex = lpa & LPA_SGMII_DPX_SPD_MASK;
                                                   >> 370 
                                                   >> 371         linkmode_mod_bit(ETHTOOL_LINK_MODE_1000baseT_Half_BIT, lp_advertising,
                                                   >> 372                          speed_duplex == LPA_SGMII_1000HALF);
                                                   >> 373 
                                                   >> 374         linkmode_mod_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT, lp_advertising,
                                                   >> 375                          speed_duplex == LPA_SGMII_1000FULL);
                                                   >> 376 
                                                   >> 377         linkmode_mod_bit(ETHTOOL_LINK_MODE_100baseT_Half_BIT, lp_advertising,
                                                   >> 378                          speed_duplex == LPA_SGMII_100HALF);
                                                   >> 379 
                                                   >> 380         linkmode_mod_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT, lp_advertising,
                                                   >> 381                          speed_duplex == LPA_SGMII_100FULL);
                                                   >> 382 
                                                   >> 383         linkmode_mod_bit(ETHTOOL_LINK_MODE_10baseT_Half_BIT, lp_advertising,
                                                   >> 384                          speed_duplex == LPA_SGMII_10HALF);
                                                   >> 385 
                                                   >> 386         linkmode_mod_bit(ETHTOOL_LINK_MODE_10baseT_Full_BIT, lp_advertising,
                                                   >> 387                          speed_duplex == LPA_SGMII_10FULL);
                                                   >> 388 }
                                                   >> 389 
                                                   >> 390 /**
                                                   >> 391  * mii_lpa_to_linkmode_adv_sgmii
                                                   >> 392  * @advertising: pointer to destination link mode.
                                                   >> 393  * @lpa: value of the MII_LPA register
                                                   >> 394  *
                                                   >> 395  * A small helper function that translates MII_ADVERTISE bits
                                                   >> 396  * to linkmode advertisement settings when in SGMII mode.
                                                   >> 397  * Clears the old value of advertising.
                                                   >> 398  */
                                                   >> 399 static inline void mii_lpa_to_linkmode_lpa_sgmii(unsigned long *lp_advertising,
                                                   >> 400                                                  u32 lpa)
                                                   >> 401 {
                                                   >> 402         linkmode_zero(lp_advertising);
                                                   >> 403 
                                                   >> 404         mii_lpa_mod_linkmode_lpa_sgmii(lp_advertising, lpa);
                                                   >> 405 }
                                                   >> 406 
                                                   >> 407 /**
359  * mii_adv_mod_linkmode_adv_t                     408  * mii_adv_mod_linkmode_adv_t
360  * @advertising:pointer to destination link mo    409  * @advertising:pointer to destination link mode.
361  * @adv: value of the MII_ADVERTISE register      410  * @adv: value of the MII_ADVERTISE register
362  *                                                411  *
363  * A small helper function that translates MII    412  * A small helper function that translates MII_ADVERTISE bits to
364  * linkmode advertisement settings. Leaves oth    413  * linkmode advertisement settings. Leaves other bits unchanged.
365  */                                               414  */
366 static inline void mii_adv_mod_linkmode_adv_t(    415 static inline void mii_adv_mod_linkmode_adv_t(unsigned long *advertising,
367                                                   416                                               u32 adv)
368 {                                                 417 {
369         linkmode_mod_bit(ETHTOOL_LINK_MODE_10b    418         linkmode_mod_bit(ETHTOOL_LINK_MODE_10baseT_Half_BIT,
370                          advertising, adv & AD    419                          advertising, adv & ADVERTISE_10HALF);
371                                                   420 
372         linkmode_mod_bit(ETHTOOL_LINK_MODE_10b    421         linkmode_mod_bit(ETHTOOL_LINK_MODE_10baseT_Full_BIT,
373                          advertising, adv & AD    422                          advertising, adv & ADVERTISE_10FULL);
374                                                   423 
375         linkmode_mod_bit(ETHTOOL_LINK_MODE_100    424         linkmode_mod_bit(ETHTOOL_LINK_MODE_100baseT_Half_BIT,
376                          advertising, adv & AD    425                          advertising, adv & ADVERTISE_100HALF);
377                                                   426 
378         linkmode_mod_bit(ETHTOOL_LINK_MODE_100    427         linkmode_mod_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT,
379                          advertising, adv & AD    428                          advertising, adv & ADVERTISE_100FULL);
380                                                   429 
381         linkmode_mod_bit(ETHTOOL_LINK_MODE_Pau    430         linkmode_mod_bit(ETHTOOL_LINK_MODE_Pause_BIT, advertising,
382                          adv & ADVERTISE_PAUSE    431                          adv & ADVERTISE_PAUSE_CAP);
383                                                   432 
384         linkmode_mod_bit(ETHTOOL_LINK_MODE_Asy    433         linkmode_mod_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
385                          advertising, adv & AD    434                          advertising, adv & ADVERTISE_PAUSE_ASYM);
386 }                                                 435 }
387                                                   436 
388 /**                                               437 /**
389  * mii_adv_to_linkmode_adv_t                      438  * mii_adv_to_linkmode_adv_t
390  * @advertising:pointer to destination link mo    439  * @advertising:pointer to destination link mode.
391  * @adv: value of the MII_ADVERTISE register      440  * @adv: value of the MII_ADVERTISE register
392  *                                                441  *
393  * A small helper function that translates MII    442  * A small helper function that translates MII_ADVERTISE bits
394  * to linkmode advertisement settings. Clears     443  * to linkmode advertisement settings. Clears the old value
395  * of advertising.                                444  * of advertising.
396  */                                               445  */
397 static inline void mii_adv_to_linkmode_adv_t(u    446 static inline void mii_adv_to_linkmode_adv_t(unsigned long *advertising,
398                                              u    447                                              u32 adv)
399 {                                                 448 {
400         linkmode_zero(advertising);               449         linkmode_zero(advertising);
401                                                   450 
402         mii_adv_mod_linkmode_adv_t(advertising    451         mii_adv_mod_linkmode_adv_t(advertising, adv);
403 }                                                 452 }
404                                                   453 
405 /**                                               454 /**
406  * mii_lpa_to_linkmode_lpa_t                      455  * mii_lpa_to_linkmode_lpa_t
407  * @adv: value of the MII_LPA register            456  * @adv: value of the MII_LPA register
408  *                                                457  *
409  * A small helper function that translates MII    458  * A small helper function that translates MII_LPA bits, when in
410  * 1000Base-T mode, to linkmode LP advertiseme    459  * 1000Base-T mode, to linkmode LP advertisement settings. Clears the
411  * old value of advertising                       460  * old value of advertising
412  */                                               461  */
413 static inline void mii_lpa_to_linkmode_lpa_t(u    462 static inline void mii_lpa_to_linkmode_lpa_t(unsigned long *lp_advertising,
414                                              u    463                                              u32 lpa)
415 {                                                 464 {
416         mii_adv_to_linkmode_adv_t(lp_advertisi    465         mii_adv_to_linkmode_adv_t(lp_advertising, lpa);
417                                                   466 
418         if (lpa & LPA_LPACK)                      467         if (lpa & LPA_LPACK)
419                 linkmode_set_bit(ETHTOOL_LINK_    468                 linkmode_set_bit(ETHTOOL_LINK_MODE_Autoneg_BIT,
420                                  lp_advertisin    469                                  lp_advertising);
421                                                   470 
422 }                                                 471 }
423                                                   472 
424 /**                                               473 /**
425  * mii_lpa_mod_linkmode_lpa_t                     474  * mii_lpa_mod_linkmode_lpa_t
426  * @adv: value of the MII_LPA register            475  * @adv: value of the MII_LPA register
427  *                                                476  *
428  * A small helper function that translates MII    477  * A small helper function that translates MII_LPA bits, when in
429  * 1000Base-T mode, to linkmode LP advertiseme    478  * 1000Base-T mode, to linkmode LP advertisement settings. Leaves
430  * other bits unchanged.                          479  * other bits unchanged.
431  */                                               480  */
432 static inline void mii_lpa_mod_linkmode_lpa_t(    481 static inline void mii_lpa_mod_linkmode_lpa_t(unsigned long *lp_advertising,
433                                                   482                                               u32 lpa)
434 {                                                 483 {
435         mii_adv_mod_linkmode_adv_t(lp_advertis    484         mii_adv_mod_linkmode_adv_t(lp_advertising, lpa);
436                                                   485 
437         linkmode_mod_bit(ETHTOOL_LINK_MODE_Aut    486         linkmode_mod_bit(ETHTOOL_LINK_MODE_Autoneg_BIT,
438                          lp_advertising, lpa &    487                          lp_advertising, lpa & LPA_LPACK);
439 }                                                 488 }
440                                                   489 
441 static inline void mii_ctrl1000_mod_linkmode_a    490 static inline void mii_ctrl1000_mod_linkmode_adv_t(unsigned long *advertising,
442                                                   491                                                    u32 ctrl1000)
443 {                                                 492 {
444         linkmode_mod_bit(ETHTOOL_LINK_MODE_100    493         linkmode_mod_bit(ETHTOOL_LINK_MODE_1000baseT_Half_BIT, advertising,
445                          ctrl1000 & ADVERTISE_    494                          ctrl1000 & ADVERTISE_1000HALF);
446         linkmode_mod_bit(ETHTOOL_LINK_MODE_100    495         linkmode_mod_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT, advertising,
447                          ctrl1000 & ADVERTISE_    496                          ctrl1000 & ADVERTISE_1000FULL);
448 }                                                 497 }
449                                                   498 
450 /**                                               499 /**
451  * linkmode_adv_to_lcl_adv_t                      500  * linkmode_adv_to_lcl_adv_t
452  * @advertising:pointer to linkmode advertisin    501  * @advertising:pointer to linkmode advertising
453  *                                                502  *
454  * A small helper function that translates lin    503  * A small helper function that translates linkmode advertising to LVL
455  * pause capabilities.                            504  * pause capabilities.
456  */                                               505  */
457 static inline u32 linkmode_adv_to_lcl_adv_t(co !! 506 static inline u32 linkmode_adv_to_lcl_adv_t(unsigned long *advertising)
458 {                                                 507 {
459         u32 lcl_adv = 0;                          508         u32 lcl_adv = 0;
460                                                   509 
461         if (linkmode_test_bit(ETHTOOL_LINK_MOD    510         if (linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT,
462                               advertising))       511                               advertising))
463                 lcl_adv |= ADVERTISE_PAUSE_CAP    512                 lcl_adv |= ADVERTISE_PAUSE_CAP;
464         if (linkmode_test_bit(ETHTOOL_LINK_MOD    513         if (linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
465                               advertising))       514                               advertising))
466                 lcl_adv |= ADVERTISE_PAUSE_ASY    515                 lcl_adv |= ADVERTISE_PAUSE_ASYM;
467                                                   516 
468         return lcl_adv;                           517         return lcl_adv;
469 }                                                 518 }
470                                                   519 
471 /**                                               520 /**
472  * mii_lpa_mod_linkmode_x - decode the link pa    521  * mii_lpa_mod_linkmode_x - decode the link partner's config_reg to linkmodes
473  * @linkmodes: link modes array                   522  * @linkmodes: link modes array
474  * @lpa: config_reg word from link partner        523  * @lpa: config_reg word from link partner
475  * @fd_bit: link mode for 1000XFULL bit           524  * @fd_bit: link mode for 1000XFULL bit
476  */                                               525  */
477 static inline void mii_lpa_mod_linkmode_x(unsi    526 static inline void mii_lpa_mod_linkmode_x(unsigned long *linkmodes, u16 lpa,
478                                          int f    527                                          int fd_bit)
479 {                                                 528 {
480         linkmode_mod_bit(ETHTOOL_LINK_MODE_Aut    529         linkmode_mod_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, linkmodes,
481                          lpa & LPA_LPACK);        530                          lpa & LPA_LPACK);
482         linkmode_mod_bit(ETHTOOL_LINK_MODE_Pau    531         linkmode_mod_bit(ETHTOOL_LINK_MODE_Pause_BIT, linkmodes,
483                          lpa & LPA_1000XPAUSE)    532                          lpa & LPA_1000XPAUSE);
484         linkmode_mod_bit(ETHTOOL_LINK_MODE_Asy    533         linkmode_mod_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, linkmodes,
485                          lpa & LPA_1000XPAUSE_    534                          lpa & LPA_1000XPAUSE_ASYM);
486         linkmode_mod_bit(fd_bit, linkmodes,       535         linkmode_mod_bit(fd_bit, linkmodes,
487                          lpa & LPA_1000XFULL);    536                          lpa & LPA_1000XFULL);
488 }                                                 537 }
489                                                   538 
490 /**                                               539 /**
491  * linkmode_adv_to_mii_adv_x - encode a linkmo    540  * linkmode_adv_to_mii_adv_x - encode a linkmode to config_reg
492  * @linkmodes: linkmodes                          541  * @linkmodes: linkmodes
493  * @fd_bit: full duplex bit                       542  * @fd_bit: full duplex bit
494  */                                               543  */
495 static inline u16 linkmode_adv_to_mii_adv_x(co    544 static inline u16 linkmode_adv_to_mii_adv_x(const unsigned long *linkmodes,
496                                             in    545                                             int fd_bit)
497 {                                                 546 {
498         u16 adv = 0;                              547         u16 adv = 0;
499                                                   548 
500         if (linkmode_test_bit(fd_bit, linkmode    549         if (linkmode_test_bit(fd_bit, linkmodes))
501                 adv |= ADVERTISE_1000XFULL;       550                 adv |= ADVERTISE_1000XFULL;
502         if (linkmode_test_bit(ETHTOOL_LINK_MOD    551         if (linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT, linkmodes))
503                 adv |= ADVERTISE_1000XPAUSE;      552                 adv |= ADVERTISE_1000XPAUSE;
504         if (linkmode_test_bit(ETHTOOL_LINK_MOD    553         if (linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, linkmodes))
505                 adv |= ADVERTISE_1000XPSE_ASYM    554                 adv |= ADVERTISE_1000XPSE_ASYM;
506                                                   555 
507         return adv;                               556         return adv;
508 }                                                 557 }
509                                                   558 
510 /**                                               559 /**
511  * mii_advertise_flowctrl - get flow control a    560  * mii_advertise_flowctrl - get flow control advertisement flags
512  * @cap: Flow control capabilities (FLOW_CTRL_    561  * @cap: Flow control capabilities (FLOW_CTRL_RX, FLOW_CTRL_TX or both)
513  */                                               562  */
514 static inline u16 mii_advertise_flowctrl(int c    563 static inline u16 mii_advertise_flowctrl(int cap)
515 {                                                 564 {
516         u16 adv = 0;                              565         u16 adv = 0;
517                                                   566 
518         if (cap & FLOW_CTRL_RX)                   567         if (cap & FLOW_CTRL_RX)
519                 adv = ADVERTISE_PAUSE_CAP | AD    568                 adv = ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM;
520         if (cap & FLOW_CTRL_TX)                   569         if (cap & FLOW_CTRL_TX)
521                 adv ^= ADVERTISE_PAUSE_ASYM;      570                 adv ^= ADVERTISE_PAUSE_ASYM;
522                                                   571 
523         return adv;                               572         return adv;
524 }                                                 573 }
525                                                   574 
526 /**                                               575 /**
527  * mii_resolve_flowctrl_fdx                       576  * mii_resolve_flowctrl_fdx
528  * @lcladv: value of MII ADVERTISE register       577  * @lcladv: value of MII ADVERTISE register
529  * @rmtadv: value of MII LPA register             578  * @rmtadv: value of MII LPA register
530  *                                                579  *
531  * Resolve full duplex flow control as per IEE    580  * Resolve full duplex flow control as per IEEE 802.3-2005 table 28B-3
532  */                                               581  */
533 static inline u8 mii_resolve_flowctrl_fdx(u16     582 static inline u8 mii_resolve_flowctrl_fdx(u16 lcladv, u16 rmtadv)
534 {                                                 583 {
535         u8 cap = 0;                               584         u8 cap = 0;
536                                                   585 
537         if (lcladv & rmtadv & ADVERTISE_PAUSE_    586         if (lcladv & rmtadv & ADVERTISE_PAUSE_CAP) {
538                 cap = FLOW_CTRL_TX | FLOW_CTRL    587                 cap = FLOW_CTRL_TX | FLOW_CTRL_RX;
539         } else if (lcladv & rmtadv & ADVERTISE    588         } else if (lcladv & rmtadv & ADVERTISE_PAUSE_ASYM) {
540                 if (lcladv & ADVERTISE_PAUSE_C    589                 if (lcladv & ADVERTISE_PAUSE_CAP)
541                         cap = FLOW_CTRL_RX;       590                         cap = FLOW_CTRL_RX;
542                 else if (rmtadv & ADVERTISE_PA    591                 else if (rmtadv & ADVERTISE_PAUSE_CAP)
543                         cap = FLOW_CTRL_TX;       592                         cap = FLOW_CTRL_TX;
544         }                                         593         }
545                                                   594 
546         return cap;                               595         return cap;
547 }                                              << 
548                                                << 
549 /**                                            << 
550  * mii_bmcr_encode_fixed - encode fixed speed/ << 
551  * @speed: a SPEED_* value                     << 
552  * @duplex: a DUPLEX_* value                   << 
553  *                                             << 
554  * Encode the speed and duplex to a BMCR value << 
555  * supported. 2500Mbps is encoded to 1000Mbps. << 
556  * Mbps. Unknown duplex values are encoded to  << 
557  */                                            << 
558 static inline u16 mii_bmcr_encode_fixed(int sp << 
559 {                                              << 
560         u16 bmcr;                              << 
561                                                << 
562         switch (speed) {                       << 
563         case SPEED_2500:                       << 
564         case SPEED_1000:                       << 
565                 bmcr = BMCR_SPEED1000;         << 
566                 break;                         << 
567                                                << 
568         case SPEED_100:                        << 
569                 bmcr = BMCR_SPEED100;          << 
570                 break;                         << 
571                                                << 
572         case SPEED_10:                         << 
573         default:                               << 
574                 bmcr = BMCR_SPEED10;           << 
575                 break;                         << 
576         }                                      << 
577                                                << 
578         if (duplex == DUPLEX_FULL)             << 
579                 bmcr |= BMCR_FULLDPLX;         << 
580                                                << 
581         return bmcr;                           << 
582 }                                                 596 }
583                                                   597 
584 #endif /* __LINUX_MII_H__ */                      598 #endif /* __LINUX_MII_H__ */
585                                                   599 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php