netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jay Cliburn <jacliburn@bellsouth.net>
To: netdev@vger.kernel.org
Cc: Jay Cliburn <jacliburn@bellsouth.net>
Subject: [PATCH 08/26] atl1: additional DMA engine configuration
Date: Mon, 31 Dec 2007 20:22:35 -0600	[thread overview]
Message-ID: <1199154173-4058-9-git-send-email-jacliburn@bellsouth.net> (raw)
In-Reply-To: <1199154173-4058-1-git-send-email-jacliburn@bellsouth.net>

Add DMA engine configuration tweaks per current vendor atl1 driver version
1.2.40.2.

Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
---
 drivers/net/atlx/atl1.c |   10 ++++++++++
 drivers/net/atlx/atlx.h |    6 ++++++
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index c93cf19..fb0a0af 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -666,6 +666,7 @@ static u32 atl1_configure(struct atl1_adapter *adapter)
 {
 	struct atl1_hw *hw = &adapter->hw;
 	u32 value;
+	u16 x;
 
 	/* clear interrupt status */
 	iowrite32(0xffffffff, adapter->hw.hw_addr + REG_ISR);
@@ -797,6 +798,15 @@ static u32 atl1_configure(struct atl1_adapter *adapter)
 	iowrite32(value, hw->hw_addr + REG_RXQ_CTRL);
 
 	/* config DMA Engine */
+	value = ioread32(hw->hw_addr + REG_DEVICE_CTRL);
+	x = (value >> DEVICE_CTRL_MAX_PAYLOAD_SHIFT) &
+		DEVICE_CTRL_MAX_PAYLOAD_MASK;
+	if (x < hw->dmaw_block)
+		hw->dmaw_block = x;
+	x = (value >> DEVICE_CTRL_MAX_RREQ_SZ_SHIFT) &
+		DEVICE_CTRL_MAX_RREQ_SZ_MASK;
+	if (x < hw->dmar_block)
+		hw->dmar_block = x;
 	value = ((((u32) hw->dmar_block) & DMA_CTRL_DMAR_BURST_LEN_MASK)
 		<< DMA_CTRL_DMAR_BURST_LEN_SHIFT) |
 		((((u32) hw->dmaw_block) & DMA_CTRL_DMAW_BURST_LEN_MASK)
diff --git a/drivers/net/atlx/atlx.h b/drivers/net/atlx/atlx.h
index 3be7c09..43b8531 100644
--- a/drivers/net/atlx/atlx.h
+++ b/drivers/net/atlx/atlx.h
@@ -53,6 +53,12 @@ MODULE_VERSION(ATLX_DRIVER_VERSION);
 
 #define REG_PCIE_CAP_LIST		0x58
 
+#define REG_DEVICE_CTRL			0x60
+#define DEVICE_CTRL_MAX_PAYLOAD_MASK	0x7
+#define DEVICE_CTRL_MAX_PAYLOAD_SHIFT	5
+#define DEVICE_CTRL_MAX_RREQ_SZ_MASK	0x7
+#define DEVICE_CTRL_MAX_RREQ_SZ_SHIFT	12
+
 #define REG_VPD_CAP			0x6C
 #define VPD_CAP_ID_MASK			0xFF
 #define VPD_CAP_ID_SHIFT		0
-- 
1.5.3.3


  parent reply	other threads:[~2008-01-01  2:28 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-01  2:22 [PATCH 00/26] atl1: divide and modernize Jay Cliburn
2008-01-01  2:22 ` [PATCH 01/26] atl1: relocate atl1 driver to /drivers/net/atlx Jay Cliburn
2008-01-01  2:22 ` [PATCH 02/26] atl1: move common functions to atlx files Jay Cliburn
2008-01-01  2:22 ` [PATCH 03/26] atl1: fix broken TSO Jay Cliburn
2008-01-01  2:22 ` [PATCH 04/26] atl1: add ethtool register dump Jay Cliburn
2008-01-01  2:22 ` [PATCH 05/26] atl1: print debug info if rrd error Jay Cliburn
2008-01-01  2:22 ` [PATCH 06/26] atl1: update initialization parameters Jay Cliburn
2008-01-01  2:22 ` [PATCH 07/26] atl1: clarify max rx frame size Jay Cliburn
2008-01-01  2:22 ` Jay Cliburn [this message]
2008-01-01  2:22 ` [PATCH 09/26] atl1: refactor tx processing Jay Cliburn
2008-01-01  2:22 ` [PATCH 10/26] atl1: use csum_start Jay Cliburn
2008-01-01  2:22 ` [PATCH 11/26] atl1: refactor initialization and startup Jay Cliburn
2008-01-01  2:22 ` [PATCH 12/26] atl1: refactor atl1_probe Jay Cliburn
2008-01-01  2:22 ` [PATCH 13/26] atl1: refactor interrupt handling Jay Cliburn
2008-01-01  2:22 ` [PATCH 14/26] atl1: move stray defines to header file Jay Cliburn
2008-01-01  2:22 ` [PATCH 15/26] atl1: tidy up ring management Jay Cliburn
2008-01-01  2:22 ` [PATCH 16/26] atl1: modernize check link function Jay Cliburn
2008-01-01  2:22 ` [PATCH 17/26] atl1: update phy config function Jay Cliburn
2008-01-01  2:22 ` [PATCH 18/26] atl1: make function static Jay Cliburn
2008-01-01  2:22 ` [PATCH 19/26] atl1: modernize down/up functions Jay Cliburn
2008-01-01  2:22 ` [PATCH 20/26] atl1: update change mtu Jay Cliburn
2008-01-01  2:22 ` [PATCH 21/26] atl1: update atl1_close Jay Cliburn
2008-01-01  2:22 ` [PATCH 22/26] atl1: update netpoll Jay Cliburn
2008-01-01  2:22 ` [PATCH 23/26] atl1: update shutdown and remove functions Jay Cliburn
2008-01-01  2:22 ` [PATCH 24/26] atl1: update wake-on-lan Jay Cliburn
2008-01-01  2:22 ` [PATCH 25/26] atl1: add NAPI support Jay Cliburn
2008-01-01  5:58   ` Stephen Hemminger
2008-01-01  2:22 ` [PATCH 26/26] atl1: remove experimental tag and clean up comments Jay Cliburn
2008-01-01 17:58 ` [PATCH 00/26] atl1: divide and modernize Christoph Hellwig
2008-01-01 18:12   ` 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=1199154173-4058-9-git-send-email-jacliburn@bellsouth.net \
    --to=jacliburn@bellsouth.net \
    --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).