1. 10 9月, 2015 1 次提交
    • A
      stmmac: fix check for phydev being open · dfc50fca
      Alexey Brodkin 提交于
      Current check of phydev with IS_ERR(phydev) may make not much sense
      because of_phy_connect() returns NULL on failure instead of error value.
      
      Still for checking result of phy_connect() IS_ERR() makes perfect sense.
      
      So let's use combined check IS_ERR_OR_NULL() that covers both cases.
      
      Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: linux-kernel@vger.kernel.org
      Cc: stable@vger.kernel.org
      Cc: David Miller <davem@davemloft.net>
      Signed-off-by: NAlexey Brodkin <abrodkin@synopsys.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dfc50fca
  2. 21 7月, 2015 1 次提交
  3. 24 6月, 2015 1 次提交
    • A
      stmmac: troubleshoot unexpected bits in des0 & des1 · f1590670
      Alexey Brodkin 提交于
      Current implementation of descriptor init procedure only takes
      care about setting/clearing ownership flag in "des0"/"des1"
      fields while it is perfectly possible to get unexpected bits
      set because of the following factors:
      
       [1] On driver probe underlying memory allocated with
           dma_alloc_coherent() might not be zeroed and so
           it will be filled with garbage.
      
       [2] During driver operation some bits could be set by SD/MMC
           controller (for example error flags etc).
      
      And unexpected and/or randomly set flags in "des0"/"des1"
      fields may lead to unpredictable behavior of GMAC DMA block.
      
      This change addresses both items above with:
      
       [1] Use of dma_zalloc_coherent() instead of simple
           dma_alloc_coherent() to make sure allocated memory is
           zeroed. That shouldn't affect performance because
           this allocation only happens once on driver probe.
      
       [2] Do explicit zeroing of both "des0" and "des1" fields
           of all buffer descriptors during initialization of
           DMA transfer.
      
      And while at it fixed identation of dma_free_coherent()
      counterpart as well.
      Signed-off-by: NAlexey Brodkin <abrodkin@synopsys.com>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: arc-linux-dev@synopsys.com
      Cc: linux-kernel@vger.kernel.org
      Cc: stable@vger.kernel.org
      Cc: David Miller <davem@davemloft.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f1590670
  4. 31 5月, 2015 2 次提交
  5. 26 5月, 2015 1 次提交
    • M
      net: stmmac: create one debugfs dir per net-device · 466c5ac8
      Mathieu Olivari 提交于
      stmmac DebugFS entries are currently global to the driver. As a result,
      having more than one stmmac device in the system creates the following
      error:
      * ERROR stmmaceth, debugfs create directory failed
      * stmmac_hw_setup: failed debugFS registration
      
      This also results in being able to access the debugfs information for
      the first registered device only.
      
      This patch changes the debugfs structure to have one sub-directory per
      net-device. Files under "/sys/kernel/debug/stmmaceth" will now show-up
      under /sys/kernel/debug/stmmaceth/ethN/.
      Signed-off-by: NMathieu Olivari <mathieu@codeaurora.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      466c5ac8
  6. 22 5月, 2015 4 次提交
  7. 17 4月, 2015 2 次提交
  8. 09 4月, 2015 1 次提交
  9. 09 3月, 2015 1 次提交
  10. 02 3月, 2015 1 次提交
    • V
      net: stmmac: Use setup_timer and mod_timer · ccb36da1
      Vaishali Thakkar 提交于
      Use timer API functions setup_timer and mod_timer instead
      of structure assignments as they are standard way to set
      the timer and to update the expire field of an active timer
      respectively.
      
      This is done using Coccinelle and semantic patch used for
      this is as follows:
      
      // <smpl>
      @@
      expression x,y,z,a,b;
      @@
      
      -init_timer (&x);
      +setup_timer (&x, y, z);
      +mod_timer (&a, b);
      -x.function = y;
      -x.data = z;
      -x.expires = b;
      -add_timer(&a);
      // </smpl>
      Signed-off-by: NVaishali Thakkar <vthakkar1994@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ccb36da1
  11. 02 2月, 2015 1 次提交
  12. 28 1月, 2015 1 次提交
  13. 27 1月, 2015 3 次提交
  14. 23 12月, 2014 1 次提交
    • H
      stmmac: Don't init ptp again when resume from suspend/hibernation · fe131929
      Huacai Chen 提交于
      Both stmmac_open() and stmmac_resume() call stmmac_hw_setup(), and
      stmmac_hw_setup() call stmmac_init_ptp() unconditionally. However, only
      stmmac_release() calls stmmac_release_ptp(). Since stmmac_suspend()
      doesn't call stmmac_release_ptp(), stmmac_resume() also needn't call
      stmmac_init_ptp().
      
      This patch also fix a "scheduling while atomic" problem when resume
      from suspend/hibernation. Because stmmac_init_ptp() will trigger
      scheduling while stmmac_resume() hold a spinlock.
      
      Callgraph of "scheduling while atomic":
      stmmac_resume() --> stmmac_hw_setup() --> stmmac_init_ptp() -->
      stmmac_ptp_register() --> ptp_clock_register() --> device_create() -->
      device_create_groups_vargs() --> device_add() --> devtmpfs_create_node()
      --> wait_for_common() --> schedule_timeout() --> __schedule()
      Signed-off-by: NHuacai Chen <chenhc@lemote.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fe131929
  15. 20 11月, 2014 1 次提交
  16. 12 11月, 2014 1 次提交
  17. 08 11月, 2014 1 次提交
  18. 06 11月, 2014 6 次提交
  19. 04 10月, 2014 1 次提交
  20. 30 9月, 2014 1 次提交
  21. 02 9月, 2014 2 次提交
  22. 01 9月, 2014 2 次提交
  23. 30 8月, 2014 2 次提交
  24. 26 8月, 2014 2 次提交