10 #include <linux/kernel.h>
11 #include <linux/capability.h>
12 #include <linux/errno.h>
13 #include <linux/ethtool.h>
14 #include <linux/mdio.h>
15 #include <linux/module.h>
18 MODULE_AUTHOR(
"Copyright 2006-2009 Solarflare Communications Inc.");
31 int mmd, stat2, devs1, devs2;
35 for (mmd = 1; mmd <= 5; mmd++) {
45 if (devs1 < 0 || devs2 < 0)
49 mdio->
mmds = devs1 | (devs2 << 16);
73 int old_val = mdio->
mdio_read(mdio->
dev, prtad, devad, addr);
79 new_val = old_val |
mask;
81 new_val = old_val & ~mask;
82 if (old_val == new_val)
84 return mdio->
mdio_write(mdio->
dev, prtad, devad, addr, new_val);
108 for (devad = 0; mmd_mask; devad++) {
109 if (mmd_mask & (1 << devad)) {
110 mmd_mask &= ~(1 << devad);
188 u32 npage_adv,
u32 npage_lpa)
322 ethtool_cmd_speed_set(ecmd, speed);
364 if (adv != old_adv) {
403 mdio_phy_id_is_c45(mii_data->
phy_id)) {
404 prtad = mdio_phy_id_prtad(mii_data->
phy_id);
405 devad = mdio_phy_id_devad(mii_data->
phy_id);
407 mii_data->
phy_id < 0x20) {