1
0

m68k-coldfire-fec.patch 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. diff -Nur linux-3.18.2.orig/drivers/net/ethernet/freescale/fec_main.c linux-3.18.2/drivers/net/ethernet/freescale/fec_main.c
  2. --- linux-3.18.2.orig/drivers/net/ethernet/freescale/fec_main.c 2015-01-08 12:30:41.000000000 -0600
  3. +++ linux-3.18.2/drivers/net/ethernet/freescale/fec_main.c 2015-01-11 20:34:04.690309863 -0600
  4. @@ -136,7 +136,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. @@ -154,7 +154,7 @@
  13. #else
  14. #define FEC_FLASHMAC 0
  15. #endif
  16. -#endif /* CONFIG_M5272 */
  17. +#endif /* CONFIG_COLDFIRE */
  18. /* The FEC stores dest/src/type/vlan, data, and checksum for receive packets.
  19. */
  20. @@ -978,7 +978,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. @@ -1039,7 +1039,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. @@ -1057,13 +1057,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. @@ -1078,7 +1078,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. @@ -1656,7 +1656,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. @@ -1930,7 +1930,7 @@
  68. if (id_entry->driver_data & FEC_QUIRK_HAS_GBIT) {
  69. phy_dev->supported &= PHY_GBIT_FEATURES;
  70. phy_dev->supported &= ~SUPPORTED_1000baseT_Half;
  71. -#if !defined(CONFIG_M5272)
  72. +#if !defined(CONFIG_COLDFIRE)
  73. phy_dev->supported |= SUPPORTED_Pause;
  74. #endif
  75. }
  76. @@ -2125,7 +2125,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. @@ -2280,7 +2280,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. @@ -2466,7 +2466,7 @@
  92. .get_link = ethtool_op_get_link,
  93. .get_coalesce = fec_enet_get_coalesce,
  94. .set_coalesce = fec_enet_set_coalesce,
  95. -#ifndef CONFIG_M5272
  96. +#ifndef CONFIG_COLDFIRE
  97. .get_pauseparam = fec_enet_get_pauseparam,
  98. .set_pauseparam = fec_enet_set_pauseparam,
  99. .get_strings = fec_enet_get_strings,
  100. @@ -3164,7 +3164,7 @@
  101. fep->num_rx_queues = num_rx_qs;
  102. fep->num_tx_queues = num_tx_qs;
  103. -#if !defined(CONFIG_M5272)
  104. +#if !defined(CONFIG_COLDFIRE)
  105. /* default enable pause frame auto negotiation */
  106. if (pdev->id_entry &&
  107. (pdev->id_entry->driver_data & FEC_QUIRK_HAS_GBIT))