1. 05 4月, 2017 1 次提交
    • S
      net: ethernet: ti: cpsw: fix race condition during open() · 30c57f07
      Sekhar Nori 提交于
      TI's cpsw driver handles both OF and non-OF case for phy
      connect. Unfortunately of_phy_connect() returns NULL on
      error while phy_connect() returns ERR_PTR().
      
      To handle this, cpsw_slave_open() overrides the return value
      from phy_connect() to make it NULL or error.
      
      This leaves a small window, where cpsw_adjust_link() may be
      invoked for a slave while slave->phy pointer is temporarily
      set to -ENODEV (or some other error) before it is finally set
      to NULL.
      
      _cpsw_adjust_link() only handles the NULL case, and an oops
      results when ERR_PTR() is seen by it.
      
      Note that cpsw_adjust_link() checks PHY status for each
      slave whenever it is invoked. It can so happen that even
      though phy_connect() for a given slave returns error,
      _cpsw_adjust_link() is still called for that slave because
      the link status of another slave changed.
      
      Fix this by using a temporary pointer to store return value
      of {of_}phy_connect() and do a one-time write to slave->phy.
      Reviewed-by: NGrygorii Strashko <grygorii.strashko@ti.com>
      Reported-by: NYan Liu <yan-liu@ti.com>
      Signed-off-by: NSekhar Nori <nsekhar@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      30c57f07
  2. 03 4月, 2017 1 次提交
  3. 23 3月, 2017 2 次提交
    • A
      cpsw/netcp: cpts depends on posix_timers · 07fef362
      Arnd Bergmann 提交于
      With posix timers having become optional, we get a build error with
      the cpts time sync option of the CPSW driver:
      
      drivers/net/ethernet/ti/cpts.c: In function 'cpts_find_ts':
      drivers/net/ethernet/ti/cpts.c:291:23: error: implicit declaration of function 'ptp_classify_raw';did you mean 'ptp_classifier_init'? [-Werror=implicit-function-declaration]
      
      This adds a hard dependency on PTP_CLOCK to avoid the problem, as
      building it without PTP support makes no sense anyway.
      
      Fixes: baa73d9e ("posix-timers: Make them configurable")
      Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NNicolas Pitre <nico@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      07fef362
    • A
      cpsw/netcp: work around reverse cpts dependency · be9ca0d3
      Arnd Bergmann 提交于
      The dependency is reversed: cpsw and netcp call into cpts,
      but cpts depends on the other two in Kconfig. This can lead
      to cpts being a loadable module and its callers built-in:
      
      drivers/net/ethernet/ti/cpsw.o: In function `cpsw_remove':
      cpsw.c:(.text.cpsw_remove+0xd0): undefined reference to `cpts_release'
      drivers/net/ethernet/ti/cpsw.o: In function `cpsw_rx_handler':
      cpsw.c:(.text.cpsw_rx_handler+0x2dc): undefined reference to `cpts_rx_timestamp'
      drivers/net/ethernet/ti/cpsw.o: In function `cpsw_tx_handler':
      cpsw.c:(.text.cpsw_tx_handler+0x7c): undefined reference to `cpts_tx_timestamp'
      drivers/net/ethernet/ti/cpsw.o: In function `cpsw_ndo_stop':
      
      As a workaround, I'm introducing another Kconfig symbol to
      control the compilation of cpts, while making the actual
      module controlled by a silent symbol that is =y when necessary.
      
      Fixes: 6246168b ("net: ethernet: ti: netcp: add support of cpts")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Reviewed-by: NGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      be9ca0d3
  4. 18 2月, 2017 1 次提交
  5. 15 2月, 2017 2 次提交
  6. 12 2月, 2017 1 次提交
  7. 11 2月, 2017 1 次提交
  8. 08 2月, 2017 2 次提交
  9. 02 2月, 2017 1 次提交
  10. 31 1月, 2017 1 次提交
  11. 21 1月, 2017 5 次提交
  12. 19 1月, 2017 1 次提交
  13. 17 1月, 2017 1 次提交
    • A
      cpmac: remove hopeless #warning · d43e6fb4
      Arnd Bergmann 提交于
      The #warning was present 10 years ago when the driver first got merged.
      As the platform is rather obsolete by now, it seems very unlikely that
      the warning will cause anyone to fix the code properly.
      
      kernelci.org reports the warning for every build in the meantime, so
      I think it's better to just turn it into a code comment to reduce
      noise.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d43e6fb4
  14. 11 1月, 2017 1 次提交
  15. 10 1月, 2017 1 次提交
  16. 08 1月, 2017 14 次提交
  17. 25 12月, 2016 1 次提交
  18. 21 12月, 2016 2 次提交
  19. 11 12月, 2016 1 次提交