Skip to content
Snippets Groups Projects
  1. Feb 28, 2014
    • nbd's avatar
      cns3xxx: ethernet - clean up tx descs only when needed · 0772ab93
      nbd authored
      
      We already clean up tx descriptors in the napi eth_poll() function so it
      would likely be rare to run out of available descriptors in eth_xmit. Thus
      we can clean them up only when needed and return busy only when we
      still don't have enough.
      
      Signed-off-by: default avatarTim Harvey <tharvey@gateworks.com>
      
      git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39762 3c298f89-4303-0410-b956-a3cf2f4a3e73
      0772ab93
    • nbd's avatar
      cns3xxx: ethernet - resolve SMP issue · ffa5faa7
      nbd authored
      
      The combination of r35942 and r35952 causes an issue where eth_schedule_poll()
      can be called from a different CPU between the call to napi_complete() and the
      setting of cur_index which can break the rx ring accounting and cause ethernet
      latency and/or ethernet stalls.  The issue can be easilly created by adding
      a couple of artificial delays such as:
      
      @@ -715,6 +715,7 @@ static int eth_poll(struct napi_struct *napi, int budget)
      
       	if (!received) {
       		napi_complete(napi);
      +udelay(1000);
       		enable_irq(IRQ_CNS3XXX_SW_R0RXC);
       	}
      
      @@ -727,6 +728,7 @@ static int eth_poll(struct napi_struct *napi, int budget)
       	rx_ring->cur_index = i;
      
       	wmb();
      +udelay(1000);
       	enable_rx_dma(sw);
      
       	return received;
      
      This patch moves the setting of cur_index back up where it needs to be and
      addresses the original corner case that r35942 was trying to catch in an
      improved fashion by checking to see if the rx descriptor ring has become
      full before interrupts were re-enabled so that a poll can be scheduled again
      and avoid an rx stall caused by rx interrupts ceasing to fire again.
      
      Signed-off-by: default avatarTim Harvey <tharvey@gateworks.com>
      
      git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39761 3c298f89-4303-0410-b956-a3cf2f4a3e73
      ffa5faa7
  2. Feb 27, 2014
  3. Feb 26, 2014
  4. Feb 25, 2014
  5. Feb 24, 2014
  6. Feb 23, 2014
Loading