diff options
author | Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org> | 2012-07-26 06:15:46 -0400 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2012-08-15 09:58:09 -0400 |
commit | 58569aee5a1a5dcc25c34a0a2ed9a377874e6b05 (patch) | |
tree | bb41415f9e3d885a6282f9fca61439b9d3b19fcf /arch/arm/plat-orion | |
parent | 0d7614f09c1ebdbaa1599a5aba7593f147bf96ee (diff) |
ARM: Orion: Set eth packet size csum offload limit
The mv643xx ethernet controller limits the packet size for the TX
checksum offloading. This patch sets this limits for Kirkwood and
Dove which have smaller limits that the default.
As a side note, this patch is an updated version of a patch sent some years
ago: http://lists.infradead.org/pipermail/linux-arm-kernel/2010-June/017320.html
which seems to have been lost.
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Cc: <stable@vger.kernel.org>
Diffstat (limited to 'arch/arm/plat-orion')
-rw-r--r-- | arch/arm/plat-orion/common.c | 8 | ||||
-rw-r--r-- | arch/arm/plat-orion/include/plat/common.h | 6 |
2 files changed, 10 insertions, 4 deletions
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index d245a87dc014..b8b747a9d360 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c | |||
@@ -291,10 +291,12 @@ static struct platform_device orion_ge00 = { | |||
291 | void __init orion_ge00_init(struct mv643xx_eth_platform_data *eth_data, | 291 | void __init orion_ge00_init(struct mv643xx_eth_platform_data *eth_data, |
292 | unsigned long mapbase, | 292 | unsigned long mapbase, |
293 | unsigned long irq, | 293 | unsigned long irq, |
294 | unsigned long irq_err) | 294 | unsigned long irq_err, |
295 | unsigned int tx_csum_limit) | ||
295 | { | 296 | { |
296 | fill_resources(&orion_ge00_shared, orion_ge00_shared_resources, | 297 | fill_resources(&orion_ge00_shared, orion_ge00_shared_resources, |
297 | mapbase + 0x2000, SZ_16K - 1, irq_err); | 298 | mapbase + 0x2000, SZ_16K - 1, irq_err); |
299 | orion_ge00_shared_data.tx_csum_limit = tx_csum_limit; | ||
298 | ge_complete(&orion_ge00_shared_data, | 300 | ge_complete(&orion_ge00_shared_data, |
299 | orion_ge00_resources, irq, &orion_ge00_shared, | 301 | orion_ge00_resources, irq, &orion_ge00_shared, |
300 | eth_data, &orion_ge00); | 302 | eth_data, &orion_ge00); |
@@ -343,10 +345,12 @@ static struct platform_device orion_ge01 = { | |||
343 | void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data, | 345 | void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data, |
344 | unsigned long mapbase, | 346 | unsigned long mapbase, |
345 | unsigned long irq, | 347 | unsigned long irq, |
346 | unsigned long irq_err) | 348 | unsigned long irq_err, |
349 | unsigned int tx_csum_limit) | ||
347 | { | 350 | { |
348 | fill_resources(&orion_ge01_shared, orion_ge01_shared_resources, | 351 | fill_resources(&orion_ge01_shared, orion_ge01_shared_resources, |
349 | mapbase + 0x2000, SZ_16K - 1, irq_err); | 352 | mapbase + 0x2000, SZ_16K - 1, irq_err); |
353 | orion_ge01_shared_data.tx_csum_limit = tx_csum_limit; | ||
350 | ge_complete(&orion_ge01_shared_data, | 354 | ge_complete(&orion_ge01_shared_data, |
351 | orion_ge01_resources, irq, &orion_ge01_shared, | 355 | orion_ge01_resources, irq, &orion_ge01_shared, |
352 | eth_data, &orion_ge01); | 356 | eth_data, &orion_ge01); |
diff --git a/arch/arm/plat-orion/include/plat/common.h b/arch/arm/plat-orion/include/plat/common.h index e00fdb213609..ae2377ef63e5 100644 --- a/arch/arm/plat-orion/include/plat/common.h +++ b/arch/arm/plat-orion/include/plat/common.h | |||
@@ -39,12 +39,14 @@ void __init orion_rtc_init(unsigned long mapbase, | |||
39 | void __init orion_ge00_init(struct mv643xx_eth_platform_data *eth_data, | 39 | void __init orion_ge00_init(struct mv643xx_eth_platform_data *eth_data, |
40 | unsigned long mapbase, | 40 | unsigned long mapbase, |
41 | unsigned long irq, | 41 | unsigned long irq, |
42 | unsigned long irq_err); | 42 | unsigned long irq_err, |
43 | unsigned int tx_csum_limit); | ||
43 | 44 | ||
44 | void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data, | 45 | void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data, |
45 | unsigned long mapbase, | 46 | unsigned long mapbase, |
46 | unsigned long irq, | 47 | unsigned long irq, |
47 | unsigned long irq_err); | 48 | unsigned long irq_err, |
49 | unsigned int tx_csum_limit); | ||
48 | 50 | ||
49 | void __init orion_ge10_init(struct mv643xx_eth_platform_data *eth_data, | 51 | void __init orion_ge10_init(struct mv643xx_eth_platform_data *eth_data, |
50 | unsigned long mapbase, | 52 | unsigned long mapbase, |