diff options
author | David S. Miller <davem@davemloft.net> | 2012-04-10 14:30:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-10 14:30:45 -0400 |
commit | 06eb4eafbdc0796d741d139a44f1253278da8611 (patch) | |
tree | fbdb44317130c371928154c9e6903e699fe2b995 /drivers/net/ethernet/marvell | |
parent | 32ed53b83ea5ec26a4dba90e18f5e0ff6c71eb48 (diff) | |
parent | f68e556e23d1a4176b563bcb25d8baf2c5313f91 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/net/ethernet/marvell')
-rw-r--r-- | drivers/net/ethernet/marvell/mv643xx_eth.c | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/marvell/pxa168_eth.c | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/marvell/sky2.c | 18 |
3 files changed, 15 insertions, 5 deletions
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c index 153d33210e89..c8950da60e6b 100644 --- a/drivers/net/ethernet/marvell/mv643xx_eth.c +++ b/drivers/net/ethernet/marvell/mv643xx_eth.c | |||
@@ -57,7 +57,6 @@ | |||
57 | #include <linux/types.h> | 57 | #include <linux/types.h> |
58 | #include <linux/inet_lro.h> | 58 | #include <linux/inet_lro.h> |
59 | #include <linux/slab.h> | 59 | #include <linux/slab.h> |
60 | #include <asm/system.h> | ||
61 | 60 | ||
62 | static char mv643xx_eth_driver_name[] = "mv643xx_eth"; | 61 | static char mv643xx_eth_driver_name[] = "mv643xx_eth"; |
63 | static char mv643xx_eth_driver_version[] = "1.4"; | 62 | static char mv643xx_eth_driver_version[] = "1.4"; |
diff --git a/drivers/net/ethernet/marvell/pxa168_eth.c b/drivers/net/ethernet/marvell/pxa168_eth.c index 44bad608eed7..1db023b075a1 100644 --- a/drivers/net/ethernet/marvell/pxa168_eth.c +++ b/drivers/net/ethernet/marvell/pxa168_eth.c | |||
@@ -43,7 +43,6 @@ | |||
43 | #include <linux/interrupt.h> | 43 | #include <linux/interrupt.h> |
44 | #include <linux/types.h> | 44 | #include <linux/types.h> |
45 | #include <asm/pgtable.h> | 45 | #include <asm/pgtable.h> |
46 | #include <asm/system.h> | ||
47 | #include <asm/cacheflush.h> | 46 | #include <asm/cacheflush.h> |
48 | #include <linux/pxa168_eth.h> | 47 | #include <linux/pxa168_eth.h> |
49 | 48 | ||
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c index 20a59322c79d..7732474263da 100644 --- a/drivers/net/ethernet/marvell/sky2.c +++ b/drivers/net/ethernet/marvell/sky2.c | |||
@@ -1767,13 +1767,14 @@ static int sky2_open(struct net_device *dev) | |||
1767 | 1767 | ||
1768 | sky2_hw_up(sky2); | 1768 | sky2_hw_up(sky2); |
1769 | 1769 | ||
1770 | /* Enable interrupts from phy/mac for port */ | ||
1771 | imask = sky2_read32(hw, B0_IMSK); | ||
1772 | |||
1770 | if (hw->chip_id == CHIP_ID_YUKON_OPT || | 1773 | if (hw->chip_id == CHIP_ID_YUKON_OPT || |
1771 | hw->chip_id == CHIP_ID_YUKON_PRM || | 1774 | hw->chip_id == CHIP_ID_YUKON_PRM || |
1772 | hw->chip_id == CHIP_ID_YUKON_OP_2) | 1775 | hw->chip_id == CHIP_ID_YUKON_OP_2) |
1773 | imask |= Y2_IS_PHY_QLNK; /* enable PHY Quick Link */ | 1776 | imask |= Y2_IS_PHY_QLNK; /* enable PHY Quick Link */ |
1774 | 1777 | ||
1775 | /* Enable interrupts from phy/mac for port */ | ||
1776 | imask = sky2_read32(hw, B0_IMSK); | ||
1777 | imask |= portirq_msk[port]; | 1778 | imask |= portirq_msk[port]; |
1778 | sky2_write32(hw, B0_IMSK, imask); | 1779 | sky2_write32(hw, B0_IMSK, imask); |
1779 | sky2_read32(hw, B0_IMSK); | 1780 | sky2_read32(hw, B0_IMSK); |
@@ -2468,6 +2469,17 @@ static int sky2_change_mtu(struct net_device *dev, int new_mtu) | |||
2468 | return err; | 2469 | return err; |
2469 | } | 2470 | } |
2470 | 2471 | ||
2472 | static inline bool needs_copy(const struct rx_ring_info *re, | ||
2473 | unsigned length) | ||
2474 | { | ||
2475 | #ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS | ||
2476 | /* Some architectures need the IP header to be aligned */ | ||
2477 | if (!IS_ALIGNED(re->data_addr + ETH_HLEN, sizeof(u32))) | ||
2478 | return true; | ||
2479 | #endif | ||
2480 | return length < copybreak; | ||
2481 | } | ||
2482 | |||
2471 | /* For small just reuse existing skb for next receive */ | 2483 | /* For small just reuse existing skb for next receive */ |
2472 | static struct sk_buff *receive_copy(struct sky2_port *sky2, | 2484 | static struct sk_buff *receive_copy(struct sky2_port *sky2, |
2473 | const struct rx_ring_info *re, | 2485 | const struct rx_ring_info *re, |
@@ -2598,7 +2610,7 @@ static struct sk_buff *sky2_receive(struct net_device *dev, | |||
2598 | goto error; | 2610 | goto error; |
2599 | 2611 | ||
2600 | okay: | 2612 | okay: |
2601 | if (length < copybreak) | 2613 | if (needs_copy(re, length)) |
2602 | skb = receive_copy(sky2, re, length); | 2614 | skb = receive_copy(sky2, re, length); |
2603 | else | 2615 | else |
2604 | skb = receive_new(sky2, re, length); | 2616 | skb = receive_new(sky2, re, length); |