Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mii: add kernel-doc notation

Add kernel-doc notation to drivers/net/mii.c functions.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

authored by

Randy Dunlap and committed by
Jeff Garzik
32684ec6 493a684a

+57
+57
drivers/net/mii.c
··· 33 33 #include <linux/ethtool.h> 34 34 #include <linux/mii.h> 35 35 36 + /** 37 + * mii_ethtool_gset - get settings that are specified in @ecmd 38 + * @mii: MII interface 39 + * @ecmd: requested ethtool_cmd 40 + * 41 + * Returns 0 for success, negative on error. 42 + */ 36 43 int mii_ethtool_gset(struct mii_if_info *mii, struct ethtool_cmd *ecmd) 37 44 { 38 45 struct net_device *dev = mii->dev; ··· 121 114 return 0; 122 115 } 123 116 117 + /** 118 + * mii_ethtool_sset - set settings that are specified in @ecmd 119 + * @mii: MII interface 120 + * @ecmd: requested ethtool_cmd 121 + * 122 + * Returns 0 for success, negative on error. 123 + */ 124 124 int mii_ethtool_sset(struct mii_if_info *mii, struct ethtool_cmd *ecmd) 125 125 { 126 126 struct net_device *dev = mii->dev; ··· 221 207 return 0; 222 208 } 223 209 210 + /** 211 + * mii_check_gmii_support - check if the MII supports Gb interfaces 212 + * @mii: the MII interface 213 + */ 224 214 int mii_check_gmii_support(struct mii_if_info *mii) 225 215 { 226 216 int reg; ··· 239 221 return 0; 240 222 } 241 223 224 + /** 225 + * mii_link_ok - is link status up/ok 226 + * @mii: the MII interface 227 + * 228 + * Returns 1 if the MII reports link status up/ok, 0 otherwise. 229 + */ 242 230 int mii_link_ok (struct mii_if_info *mii) 243 231 { 244 232 /* first, a dummy read, needed to latch some MII phys */ ··· 254 230 return 0; 255 231 } 256 232 233 + /** 234 + * mii_nway_restart - restart NWay (autonegotiation) for this interface 235 + * @mii: the MII interface 236 + * 237 + * Returns 0 on success, negative on error. 238 + */ 257 239 int mii_nway_restart (struct mii_if_info *mii) 258 240 { 259 241 int bmcr; ··· 277 247 return r; 278 248 } 279 249 250 + /** 251 + * mii_check_link - check MII link status 252 + * @mii: MII interface 253 + * 254 + * If the link status changed (previous != current), call 255 + * netif_carrier_on() if current link status is Up or call 256 + * netif_carrier_off() if current link status is Down. 257 + */ 280 258 void mii_check_link (struct mii_if_info *mii) 281 259 { 282 260 int cur_link = mii_link_ok(mii); ··· 296 258 netif_carrier_off(mii->dev); 297 259 } 298 260 261 + /** 262 + * mii_check_media - check the MII interface for a duplex change 263 + * @mii: the MII interface 264 + * @ok_to_print: OK to print link up/down messages 265 + * @init_media: OK to save duplex mode in @mii 266 + * 267 + * Returns 1 if the duplex mode changed, 0 if not. 268 + * If the media type is forced, always returns 0. 269 + */ 299 270 unsigned int mii_check_media (struct mii_if_info *mii, 300 271 unsigned int ok_to_print, 301 272 unsigned int init_media) ··· 373 326 return 0; /* duplex did not change */ 374 327 } 375 328 329 + /** 330 + * generic_mii_ioctl - main MII ioctl interface 331 + * @mii_if: the MII interface 332 + * @mii_data: MII ioctl data structure 333 + * @cmd: MII ioctl command 334 + * @duplex_chg_out: pointer to @duplex_changed status if there was no 335 + * ioctl error 336 + * 337 + * Returns 0 on success, negative on error. 338 + */ 376 339 int generic_mii_ioctl(struct mii_if_info *mii_if, 377 340 struct mii_ioctl_data *mii_data, int cmd, 378 341 unsigned int *duplex_chg_out)