summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRon Mercer <ron.mercer@qlogic.com>2007-03-26 22:43:01 +0200
committerJeff Garzik <jeff@garzik.org>2007-04-28 17:01:02 +0200
commitec8263839aa8bc6eeee608a045e8f51738d7e436 (patch)
tree89ea32fe357fd544e71dd6b803bee77f00103e00 /drivers
parentremove unused header file: drivers/net/skfp/h/lnkstat.h (diff)
downloadlinux-ec8263839aa8bc6eeee608a045e8f51738d7e436.tar.xz
linux-ec8263839aa8bc6eeee608a045e8f51738d7e436.zip
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 '')
-rwxr-xr-xdrivers/net/qla3xxx.c18
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)
qdev->msg_enable = value;
}
+static void ql_get_pauseparam(struct net_device *ndev,
+ struct ethtool_pauseparam *pause)
+{
+ struct ql3_adapter *qdev = netdev_priv(ndev);
+ struct ql3xxx_port_registers __iomem *port_regs = qdev->mem_map_registers;
+
+ u32 reg;
+ if(qdev->mac_index == 0)
+ reg = ql_read_page0_reg(qdev, &port_regs->mac0ConfigReg);
+ else
+ reg = ql_read_page0_reg(qdev, &port_regs->mac1ConfigReg);
+
+ pause->autoneg = ql_get_auto_cfg_status(qdev);
+ pause->rx_pause = (reg & MAC_CONFIG_REG_RF) >> 2;
+ pause->tx_pause = (reg & MAC_CONFIG_REG_TF) >> 1;
+}
+
static const struct ethtool_ops ql3xxx_ethtool_ops = {
.get_settings = ql_get_settings,
.get_drvinfo = ql_get_drvinfo,
@@ -1631,6 +1648,7 @@ static const struct ethtool_ops ql3xxx_ethtool_ops = {
.get_link = ethtool_op_get_link,
.get_msglevel = ql_get_msglevel,
.set_msglevel = ql_set_msglevel,
+ .get_pauseparam = ql_get_pauseparam,
};
static int ql_populate_free_queue(struct ql3_adapter *qdev)