linux-stable/drivers/net/ethernet/ti
Mugunthan V N fae50823d0 net: ethernet: davinci_cpdma: Add boundary for rx and tx descriptors
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 86d8c07ff2
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: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-18 14:27:50 -05:00
..
cpmac.c net: phy: remove flags argument from phy_{attach, connect, connect_direct} 2013-01-14 15:11:50 -05:00
cpsw.c net: ethernet: davinci_cpdma: Add boundary for rx and tx descriptors 2013-01-18 14:27:50 -05:00
cpsw_ale.c drivers: net: ethernet: cpsw: add multicast address to ALE table 2012-11-01 12:21:29 -04:00
cpsw_ale.h drivers: net: ethernet: cpsw: add multicast address to ALE table 2012-11-01 12:21:29 -04:00
cpts.c cpts: fix a run time warn_on. 2012-12-26 14:15:09 -08:00
cpts.h cpts: fix build error by removing useless code. 2012-12-26 14:15:09 -08:00
davinci_cpdma.c net: ethernet: davinci_cpdma: Add boundary for rx and tx descriptors 2013-01-18 14:27:50 -05:00
davinci_cpdma.h net: ethernet: davinci_cpdma: Add boundary for rx and tx descriptors 2013-01-18 14:27:50 -05:00
davinci_emac.c net: ethernet: davinci_cpdma: Add boundary for rx and tx descriptors 2013-01-18 14:27:50 -05:00
davinci_mdio.c net/davinci_emac: remove __dev* attributes 2012-12-03 11:16:55 -08:00
Kconfig cpts: add missing kconfig dependency 2012-11-26 17:22:14 -05:00
Makefile cpts: introduce time stamping code and a PTP hardware clock. 2012-11-01 12:21:30 -04:00
tlan.c drivers/net: fix up function prototypes after __dev* removals 2012-12-07 14:22:22 -05:00
tlan.h