summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJay Cliburn <jacliburn@bellsouth.net>2007-07-19 18:45:12 -0500
committerJeff Garzik <jeff@garzik.org>2007-07-24 16:28:41 -0400
commit91a500ac5654766e4d9a6502dfcceb7e0a235f98 (patch)
treeacb41fc8f9f7406ccd12aef3f66518f106eda6fb /drivers/net
parent3f516c00d416bd39aab6cfb348b68919e295fe23 (diff)
downloadlinux-stable-91a500ac5654766e4d9a6502dfcceb7e0a235f98.tar.gz
linux-stable-91a500ac5654766e4d9a6502dfcceb7e0a235f98.tar.bz2
linux-stable-91a500ac5654766e4d9a6502dfcceb7e0a235f98.zip
atl1: change cmb write threshold
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> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/atl1/atl1_main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c
index 3b8f633ec05e..6aa2dc32727e 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);