diff options
author | Ron Mercer <ron.mercer@qlogic.com> | 2009-10-30 13:13:33 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-02 13:25:40 +0100 |
commit | 9dfbbaa6b0b9f7c4d6c9dc3a59006f44e6521138 (patch) | |
tree | d0c93bae849fc79ab01c38974b02b949f1b623ec /drivers/net/qlge/qlge_main.c | |
parent | ipv6: no more dev_put() in datagram_send_ctl() (diff) | |
download | linux-9dfbbaa6b0b9f7c4d6c9dc3a59006f44e6521138.tar.xz linux-9dfbbaa6b0b9f7c4d6c9dc3a59006f44e6521138.zip |
qlge: Add ethtool self-test.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlge/qlge_main.c')
-rw-r--r-- | drivers/net/qlge/qlge_main.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 42ad811ec313..4de054505ec6 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c @@ -1680,6 +1680,13 @@ static void ql_process_mac_rx_intr(struct ql_adapter *qdev, return; } + /* loopback self test for ethtool */ + if (test_bit(QL_SELFTEST, &qdev->flags)) { + ql_check_lb_frame(qdev, skb); + dev_kfree_skb_any(skb); + return; + } + prefetch(skb->data); skb->dev = ndev; if (ib_mac_rsp->flags1 & IB_MAC_IOCB_RSP_M_MASK) { @@ -2248,6 +2255,7 @@ static netdev_tx_t qlge_send(struct sk_buff *skb, struct net_device *ndev) return NETDEV_TX_OK; } + static void ql_free_shadow_space(struct ql_adapter *qdev) { if (qdev->rx_ring_shadow_reg_area) { @@ -4174,7 +4182,6 @@ err_out: return err; } - static const struct net_device_ops qlge_netdev_ops = { .ndo_open = qlge_open, .ndo_stop = qlge_close, @@ -4243,10 +4250,21 @@ static int __devinit qlge_probe(struct pci_dev *pdev, } ql_link_off(qdev); ql_display_dev_info(ndev); + atomic_set(&qdev->lb_count, 0); cards_found++; return 0; } +netdev_tx_t ql_lb_send(struct sk_buff *skb, struct net_device *ndev) +{ + return qlge_send(skb, ndev); +} + +int ql_clean_lb_rx_ring(struct rx_ring *rx_ring, int budget) +{ + return ql_clean_inbound_rx_ring(rx_ring, budget); +} + static void __devexit qlge_remove(struct pci_dev *pdev) { struct net_device *ndev = pci_get_drvdata(pdev); |