1. 22 8月, 2019 1 次提交
  2. 23 7月, 2019 1 次提交
  3. 16 7月, 2019 1 次提交
  4. 10 6月, 2019 1 次提交
  5. 07 6月, 2019 1 次提交
    • F
      net: fec: Do not use netdev messages too early · a19a0582
      Fabio Estevam 提交于
      When a valid MAC address is not found the current messages
      are shown:
      
      fec 2188000.ethernet (unnamed net_device) (uninitialized): Invalid MAC address: 00:00:00:00:00:00
      fec 2188000.ethernet (unnamed net_device) (uninitialized): Using random MAC address: aa:9f:25:eb:7e:aa
      
      Since the network device has not been registered at this point, it is better
      to use dev_err()/dev_info() instead, which will provide cleaner log
      messages like these:
      
      fec 2188000.ethernet: Invalid MAC address: 00:00:00:00:00:00
      fec 2188000.ethernet: Using random MAC address: aa:9f:25:eb:7e:aa
      
      Tested on a imx6dl-pico-pi board.
      Signed-off-by: NFabio Estevam <festevam@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a19a0582
  6. 25 5月, 2019 1 次提交
  7. 23 5月, 2019 1 次提交
  8. 08 5月, 2019 1 次提交
  9. 12 4月, 2019 1 次提交
  10. 15 2月, 2019 1 次提交
    • V
      net: ethernet: freescale: set FEC ethtool regs version · f9bcc9f3
      Vivien Didelot 提交于
      Currently the ethtool_regs version is set to 0 for FEC devices.
      
      Use this field to store the register dump version exposed by the
      kernel. The choosen version 2 corresponds to the kernel compile test:
      
              #if defined(CONFIG_M523x) || defined(CONFIG_M527x)
              || defined(CONFIG_M528x) || defined(CONFIG_M520x)
              || defined(CONFIG_M532x) || defined(CONFIG_ARM)
              || defined(CONFIG_ARM64) || defined(CONFIG_COMPILE_TEST)
      
      and version 1 corresponds to the opposite. Binaries of ethtool unaware
      of this version will dump the whole set as usual.
      Signed-off-by: NVivien Didelot <vivien.didelot@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f9bcc9f3
  11. 23 1月, 2019 1 次提交
  12. 19 12月, 2018 1 次提交
  13. 16 10月, 2018 1 次提交
  14. 03 10月, 2018 1 次提交
  15. 17 9月, 2018 1 次提交
  16. 13 9月, 2018 4 次提交
  17. 03 8月, 2018 1 次提交
  18. 27 7月, 2018 1 次提交
  19. 26 7月, 2018 1 次提交
  20. 31 5月, 2018 1 次提交
    • A
      net: ethernet: freescale: fix false-positive string overflow warning · 3ded9f2b
      Arnd Bergmann 提交于
      While compile-testing on arm64 with gcc-8.1, I ran into a build diagnostic:
      
      drivers/net/ethernet/freescale/fec_main.c: In function 'fec_probe':
      drivers/net/ethernet/freescale/fec_main.c:3517:25: error: '%d' directive writing between 1 and 10 bytes into a region of size 5 [-Werror=format-overflow=]
         sprintf(irq_name, "int%d", i);
                               ^~
      drivers/net/ethernet/freescale/fec_main.c:3517:21: note: directive argument in the range [0, 2147483646]
         sprintf(irq_name, "int%d", i);
                           ^~~~~~~
      drivers/net/ethernet/freescale/fec_main.c:3517:3: note: 'sprintf' output between 5 and 14 bytes into a destination of size 8
         sprintf(irq_name, "int%d", i);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      It appears this has never shown on ppc32 or arm32 for an unknown reason, but
      now gcc fails to identify that the 'irq_cnt' loop index has an upper bound
      of 3, and instead uses a bogus range.
      
      To work around the warning, this changes the sprintf to snprintf with the
      correct buffer length.
      
      Fixes: 78cc6e7e ("net: ethernet: freescale: Allow FEC with COMPILE_TEST")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NFugang Duan <fugang.duan@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3ded9f2b
  21. 23 5月, 2018 1 次提交
  22. 18 5月, 2018 1 次提交
  23. 17 5月, 2018 1 次提交
  24. 19 3月, 2018 1 次提交
    • F
      net: fec: Fix unbalanced PM runtime calls · a069215c
      Florian Fainelli 提交于
      When unbinding/removing the driver, we will run into the following warnings:
      
      [  259.655198] fec 400d1000.ethernet: 400d1000.ethernet supply phy not found, using dummy regulator
      [  259.665065] fec 400d1000.ethernet: Unbalanced pm_runtime_enable!
      [  259.672770] fec 400d1000.ethernet (unnamed net_device) (uninitialized): Invalid MAC address: 00:00:00:00:00:00
      [  259.683062] fec 400d1000.ethernet (unnamed net_device) (uninitialized): Using random MAC address: f2:3e:93:b7:29:c1
      [  259.696239] libphy: fec_enet_mii_bus: probed
      
      Avoid these warnings by balancing the runtime PM calls during fec_drv_remove().
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a069215c
  25. 23 1月, 2018 1 次提交
  26. 06 1月, 2018 1 次提交
  27. 04 1月, 2018 2 次提交
  28. 27 12月, 2017 1 次提交
    • F
      net: fec: unmap the xmit buffer that are not transferred by DMA · 178e5f57
      Fugang Duan 提交于
      The enet IP only support 32 bit, it will use swiotlb buffer to do dma
      mapping when xmit buffer DMA memory address is bigger than 4G in i.MX
      platform. After stress suspend/resume test, it will print out:
      
      log:
      [12826.352864] fec 5b040000.ethernet: swiotlb buffer is full (sz: 191 bytes)
      [12826.359676] DMA: Out of SW-IOMMU space for 191 bytes at device 5b040000.ethernet
      [12826.367110] fec 5b040000.ethernet eth0: Tx DMA memory map failed
      
      The issue is that the ready xmit buffers that are dma mapped but DMA still
      don't copy them into fifo, once MAC restart, these DMA buffers are not unmapped.
      So it should check the dma mapping buffer and unmap them.
      Signed-off-by: NFugang Duan <fugang.duan@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      178e5f57
  29. 14 12月, 2017 1 次提交
    • R
      net: fec: add phy_reset_after_clk_enable() support · 1b0a83ac
      Richard Leitner 提交于
      Some PHYs (for example the SMSC LAN8710/LAN8720) doesn't allow turning
      the refclk on and off again during operation (according to their
      datasheet). Nonetheless exactly this behaviour was introduced for power
      saving reasons by commit e8fcfcd5 ("net: fec: optimize the clock management to save power").
      Therefore add support for the phy_reset_after_clk_enable function from
      phylib to mitigate this issue.
      
      Generally speaking this issue is only relevant if the ref clk for the
      PHY is generated by the SoC and therefore the PHY is configured to
      "REF_CLK In Mode". In our specific case (PCB) this problem does occur at
      about every 10th to 50th POR of an LAN8710 connected to an i.MX6SOLO
      SoC. The typical symptom of this problem is a "swinging" ethernet link.
      Similar issues were reported by users of the NXP forum:
      	https://community.nxp.com/thread/389902
      	https://community.nxp.com/message/309354
      With this patch applied the issue didn't occur for at least a few
      hundret PORs of our board.
      
      Fixes: e8fcfcd5 ("net: fec: optimize the clock management to save power")
      Signed-off-by: NRichard Leitner <richard.leitner@skidata.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1b0a83ac
  30. 08 11月, 2017 1 次提交
  31. 21 9月, 2017 2 次提交
  32. 24 8月, 2017 1 次提交
  33. 31 7月, 2017 2 次提交
    • A
      net: fec: Allow reception of frames bigger than 1522 bytes · fbbeefdd
      Andrew Lunn 提交于
      The FEC Receive Control Register has a 14 bit field indicating the
      longest frame that may be received. It is being set to 1522. Frames
      longer than this are discarded, but counted as being in error.
      
      When using DSA, frames from the switch has an additional header,
      either 4 or 8 bytes if a Marvell switch is used. Thus a full MTU frame
      of 1522 bytes received by the switch on a port becomes 1530 bytes when
      passed to the host via the FEC interface.
      
      Change the maximum receive size to 2048 - 64, where 64 is the maximum
      rx_alignment applied on the receive buffer for AVB capable FEC
      cores. Use this value also for the maximum receive buffer size. The
      driver is already allocating a receive SKB of 2048 bytes, so this
      change should not have any significant effects.
      
      Tested on imx51, imx6, vf610.
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fbbeefdd
    • A
      net: fec: Issue error for missing but expected PHY · 9558df3a
      Andrew Lunn 提交于
      If the PHY is missing but expected, e.g. because of a typ0 in the dt
      file, it is not possible to open the interface. ip link returns:
      
      RTNETLINK answers: No such device
      
      It is not very obvious what the problem is. Add a netdev_err() in this
      case to make it easier to debug the issue.
      
      [   21.409385] fec 2188000.ethernet eth0: Unable to connect to phy
      RTNETLINK answers: No such device
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Acked-by: NFugang Duan <fugang.duan@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9558df3a
  34. 11 6月, 2017 1 次提交