Guest User

patch for ls-wvl: Kirkwood jumbo frame fix

a guest
Mar 3rd, 2013
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.27 KB | None | 0 0
  1. diff -rupN linux-3.3.4-orig/arch/arm/mach-dove/common.c linux-3.3.4/arch/arm/mach-dove/common.c
  2. --- linux-3.3.4-orig/arch/arm/mach-dove/common.c 2012-04-28 01:17:35.000000000 +0800
  3. +++ linux-3.3.4/arch/arm/mach-dove/common.c 2012-05-07 17:58:22.746247051 +0800
  4. @@ -88,7 +88,7 @@ void __init dove_ehci1_init(void)
  5. ****************************************************************************/
  6. void __init dove_ge00_init(struct mv643xx_eth_platform_data *eth_data)
  7. {
  8. - orion_ge00_init(eth_data,
  9. + orion_ge00_init(eth_data, 1600,
  10. DOVE_GE00_PHYS_BASE, IRQ_DOVE_GE00_SUM,
  11. 0, get_tclk());
  12. }
  13. diff -rupN linux-3.3.4-orig/arch/arm/mach-kirkwood/common.c linux-3.3.4/arch/arm/mach-kirkwood/common.c
  14. --- linux-3.3.4-orig/arch/arm/mach-kirkwood/common.c 2012-04-28 01:17:35.000000000 +0800
  15. +++ linux-3.3.4/arch/arm/mach-kirkwood/common.c 2012-05-07 17:58:22.750247010 +0800
  16. @@ -85,7 +85,7 @@ void __init kirkwood_ge00_init(struct mv
  17. {
  18. kirkwood_clk_ctrl |= CGC_GE0;
  19.  
  20. - orion_ge00_init(eth_data,
  21. + orion_ge00_init(eth_data, 1600,
  22. GE00_PHYS_BASE, IRQ_KIRKWOOD_GE00_SUM,
  23. IRQ_KIRKWOOD_GE00_ERR, kirkwood_tclk);
  24. }
  25. @@ -99,7 +99,7 @@ void __init kirkwood_ge01_init(struct mv
  26.  
  27. kirkwood_clk_ctrl |= CGC_GE1;
  28.  
  29. - orion_ge01_init(eth_data,
  30. + orion_ge01_init(eth_data, 1600,
  31. GE01_PHYS_BASE, IRQ_KIRKWOOD_GE01_SUM,
  32. IRQ_KIRKWOOD_GE01_ERR, kirkwood_tclk);
  33. }
  34. diff -rupN linux-3.3.4-orig/arch/arm/mach-mv78xx0/common.c linux-3.3.4/arch/arm/mach-mv78xx0/common.c
  35. --- linux-3.3.4-orig/arch/arm/mach-mv78xx0/common.c 2012-04-28 01:17:35.000000000 +0800
  36. +++ linux-3.3.4/arch/arm/mach-mv78xx0/common.c 2012-05-07 17:58:22.758246917 +0800
  37. @@ -197,7 +197,7 @@ void __init mv78xx0_ehci2_init(void)
  38. ****************************************************************************/
  39. void __init mv78xx0_ge00_init(struct mv643xx_eth_platform_data *eth_data)
  40. {
  41. - orion_ge00_init(eth_data,
  42. + orion_ge00_init(eth_data, 0,
  43. GE00_PHYS_BASE, IRQ_MV78XX0_GE00_SUM,
  44. IRQ_MV78XX0_GE_ERR, get_tclk());
  45. }
  46. @@ -208,7 +208,7 @@ void __init mv78xx0_ge00_init(struct mv6
  47. ****************************************************************************/
  48. void __init mv78xx0_ge01_init(struct mv643xx_eth_platform_data *eth_data)
  49. {
  50. - orion_ge01_init(eth_data,
  51. + orion_ge01_init(eth_data, 0,
  52. GE01_PHYS_BASE, IRQ_MV78XX0_GE01_SUM,
  53. NO_IRQ, get_tclk());
  54. }
  55. diff -rupN linux-3.3.4-orig/arch/arm/mach-orion5x/common.c linux-3.3.4/arch/arm/mach-orion5x/common.c
  56. --- linux-3.3.4-orig/arch/arm/mach-orion5x/common.c 2012-04-28 01:17:35.000000000 +0800
  57. +++ linux-3.3.4/arch/arm/mach-orion5x/common.c 2012-05-07 17:58:22.762246865 +0800
  58. @@ -92,7 +92,7 @@ void __init orion5x_ehci1_init(void)
  59. ****************************************************************************/
  60. void __init orion5x_eth_init(struct mv643xx_eth_platform_data *eth_data)
  61. {
  62. - orion_ge00_init(eth_data,
  63. + orion_ge00_init(eth_data, 0,
  64. ORION5X_ETH_PHYS_BASE, IRQ_ORION5X_ETH_SUM,
  65. IRQ_ORION5X_ETH_ERR, orion5x_tclk);
  66. }
  67. diff -rupN linux-3.3.4-orig/arch/arm/plat-orion/common.c linux-3.3.4/arch/arm/plat-orion/common.c
  68. --- linux-3.3.4-orig/arch/arm/plat-orion/common.c 2012-04-28 01:17:35.000000000 +0800
  69. +++ linux-3.3.4/arch/arm/plat-orion/common.c 2012-05-07 17:58:22.762246865 +0800
  70. @@ -257,6 +257,7 @@ static struct platform_device orion_ge00
  71. };
  72.  
  73. void __init orion_ge00_init(struct mv643xx_eth_platform_data *eth_data,
  74. + int tx_csum_limit,
  75. unsigned long mapbase,
  76. unsigned long irq,
  77. unsigned long irq_err,
  78. @@ -264,6 +265,8 @@ void __init orion_ge00_init(struct mv643
  79. {
  80. fill_resources(&orion_ge00_shared, orion_ge00_shared_resources,
  81. mapbase + 0x2000, SZ_16K - 1, irq_err);
  82. + if (tx_csum_limit > 0)
  83. + orion_ge00_shared_data.tx_csum_limit = tx_csum_limit;
  84. ge_complete(&orion_ge00_shared_data, tclk,
  85. orion_ge00_resources, irq, &orion_ge00_shared,
  86. eth_data, &orion_ge00);
  87. @@ -310,6 +313,7 @@ static struct platform_device orion_ge01
  88. };
  89.  
  90. void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data,
  91. + int tx_csum_limit,
  92. unsigned long mapbase,
  93. unsigned long irq,
  94. unsigned long irq_err,
  95. @@ -317,6 +321,8 @@ void __init orion_ge01_init(struct mv643
  96. {
  97. fill_resources(&orion_ge01_shared, orion_ge01_shared_resources,
  98. mapbase + 0x2000, SZ_16K - 1, irq_err);
  99. + if (tx_csum_limit > 0)
  100. + orion_ge01_shared_data.tx_csum_limit = tx_csum_limit;
  101. ge_complete(&orion_ge01_shared_data, tclk,
  102. orion_ge01_resources, irq, &orion_ge01_shared,
  103. eth_data, &orion_ge01);
  104. diff -rupN linux-3.3.4-orig/arch/arm/plat-orion/include/plat/common.h linux-3.3.4/arch/arm/plat-orion/include/plat/common.h
  105. --- linux-3.3.4-orig/arch/arm/plat-orion/include/plat/common.h 2012-04-28 01:17:35.000000000 +0800
  106. +++ linux-3.3.4/arch/arm/plat-orion/include/plat/common.h 2012-05-07 17:58:22.778246655 +0800
  107. @@ -37,12 +37,14 @@ void __init orion_rtc_init(unsigned long
  108. unsigned long irq);
  109.  
  110. void __init orion_ge00_init(struct mv643xx_eth_platform_data *eth_data,
  111. + int tx_csum_limit,
  112. unsigned long mapbase,
  113. unsigned long irq,
  114. unsigned long irq_err,
  115. int tclk);
  116.  
  117. void __init orion_ge01_init(struct mv643xx_eth_platform_data *eth_data,
  118. + int tx_csum_limit,
  119. unsigned long mapbase,
  120. unsigned long irq,
  121. unsigned long irq_err,
  122. diff -rupN linux-3.3.4-orig/drivers/net/ethernet/marvell/mv643xx_eth.c linux-3.3.4/drivers/net/ethernet/marvell/mv643xx_eth.c
  123. --- linux-3.3.4-orig/drivers/net/ethernet/marvell/mv643xx_eth.c 2012-04-28 01:17:35.000000000 +0800
  124. +++ linux-3.3.4/drivers/net/ethernet/marvell/mv643xx_eth.c 2012-05-07 17:58:22.794246454 +0800
  125. @@ -965,12 +965,15 @@ static int txq_reclaim(struct tx_queue *
  126. txq->tx_desc_count--;
  127.  
  128. skb = NULL;
  129. - if (cmd_sts & TX_LAST_DESC)
  130. + if (cmd_sts & TX_LAST_DESC) {
  131. skb = __skb_dequeue(&txq->tx_skb);
  132.  
  133. - if (cmd_sts & ERROR_SUMMARY) {
  134. - netdev_info(mp->dev, "tx error\n");
  135. - mp->dev->stats.tx_errors++;
  136. + /*Error status only valid for last descriptor*/
  137. + /*ignore under run error*/
  138. + if (unlikely(cmd_sts & ERROR_SUMMARY) && unlikely(!(cmd_sts & 0x00000002))) {
  139. + netdev_info(mp->dev, "tx error\n");
  140. + mp->dev->stats.tx_errors++;
  141. + }
  142. }
  143.  
  144. if (cmd_sts & TX_FIRST_DESC) {
Advertisement
Add Comment
Please, Sign In to add comment