netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jay Cliburn <jacliburn@bellsouth.net>
To: jeff@garzik.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	atl1-devel@lists.sourceforge.net, csnook@redhat.com,
	Jay Cliburn <jacliburn@bellsouth.net>
Subject: [PATCH 3/5] atl1: change cmb write threshold
Date: Thu, 19 Jul 2007 18:45:12 -0500	[thread overview]
Message-ID: <11848887141326-git-send-email-jacliburn@bellsouth.net> (raw)
In-Reply-To: <1184888714454-git-send-email-jacliburn@bellsouth.net>

Change the threshold number of descriptors used to trigger CMB writes.
The vendor reports that under certain conditions this will reduce the
number of unnecessary tx interrupts and improve rx performance.

This change is lifted directly from vendor version 1.2.40.2 of the L1
driver.

Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
---
 drivers/net/atl1/atl1_main.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c
index 3b8f633..6aa2dc3 100644
--- a/drivers/net/atl1/atl1_main.c
+++ b/drivers/net/atl1/atl1_main.c
@@ -917,7 +917,10 @@ static u32 atl1_configure(struct atl1_adapter *adapter)
 	iowrite32(value, hw->hw_addr + REG_DMA_CTRL);
 
 	/* config CMB / SMB */
-	value = hw->cmb_rrd | ((u32) hw->cmb_tpd << 16);
+	value = (hw->cmb_tpd > adapter->tpd_ring.count) ?
+		hw->cmb_tpd : adapter->tpd_ring.count;
+	value <<= 16;
+	value |= hw->cmb_rrd;
 	iowrite32(value, hw->hw_addr + REG_CMB_WRITE_TH);
 	value = hw->cmb_rx_timer | ((u32) hw->cmb_tx_timer << 16);
 	iowrite32(value, hw->hw_addr + REG_CMB_WRITE_TIMER);
-- 
1.5.2.2


  parent reply	other threads:[~2007-07-19 23:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-19 23:45 [PATCH 0/5] atl1: additional patches for 2.6.23 Jay Cliburn
2007-07-19 23:45 ` [PATCH 1/5] atl1: change tpd_avail function name Jay Cliburn
2007-07-24 20:36   ` Jeff Garzik
2007-07-19 23:45 ` [PATCH 2/5] atl1: fix typo in DMA engine setup Jay Cliburn
2007-07-19 23:45 ` Jay Cliburn [this message]
2007-07-19 23:45 ` [PATCH 4/5] atl1: fix typo in dma_req_block Jay Cliburn
2007-07-19 23:45 ` [PATCH 5/5] atl1: use kernel provided ethernet length constants Jay Cliburn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11848887141326-git-send-email-jacliburn@bellsouth.net \
    --to=jacliburn@bellsouth.net \
    --cc=atl1-devel@lists.sourceforge.net \
    --cc=csnook@redhat.com \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).