1. 03 7月, 2016 2 次提交
  2. 29 4月, 2016 1 次提交
  3. 22 4月, 2016 2 次提交
    • N
      net: ethernet: davinci_emac: Fix platform_data overwrite · 210990b0
      Neil Armstrong 提交于
      When the DaVinci emac driver is removed and re-probed, the actual
      pdev->dev.platform_data is populated with an unwanted valid pointer saved by
      the previous davinci_emac_of_get_pdata() call, causing a kernel crash when
      calling priv->int_disable() in emac_int_disable().
      
      Unable to handle kernel paging request at virtual address c8622a80
      ...
      [<c0426fb4>] (emac_int_disable) from [<c0427700>] (emac_dev_open+0x290/0x5f8)
      [<c0427700>] (emac_dev_open) from [<c04c00ec>] (__dev_open+0xb8/0x120)
      [<c04c00ec>] (__dev_open) from [<c04c0370>] (__dev_change_flags+0x88/0x14c)
      [<c04c0370>] (__dev_change_flags) from [<c04c044c>] (dev_change_flags+0x18/0x48)
      [<c04c044c>] (dev_change_flags) from [<c052bafc>] (devinet_ioctl+0x6b4/0x7ac)
      [<c052bafc>] (devinet_ioctl) from [<c04a1428>] (sock_ioctl+0x1d8/0x2c0)
      [<c04a1428>] (sock_ioctl) from [<c014f054>] (do_vfs_ioctl+0x41c/0x600)
      [<c014f054>] (do_vfs_ioctl) from [<c014f2a4>] (SyS_ioctl+0x6c/0x7c)
      [<c014f2a4>] (SyS_ioctl) from [<c000ff60>] (ret_fast_syscall+0x0/0x1c)
      
      Fixes: 42f59967 ("net: ethernet: davinci_emac: add OF support")
      Cc: Brian Hutchinson <b.hutchman@gmail.com>
      Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      210990b0
    • N
      net: ethernet: davinci_emac: Fix Unbalanced pm_runtime_enable · 99164f9e
      Neil Armstrong 提交于
      In order to avoid an Unbalanced pm_runtime_enable in the DaVinci
      emac driver when the device is removed and re-probed, and a
      pm_runtime_disable() call in davinci_emac_remove().
      
      Actually, using unbind/bind on a TI DM8168 SoC gives :
      $ echo 4a120000.ethernet > /sys/bus/platform/drivers/davinci_emac/unbind
      net eth1: DaVinci EMAC: davinci_emac_remove()
      $ echo 4a120000.ethernet > /sys/bus/platform/drivers/davinci_emac/bind
      davinci_emac 4a120000.ethernet: Unbalanced pm_runtime_enable
      
      Cc: Brian Hutchinson <b.hutchman@gmail.com>
      Fixes: 3ba97381 ("net: ethernet: davinci_emac: add pm_runtime support")
      Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      99164f9e
  4. 08 1月, 2016 2 次提交
  5. 24 9月, 2015 1 次提交
  6. 22 9月, 2015 1 次提交
  7. 26 8月, 2015 1 次提交
  8. 31 1月, 2015 2 次提交
  9. 16 1月, 2015 6 次提交
  10. 10 9月, 2014 1 次提交
  11. 03 6月, 2014 1 次提交
  12. 23 5月, 2014 1 次提交
  13. 14 5月, 2014 1 次提交
  14. 25 3月, 2014 2 次提交
    • C
      net: davinci_emac: Fix rollback of emac_dev_open() · cd11cf50
      Christian Riesch 提交于
      If an error occurs during the initialization in emac_dev_open() (the
      driver's ndo_open function), interrupts, DMA descriptors etc. must be freed.
      The current rollback code is buggy in several ways.
      
        1) Freeing the interrupts. The current code will not free all interrupts
           that were requested by the driver. Furthermore,  the code tries to do a
           platform_get_resource(priv->pdev, IORESOURCE_IRQ, -1) in its last
           iteration.
      
           This patch fixes these bugs.
      
        2) Wrong order of err: and rollback: labels. If the setup of the PHY in
           the code fails, the interrupts that have been requested before are
           not freed:
      
              request irq
                      if requesting irqs fails, goto rollback
              setup phy
                      if phy setup fails, goto err
              return 0
      
           rollback:
              free irqs
           err:
      
           This patch brings the code into the correct order.
      
        3) The code calls napi_enable() and emac_int_enable(), but does not
           undo both in case of an error.
      
           This patch adds calls of emac_int_disable() and napi_disable() to the
           rollback code.
      
        4) RX DMA descriptors are not freed in case of an error: Right before
           requesting the irqs, the function creates DMA descriptors for the
           RX channel. These RX descriptors are never freed when we jump to either
           rollback or err.
      
           This patch adds code for freeing the DMA descriptors in the case of
           an initialization error. This required a modification of
           cpdma_ctrl_stop() in davinci_cpdma.c: We must be able to call this
           function to free the DMA descriptors while the DMA channels are
           in IDLE state (before cpdma_ctlr_start() was called).
      
      Tested on a custom board with the Texas Instruments AM1808.
      Signed-off-by: NChristian Riesch <christian.riesch@omicron.at>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cd11cf50
    • C
      net: davinci_emac: Replace devm_request_irq with request_irq · 33b7107f
      Christian Riesch 提交于
      In commit 6892b41d
      
      Author: Lad, Prabhakar <prabhakar.csengg@gmail.com>
      Date:   Tue Jun 25 21:24:51 2013 +0530
      net: davinci: emac: Convert to devm_* api
      
      the call of request_irq is replaced by devm_request_irq and the call
      of free_irq is removed. But since interrupts are requested in
      emac_dev_open, doing ifconfig up/down on the board requests the
      interrupts again each time, causing devm_request_irq to fail. The
      interface is dead until the device is rebooted.
      
      This patch reverts said commit partially: It changes the driver back
      to use request_irq instead of devm_request_irq, puts free_irq back in
      place, but keeps the remaining changes of the original patch.
      Reported-by: NJon Ringle <jon@ringle.org>
      Signed-off-by: NChristian Riesch <christian.riesch@omicron.at>
      Cc: Lad, Prabhakar <prabhakar.csengg@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      33b7107f
  15. 06 12月, 2013 1 次提交
    • T
      net: davinci_emac: Fix platform data handling and make usable for am3517 · dd0df47d
      Tony Lindgren 提交于
      When booted with device tree, we may still have platform data passed
      as auxdata. For am3517 this is needed for passing the interrupt_enable
      and interrupt_disable callbacks that access the omap system control module
      registers. These callback functions will eventually go away when we have
      a separate system control module driver.
      
      Some of the things that are currently passed as platform data we don't need
      to set up as device tree properties as they are always the same on am3517.
      So let's use a new compatible flag for those so we can get those from
      the device tree match data.
      
      Also note that we need to fix setting of phy_dev to NULL instead of an empty
      string as the code later on uses that to find the first phy on the mdio bus.
      This seems to have been caused by 5d69e007 (net: davinci_emac: switch to
      new mdio).
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dd0df47d
  16. 22 10月, 2013 1 次提交
  17. 03 10月, 2013 1 次提交
  18. 31 8月, 2013 1 次提交
  19. 04 8月, 2013 1 次提交
  20. 02 7月, 2013 1 次提交
  21. 26 6月, 2013 2 次提交
  22. 28 5月, 2013 1 次提交
  23. 25 4月, 2013 1 次提交
  24. 28 3月, 2013 1 次提交
  25. 27 3月, 2013 1 次提交
  26. 21 3月, 2013 1 次提交
  27. 18 3月, 2013 1 次提交
  28. 13 2月, 2013 1 次提交
  29. 22 1月, 2013 1 次提交