diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-07-03 13:49:45 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-07-03 13:49:45 -0400 |
commit | 026477c1141b67e98e3bd8bdedb7d4b88a3ecd09 (patch) | |
tree | 2624a44924c625c367f3cebf937853b9da2de282 /drivers/net/bnx2.c | |
parent | 9f2fa466383ce100b90fe52cb4489d7a26bf72a9 (diff) | |
parent | 29454dde27d8e340bb1987bad9aa504af7081eba (diff) |
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r-- | drivers/net/bnx2.c | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 7635736cc791..4f4db5ae503b 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * Written by: Michael Chan (mchan@broadcom.com) | 9 | * Written by: Michael Chan (mchan@broadcom.com) |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | 12 | ||
14 | #include <linux/module.h> | 13 | #include <linux/module.h> |
15 | #include <linux/moduleparam.h> | 14 | #include <linux/moduleparam.h> |
@@ -57,8 +56,8 @@ | |||
57 | 56 | ||
58 | #define DRV_MODULE_NAME "bnx2" | 57 | #define DRV_MODULE_NAME "bnx2" |
59 | #define PFX DRV_MODULE_NAME ": " | 58 | #define PFX DRV_MODULE_NAME ": " |
60 | #define DRV_MODULE_VERSION "1.4.42" | 59 | #define DRV_MODULE_VERSION "1.4.43" |
61 | #define DRV_MODULE_RELDATE "June 12, 2006" | 60 | #define DRV_MODULE_RELDATE "June 28, 2006" |
62 | 61 | ||
63 | #define RUN_AT(x) (jiffies + (x)) | 62 | #define RUN_AT(x) (jiffies + (x)) |
64 | 63 | ||
@@ -1676,7 +1675,7 @@ bnx2_tx_int(struct bnx2 *bp) | |||
1676 | 1675 | ||
1677 | tx_free_bd += last + 1; | 1676 | tx_free_bd += last + 1; |
1678 | 1677 | ||
1679 | dev_kfree_skb_irq(skb); | 1678 | dev_kfree_skb(skb); |
1680 | 1679 | ||
1681 | hw_cons = bp->hw_tx_cons = | 1680 | hw_cons = bp->hw_tx_cons = |
1682 | sblk->status_tx_quick_consumer_index0; | 1681 | sblk->status_tx_quick_consumer_index0; |
@@ -1824,7 +1823,7 @@ reuse_rx: | |||
1824 | if ((len > (bp->dev->mtu + ETH_HLEN)) && | 1823 | if ((len > (bp->dev->mtu + ETH_HLEN)) && |
1825 | (ntohs(skb->protocol) != 0x8100)) { | 1824 | (ntohs(skb->protocol) != 0x8100)) { |
1826 | 1825 | ||
1827 | dev_kfree_skb_irq(skb); | 1826 | dev_kfree_skb(skb); |
1828 | goto next_rx; | 1827 | goto next_rx; |
1829 | 1828 | ||
1830 | } | 1829 | } |
@@ -3643,7 +3642,7 @@ bnx2_free_tx_skbs(struct bnx2 *bp) | |||
3643 | skb_shinfo(skb)->frags[j].size, | 3642 | skb_shinfo(skb)->frags[j].size, |
3644 | PCI_DMA_TODEVICE); | 3643 | PCI_DMA_TODEVICE); |
3645 | } | 3644 | } |
3646 | dev_kfree_skb_any(skb); | 3645 | dev_kfree_skb(skb); |
3647 | i += j + 1; | 3646 | i += j + 1; |
3648 | } | 3647 | } |
3649 | 3648 | ||
@@ -3669,7 +3668,7 @@ bnx2_free_rx_skbs(struct bnx2 *bp) | |||
3669 | 3668 | ||
3670 | rx_buf->skb = NULL; | 3669 | rx_buf->skb = NULL; |
3671 | 3670 | ||
3672 | dev_kfree_skb_any(skb); | 3671 | dev_kfree_skb(skb); |
3673 | } | 3672 | } |
3674 | } | 3673 | } |
3675 | 3674 | ||
@@ -3999,7 +3998,7 @@ bnx2_run_loopback(struct bnx2 *bp, int loopback_mode) | |||
3999 | udelay(5); | 3998 | udelay(5); |
4000 | 3999 | ||
4001 | pci_unmap_single(bp->pdev, map, pkt_size, PCI_DMA_TODEVICE); | 4000 | pci_unmap_single(bp->pdev, map, pkt_size, PCI_DMA_TODEVICE); |
4002 | dev_kfree_skb_irq(skb); | 4001 | dev_kfree_skb(skb); |
4003 | 4002 | ||
4004 | if (bp->status_blk->status_tx_quick_consumer_index0 != bp->tx_prod) { | 4003 | if (bp->status_blk->status_tx_quick_consumer_index0 != bp->tx_prod) { |
4005 | goto loopback_test_done; | 4004 | goto loopback_test_done; |
@@ -4261,11 +4260,11 @@ bnx2_open(struct net_device *dev) | |||
4261 | } | 4260 | } |
4262 | else { | 4261 | else { |
4263 | rc = request_irq(bp->pdev->irq, bnx2_interrupt, | 4262 | rc = request_irq(bp->pdev->irq, bnx2_interrupt, |
4264 | SA_SHIRQ, dev->name, dev); | 4263 | IRQF_SHARED, dev->name, dev); |
4265 | } | 4264 | } |
4266 | } | 4265 | } |
4267 | else { | 4266 | else { |
4268 | rc = request_irq(bp->pdev->irq, bnx2_interrupt, SA_SHIRQ, | 4267 | rc = request_irq(bp->pdev->irq, bnx2_interrupt, IRQF_SHARED, |
4269 | dev->name, dev); | 4268 | dev->name, dev); |
4270 | } | 4269 | } |
4271 | if (rc) { | 4270 | if (rc) { |
@@ -4312,7 +4311,7 @@ bnx2_open(struct net_device *dev) | |||
4312 | 4311 | ||
4313 | if (!rc) { | 4312 | if (!rc) { |
4314 | rc = request_irq(bp->pdev->irq, bnx2_interrupt, | 4313 | rc = request_irq(bp->pdev->irq, bnx2_interrupt, |
4315 | SA_SHIRQ, dev->name, dev); | 4314 | IRQF_SHARED, dev->name, dev); |
4316 | } | 4315 | } |
4317 | if (rc) { | 4316 | if (rc) { |
4318 | bnx2_free_skbs(bp); | 4317 | bnx2_free_skbs(bp); |
@@ -4541,7 +4540,7 @@ bnx2_close(struct net_device *dev) | |||
4541 | bnx2_netif_stop(bp); | 4540 | bnx2_netif_stop(bp); |
4542 | del_timer_sync(&bp->timer); | 4541 | del_timer_sync(&bp->timer); |
4543 | if (bp->flags & NO_WOL_FLAG) | 4542 | if (bp->flags & NO_WOL_FLAG) |
4544 | reset_code = BNX2_DRV_MSG_CODE_UNLOAD; | 4543 | reset_code = BNX2_DRV_MSG_CODE_UNLOAD_LNK_DN; |
4545 | else if (bp->wol) | 4544 | else if (bp->wol) |
4546 | reset_code = BNX2_DRV_MSG_CODE_SUSPEND_WOL; | 4545 | reset_code = BNX2_DRV_MSG_CODE_SUSPEND_WOL; |
4547 | else | 4546 | else |
@@ -5128,6 +5127,16 @@ bnx2_set_rx_csum(struct net_device *dev, u32 data) | |||
5128 | return 0; | 5127 | return 0; |
5129 | } | 5128 | } |
5130 | 5129 | ||
5130 | static int | ||
5131 | bnx2_set_tso(struct net_device *dev, u32 data) | ||
5132 | { | ||
5133 | if (data) | ||
5134 | dev->features |= NETIF_F_TSO | NETIF_F_TSO_ECN; | ||
5135 | else | ||
5136 | dev->features &= ~(NETIF_F_TSO | NETIF_F_TSO_ECN); | ||
5137 | return 0; | ||
5138 | } | ||
5139 | |||
5131 | #define BNX2_NUM_STATS 46 | 5140 | #define BNX2_NUM_STATS 46 |
5132 | 5141 | ||
5133 | static struct { | 5142 | static struct { |
@@ -5445,7 +5454,7 @@ static struct ethtool_ops bnx2_ethtool_ops = { | |||
5445 | .set_sg = ethtool_op_set_sg, | 5454 | .set_sg = ethtool_op_set_sg, |
5446 | #ifdef BCM_TSO | 5455 | #ifdef BCM_TSO |
5447 | .get_tso = ethtool_op_get_tso, | 5456 | .get_tso = ethtool_op_get_tso, |
5448 | .set_tso = ethtool_op_set_tso, | 5457 | .set_tso = bnx2_set_tso, |
5449 | #endif | 5458 | #endif |
5450 | .self_test_count = bnx2_self_test_count, | 5459 | .self_test_count = bnx2_self_test_count, |
5451 | .self_test = bnx2_self_test, | 5460 | .self_test = bnx2_self_test, |
@@ -5926,7 +5935,7 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
5926 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; | 5935 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; |
5927 | #endif | 5936 | #endif |
5928 | #ifdef BCM_TSO | 5937 | #ifdef BCM_TSO |
5929 | dev->features |= NETIF_F_TSO; | 5938 | dev->features |= NETIF_F_TSO | NETIF_F_TSO_ECN; |
5930 | #endif | 5939 | #endif |
5931 | 5940 | ||
5932 | netif_carrier_off(bp->dev); | 5941 | netif_carrier_off(bp->dev); |
@@ -5968,7 +5977,7 @@ bnx2_suspend(struct pci_dev *pdev, pm_message_t state) | |||
5968 | netif_device_detach(dev); | 5977 | netif_device_detach(dev); |
5969 | del_timer_sync(&bp->timer); | 5978 | del_timer_sync(&bp->timer); |
5970 | if (bp->flags & NO_WOL_FLAG) | 5979 | if (bp->flags & NO_WOL_FLAG) |
5971 | reset_code = BNX2_DRV_MSG_CODE_UNLOAD; | 5980 | reset_code = BNX2_DRV_MSG_CODE_UNLOAD_LNK_DN; |
5972 | else if (bp->wol) | 5981 | else if (bp->wol) |
5973 | reset_code = BNX2_DRV_MSG_CODE_SUSPEND_WOL; | 5982 | reset_code = BNX2_DRV_MSG_CODE_SUSPEND_WOL; |
5974 | else | 5983 | else |