m68k-coldfire-fec.patch 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. diff -Nur linux-3.14.26.orig/drivers/net/ethernet/freescale/fec_main.c linux-3.14.26/drivers/net/ethernet/freescale/fec_main.c
  2. --- linux-3.14.26.orig/drivers/net/ethernet/freescale/fec_main.c 2014-12-06 17:56:06.000000000 -0600
  3. +++ linux-3.14.26/drivers/net/ethernet/freescale/fec_main.c 2014-12-28 22:15:41.533921249 -0600
  4. @@ -152,7 +152,7 @@
  5. module_param_array(macaddr, byte, NULL, 0);
  6. MODULE_PARM_DESC(macaddr, "FEC Ethernet MAC address");
  7. -#if defined(CONFIG_M5272)
  8. +#if defined(CONFIG_COLDFIRE)
  9. /*
  10. * Some hardware gets it MAC address out of local flash memory.
  11. * if this is non-zero then assume it is the address to get MAC from.
  12. @@ -170,7 +170,7 @@
  13. #else
  14. #define FEC_FLASHMAC 0
  15. #endif
  16. -#endif /* CONFIG_M5272 */
  17. +#endif /* CONFIG_COLDFIRE */
  18. #if (((RX_RING_SIZE + TX_RING_SIZE) * 32) > PAGE_SIZE)
  19. #error "FEC: descriptor ring size constants too large"
  20. @@ -565,7 +565,7 @@
  21. /* Set MII speed */
  22. writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED);
  23. -#if !defined(CONFIG_M5272)
  24. +#if !defined(CONFIG_COLDFIRE)
  25. /* set RX checksum */
  26. val = readl(fep->hwp + FEC_RACC);
  27. if (fep->csum_flags & FLAG_RX_CSUM_ENABLED)
  28. @@ -626,7 +626,7 @@
  29. #endif
  30. }
  31. -#if !defined(CONFIG_M5272)
  32. +#if !defined(CONFIG_COLDFIRE)
  33. /* enable pause frame*/
  34. if ((fep->pause_flag & FEC_PAUSE_FLAG_ENABLE) ||
  35. ((fep->pause_flag & FEC_PAUSE_FLAG_AUTONEG) &&
  36. @@ -644,13 +644,13 @@
  37. } else {
  38. rcntl &= ~FEC_ENET_FCE;
  39. }
  40. -#endif /* !defined(CONFIG_M5272) */
  41. +#endif /* !defined(CONFIG_COLDFIRE) */
  42. writel(rcntl, fep->hwp + FEC_R_CNTRL);
  43. /* Setup multicast filter. */
  44. set_multicast_list(ndev);
  45. -#ifndef CONFIG_M5272
  46. +#ifndef CONFIG_COLDFIRE
  47. writel(0, fep->hwp + FEC_HASH_TABLE_HIGH);
  48. writel(0, fep->hwp + FEC_HASH_TABLE_LOW);
  49. #endif
  50. @@ -665,7 +665,7 @@
  51. if (fep->bufdesc_ex)
  52. ecntl |= (1 << 4);
  53. -#ifndef CONFIG_M5272
  54. +#ifndef CONFIG_COLDFIRE
  55. /* Enable the MIB statistic event counters */
  56. writel(0 << 31, fep->hwp + FEC_MIB_CTRLSTAT);
  57. #endif
  58. @@ -1117,7 +1117,7 @@
  59. * 3) from flash or fuse (via platform data)
  60. */
  61. if (!is_valid_ether_addr(iap)) {
  62. -#ifdef CONFIG_M5272
  63. +#ifdef CONFIG_COLDFIRE
  64. if (FEC_FLASHMAC)
  65. iap = (unsigned char *)FEC_FLASHMAC;
  66. #else
  67. @@ -1304,7 +1304,7 @@
  68. /* mask with MAC supported features */
  69. if (id_entry->driver_data & FEC_QUIRK_HAS_GBIT) {
  70. phy_dev->supported &= PHY_GBIT_FEATURES;
  71. -#if !defined(CONFIG_M5272)
  72. +#if !defined(CONFIG_COLDFIRE)
  73. phy_dev->supported |= SUPPORTED_Pause;
  74. #endif
  75. }
  76. @@ -1491,7 +1491,7 @@
  77. }
  78. }
  79. -#if !defined(CONFIG_M5272)
  80. +#if !defined(CONFIG_COLDFIRE)
  81. static void fec_enet_get_pauseparam(struct net_device *ndev,
  82. struct ethtool_pauseparam *pause)
  83. @@ -1637,7 +1637,7 @@
  84. return -EOPNOTSUPP;
  85. }
  86. }
  87. -#endif /* !defined(CONFIG_M5272) */
  88. +#endif /* !defined(CONFIG_COLDFIRE) */
  89. static int fec_enet_nway_reset(struct net_device *dev)
  90. {
  91. @@ -1651,7 +1651,7 @@
  92. }
  93. static const struct ethtool_ops fec_enet_ethtool_ops = {
  94. -#if !defined(CONFIG_M5272)
  95. +#if !defined(CONFIG_COLDFIRE)
  96. .get_pauseparam = fec_enet_get_pauseparam,
  97. .set_pauseparam = fec_enet_set_pauseparam,
  98. #endif
  99. @@ -1661,7 +1661,7 @@
  100. .get_link = ethtool_op_get_link,
  101. .get_ts_info = fec_enet_get_ts_info,
  102. .nway_reset = fec_enet_nway_reset,
  103. -#ifndef CONFIG_M5272
  104. +#ifndef CONFIG_COLDFIRE
  105. .get_ethtool_stats = fec_enet_get_ethtool_stats,
  106. .get_strings = fec_enet_get_strings,
  107. .get_sset_count = fec_enet_get_sset_count,
  108. @@ -2110,7 +2110,7 @@
  109. /* setup board info structure */
  110. fep = netdev_priv(ndev);
  111. -#if !defined(CONFIG_M5272)
  112. +#if !defined(CONFIG_COLDFIRE)
  113. /* default enable pause frame auto negotiation */
  114. if (pdev->id_entry &&
  115. (pdev->id_entry->driver_data & FEC_QUIRK_HAS_GBIT))