1. 14 5月, 2014 1 次提交
  2. 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
  3. 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
  4. 22 10月, 2013 1 次提交
  5. 03 10月, 2013 1 次提交
  6. 31 8月, 2013 1 次提交
  7. 04 8月, 2013 1 次提交
  8. 02 7月, 2013 1 次提交
  9. 26 6月, 2013 2 次提交
  10. 28 5月, 2013 1 次提交
  11. 25 4月, 2013 1 次提交
  12. 28 3月, 2013 1 次提交
  13. 27 3月, 2013 1 次提交
  14. 21 3月, 2013 1 次提交
  15. 18 3月, 2013 1 次提交
  16. 13 2月, 2013 1 次提交
  17. 22 1月, 2013 1 次提交
  18. 19 1月, 2013 1 次提交
    • M
      net: ethernet: davinci_cpdma: Add boundary for rx and tx descriptors · fae50823
      Mugunthan V N 提交于
      When there is heavy transmission traffic in the CPDMA, then Rx descriptors
      memory is also utilized as tx desc memory looses all rx descriptors and the
      driver stops working then.
      
      This patch adds boundary for tx and rx descriptors in bd ram dividing the
      descriptor memory to ensure that during heavy transmission tx doesn't use
      rx descriptors.
      
      This patch is already applied to davinci_emac driver, since CPSW and
      davici_dmac shares the same CPDMA, moving the boundry seperation from
      Davinci EMAC driver to CPDMA driver which was done in the following
      commit
      
      commit 86d8c07f
      Author: Sascha Hauer <s.hauer@pengutronix.de>
      Date:   Tue Jan 3 05:27:47 2012 +0000
      
          net/davinci: do not use all descriptors for tx packets
      
          The driver uses a shared pool for both rx and tx descriptors.
          During open it queues fixed number of 128 descriptors for receive
          packets. For each received packet it tries to queue another
          descriptor. If this fails the descriptor is lost for rx.
          The driver has no limitation on tx descriptors to use, so it
          can happen during a nmap / ping -f attack that the driver
          allocates all descriptors for tx and looses all rx descriptors.
          The driver stops working then.
          To fix this limit the number of tx descriptors used to half of
          the descriptors available, the rx path uses the other half.
      
          Tested on a custom board using nmap / ping -f to the board from
          two different hosts.
      Signed-off-by: NMugunthan V N <mugunthanvnm@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fae50823
  19. 15 1月, 2013 1 次提交
  20. 07 1月, 2013 1 次提交
  21. 04 1月, 2013 1 次提交
  22. 04 12月, 2012 1 次提交
  23. 23 7月, 2012 2 次提交
  24. 19 7月, 2012 1 次提交
  25. 11 7月, 2012 2 次提交
  26. 24 4月, 2012 1 次提交
    • A
      net/davinci_emac: fix failing PHY connect attempts · 1ab8be4a
      Anatolij Gustschin 提交于
      PHY connect attempts fail if no PHY id is specified in the emac platform
      data and another mdio bus has been registered before 'davinci_mdio' bus. In
      this case when configuring the interface, there will be an attempt to
      connect to already attached PHY on the previously registered mdio bus:
      
      net eth1: PHY already attached
      net eth1: could not connect to phy smsc911x-0:01
      IP-Config: Failed to open eth1
      IP-Config: Device `eth1' not found
      
      Fix this by modifying match_first_device() to match first PHY device
      on 'davinci_mdio' bus.
      Signed-off-by: NAnatolij Gustschin <agust@denx.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1ab8be4a
  27. 04 4月, 2012 1 次提交
  28. 24 2月, 2012 2 次提交
  29. 18 2月, 2012 1 次提交
  30. 09 2月, 2012 1 次提交
  31. 03 2月, 2012 1 次提交
  32. 01 2月, 2012 1 次提交
  33. 04 1月, 2012 1 次提交
    • S
      net/davinci: do not use all descriptors for tx packets · 86d8c07f
      Sascha Hauer 提交于
      The driver uses a shared pool for both rx and tx descriptors.
      During open it queues fixed number of 128 descriptors for receive
      packets. For each received packet it tries to queue another
      descriptor. If this fails the descriptor is lost for rx.
      The driver has no limitation on tx descriptors to use, so it
      can happen during a nmap / ping -f attack that the driver
      allocates all descriptors for tx and looses all rx descriptors.
      The driver stops working then.
      To fix this limit the number of tx descriptors used to half of
      the descriptors available, the rx path uses the other half.
      
      Tested on a custom board using nmap / ping -f to the board from
      two different hosts.
      Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      86d8c07f
  34. 18 8月, 2011 1 次提交
  35. 12 8月, 2011 1 次提交