diff options
Diffstat (limited to 'drivers/net/acenic.c')
-rw-r--r-- | drivers/net/acenic.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/net/acenic.c b/drivers/net/acenic.c index b9a591604e5b..d7c1bfe4b6ec 100644 --- a/drivers/net/acenic.c +++ b/drivers/net/acenic.c | |||
@@ -68,6 +68,7 @@ | |||
68 | #include <linux/sockios.h> | 68 | #include <linux/sockios.h> |
69 | #include <linux/firmware.h> | 69 | #include <linux/firmware.h> |
70 | #include <linux/slab.h> | 70 | #include <linux/slab.h> |
71 | #include <linux/prefetch.h> | ||
71 | 72 | ||
72 | #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) | 73 | #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) |
73 | #include <linux/if_vlan.h> | 74 | #include <linux/if_vlan.h> |
@@ -1584,7 +1585,7 @@ static void ace_watchdog(struct net_device *data) | |||
1584 | /* | 1585 | /* |
1585 | * We haven't received a stats update event for more than 2.5 | 1586 | * We haven't received a stats update event for more than 2.5 |
1586 | * seconds and there is data in the transmit queue, thus we | 1587 | * seconds and there is data in the transmit queue, thus we |
1587 | * asume the card is stuck. | 1588 | * assume the card is stuck. |
1588 | */ | 1589 | */ |
1589 | if (*ap->tx_csm != ap->tx_ret_csm) { | 1590 | if (*ap->tx_csm != ap->tx_ret_csm) { |
1590 | printk(KERN_WARNING "%s: Transmitter is stuck, %08x\n", | 1591 | printk(KERN_WARNING "%s: Transmitter is stuck, %08x\n", |
@@ -2033,7 +2034,7 @@ static void ace_rx_int(struct net_device *dev, u32 rxretprd, u32 rxretcsm) | |||
2033 | skb->csum = htons(csum); | 2034 | skb->csum = htons(csum); |
2034 | skb->ip_summed = CHECKSUM_COMPLETE; | 2035 | skb->ip_summed = CHECKSUM_COMPLETE; |
2035 | } else { | 2036 | } else { |
2036 | skb->ip_summed = CHECKSUM_NONE; | 2037 | skb_checksum_none_assert(skb); |
2037 | } | 2038 | } |
2038 | 2039 | ||
2039 | /* send it up */ | 2040 | /* send it up */ |
@@ -2564,7 +2565,7 @@ restart: | |||
2564 | 2565 | ||
2565 | /* | 2566 | /* |
2566 | * A TX-descriptor producer (an IRQ) might have gotten | 2567 | * A TX-descriptor producer (an IRQ) might have gotten |
2567 | * inbetween, making the ring free again. Since xmit is | 2568 | * between, making the ring free again. Since xmit is |
2568 | * serialized, this is the only situation we have to | 2569 | * serialized, this is the only situation we have to |
2569 | * re-test. | 2570 | * re-test. |
2570 | */ | 2571 | */ |
@@ -2658,15 +2659,15 @@ static int ace_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd) | |||
2658 | 2659 | ||
2659 | link = readl(®s->GigLnkState); | 2660 | link = readl(®s->GigLnkState); |
2660 | if (link & LNK_1000MB) | 2661 | if (link & LNK_1000MB) |
2661 | ecmd->speed = SPEED_1000; | 2662 | ethtool_cmd_speed_set(ecmd, SPEED_1000); |
2662 | else { | 2663 | else { |
2663 | link = readl(®s->FastLnkState); | 2664 | link = readl(®s->FastLnkState); |
2664 | if (link & LNK_100MB) | 2665 | if (link & LNK_100MB) |
2665 | ecmd->speed = SPEED_100; | 2666 | ethtool_cmd_speed_set(ecmd, SPEED_100); |
2666 | else if (link & LNK_10MB) | 2667 | else if (link & LNK_10MB) |
2667 | ecmd->speed = SPEED_10; | 2668 | ethtool_cmd_speed_set(ecmd, SPEED_10); |
2668 | else | 2669 | else |
2669 | ecmd->speed = 0; | 2670 | ethtool_cmd_speed_set(ecmd, 0); |
2670 | } | 2671 | } |
2671 | if (link & LNK_FULL_DUPLEX) | 2672 | if (link & LNK_FULL_DUPLEX) |
2672 | ecmd->duplex = DUPLEX_FULL; | 2673 | ecmd->duplex = DUPLEX_FULL; |
@@ -2718,9 +2719,9 @@ static int ace_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) | |||
2718 | link |= LNK_TX_FLOW_CTL_Y; | 2719 | link |= LNK_TX_FLOW_CTL_Y; |
2719 | if (ecmd->autoneg == AUTONEG_ENABLE) | 2720 | if (ecmd->autoneg == AUTONEG_ENABLE) |
2720 | link |= LNK_NEGOTIATE; | 2721 | link |= LNK_NEGOTIATE; |
2721 | if (ecmd->speed != speed) { | 2722 | if (ethtool_cmd_speed(ecmd) != speed) { |
2722 | link &= ~(LNK_1000MB | LNK_100MB | LNK_10MB); | 2723 | link &= ~(LNK_1000MB | LNK_100MB | LNK_10MB); |
2723 | switch (speed) { | 2724 | switch (ethtool_cmd_speed(ecmd)) { |
2724 | case SPEED_1000: | 2725 | case SPEED_1000: |
2725 | link |= LNK_1000MB; | 2726 | link |= LNK_1000MB; |
2726 | break; | 2727 | break; |