netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Banks <gnb@sgi.com>
To: "David S. Miller" <davem@redhat.com>
Cc: Linux Network Development List <netdev@oss.sgi.com>,
	John Partridge <johnip@sgi.com>, Arthur Kepner <akepner@sgi.com>
Subject: tg3 DMA RW Control register settings
Date: Mon, 30 Aug 2004 19:22:11 +1000	[thread overview]
Message-ID: <20040830092211.GB5745@sgi.com> (raw)

G'day,

I'm trying to make sense of your tg3 driver cset

http://gkernel.bkbits.net:8080/net-drivers-2.6/cset@1.1587.25.23

which changes the values used to set up the DMA READ/WRITE CONTROL
register (0x6c) to handle PCI-X and PCI-E modes.  This is great!
At SGI we've got a performance issue with a 5704 in PCI-X mode which
may be related to exactly these settings, so having the driver do
the right thing would be good.  I just have a couple of questions.

1.  Are the values for the Write Boundary field in the PCI-E case
    correct?  The diff adds

#define  DMA_RWCTRL_WRITE_BNDRY_64_PCIE	 0x10000000
#define  DMA_RWCTRL_WRITE_BNDRY_128_PCIE 0x30000000
#define  DMA_RWCTRL_WRITE_BNDRY_DISAB_PCIE 0x70000000

    but these seem to set the Default PCI Write field instead.
    It seems to me (based on version PG101-R of the manual) that
    the right values would be

#define  DMA_RWCTRL_WRITE_BNDRY_64_PCIE	   0x00000000
#define  DMA_RWCTRL_WRITE_BNDRY_128_PCIE   0x00000800
#define  DMA_RWCTRL_WRITE_BNDRY_DISAB_PCIE 0x00001800

2.  The Write Boundary field has a whole bunch of code to set it
    up.  The Read Boundary field is never set and defaults to 0
    (=disabled for PCI and PCI-X). Is this deliberate?

3.  The new code seems to use a lot of 32bit magic numbers, for
    which #defines already exist in the header.  Ummm....?

4.  Is there any explanation of how the following were chosen
    (assuming cache size of 128 bytes) ?

    DMA Write Watermark:        0b11 => 384 bytes
    DMA Read Watermark:         0b111 => 1536 bytes
    DMA Write Address Boundary: 0b11 => 384 bytes
    DMA Read Address Boundary:  0b00 => disabled
    One DMA at Once:            0b01

Greg.
-- 
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.

             reply	other threads:[~2004-08-30  9:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-30  9:22 Greg Banks [this message]
2004-08-30 21:29 ` tg3 DMA RW Control register settings David S. Miller

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=20040830092211.GB5745@sgi.com \
    --to=gnb@sgi.com \
    --cc=akepner@sgi.com \
    --cc=davem@redhat.com \
    --cc=johnip@sgi.com \
    --cc=netdev@oss.sgi.com \
    /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).