diff options
author | Ron Mercer <ron.mercer@qlogic.com> | 2007-03-26 16:43:01 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-04-28 11:01:02 -0400 |
commit | ec8263839aa8bc6eeee608a045e8f51738d7e436 (patch) | |
tree | 89ea32fe357fd544e71dd6b803bee77f00103e00 /drivers/net/qla3xxx.c | |
parent | f930e46a85a61895ef5c7c56c66c28272bec1ae1 (diff) |
qla3xxx: Add ethtool get_pauseparam for improved bonding support.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/qla3xxx.c')
-rwxr-xr-x | drivers/net/qla3xxx.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c index 04ea44a9e0f6..c2eb2c93803b 100755 --- a/drivers/net/qla3xxx.c +++ b/drivers/net/qla3xxx.c | |||
@@ -1624,6 +1624,23 @@ static void ql_set_msglevel(struct net_device *ndev, u32 value) | |||
1624 | qdev->msg_enable = value; | 1624 | qdev->msg_enable = value; |
1625 | } | 1625 | } |
1626 | 1626 | ||
1627 | static void ql_get_pauseparam(struct net_device *ndev, | ||
1628 | struct ethtool_pauseparam *pause) | ||
1629 | { | ||
1630 | struct ql3_adapter *qdev = netdev_priv(ndev); | ||
1631 | struct ql3xxx_port_registers __iomem *port_regs = qdev->mem_map_registers; | ||
1632 | |||
1633 | u32 reg; | ||
1634 | if(qdev->mac_index == 0) | ||
1635 | reg = ql_read_page0_reg(qdev, &port_regs->mac0ConfigReg); | ||
1636 | else | ||
1637 | reg = ql_read_page0_reg(qdev, &port_regs->mac1ConfigReg); | ||
1638 | |||
1639 | pause->autoneg = ql_get_auto_cfg_status(qdev); | ||
1640 | pause->rx_pause = (reg & MAC_CONFIG_REG_RF) >> 2; | ||
1641 | pause->tx_pause = (reg & MAC_CONFIG_REG_TF) >> 1; | ||
1642 | } | ||
1643 | |||
1627 | static const struct ethtool_ops ql3xxx_ethtool_ops = { | 1644 | static const struct ethtool_ops ql3xxx_ethtool_ops = { |
1628 | .get_settings = ql_get_settings, | 1645 | .get_settings = ql_get_settings, |
1629 | .get_drvinfo = ql_get_drvinfo, | 1646 | .get_drvinfo = ql_get_drvinfo, |
@@ -1631,6 +1648,7 @@ static const struct ethtool_ops ql3xxx_ethtool_ops = { | |||
1631 | .get_link = ethtool_op_get_link, | 1648 | .get_link = ethtool_op_get_link, |
1632 | .get_msglevel = ql_get_msglevel, | 1649 | .get_msglevel = ql_get_msglevel, |
1633 | .set_msglevel = ql_set_msglevel, | 1650 | .set_msglevel = ql_set_msglevel, |
1651 | .get_pauseparam = ql_get_pauseparam, | ||
1634 | }; | 1652 | }; |
1635 | 1653 | ||
1636 | static int ql_populate_free_queue(struct ql3_adapter *qdev) | 1654 | static int ql_populate_free_queue(struct ql3_adapter *qdev) |