From: "David S. Miller" <davem@davemloft.net>
To: "Michael Chan" <mchan@broadcom.com>
Cc: shemminger@osdl.org, jgarzik@pobox.com, netdev@oss.sgi.com
Subject: Re: Mystery packet killing tg3
Date: Tue, 3 May 2005 15:53:55 -0700 [thread overview]
Message-ID: <20050503155355.6ac3f4a6.davem@davemloft.net> (raw)
In-Reply-To: <1115155690.15156.32.camel@rh4>
On Tue, 03 May 2005 14:28:10 -0700
"Michael Chan" <mchan@broadcom.com> wrote:
> On Tue, 2005-05-03 at 15:03 -0700, David S. Miller wrote:
>
> > Michael, there were no master/target abort bits set in the PCI status
> > register from his dump. If one of the DMA units locks up on the tg3,
> > will it still be able to update the PCI_STATUS register appropriately
> > when it encounters a DMA transaction error (ie. master or target abort)
>
> I believe so. Also, the DMA read and write status registers showed all
> zeros, meaning there were no DMA related errors:
>
> DEBUG: RDMAC_MODE[000003fc] RDMAC_STATUS[00000000]
> DEBUG: WDMAC_MODE[000003fc] WDMAC_STATUS[00000000]
Right, I noticed that too.
Stephen says that trying to force enable the mailbox write
reordering workaround doesn't solve the problem either.
I wonder exactly how it would show up if the x86_64 port
unmapped a DMA address in the IOMMU and tg3 (or a bridge
in the middle) tried to fetch that address again.
I remember some issue not too long ago where PCI bridges
could still prefetch a DMA address even after a device
was done with it. Because of this, they added code to
the x86_64 IOMMU driver that kept a read-only dummy mapping
around all the time so that this would not cause faults.
I even added similar code to the PCI IOMMU handling on sparc64.
Indeed, if you look in arch/x86_64/kernel/pci-gart.c they use
a scratch mapping when the unmap DMA translations.
I can't think of what else could be wedging the tg3. Michael,
any ideas? There are some 5703 specific programming to consider:
1) Setting of PCIX_CAPS_BURST_MASK in PCI_X_CAPS register.
Currently tg3 sets it to "PCIX_CAPS_MAX_BURST_CPIOB" which
is 2 (shifted up PCIX_CAPS_BURST_SHIFT of course).
2) On Fibre, we force a write of 0x616000 to MAC_SERDES_CFG for
5703 chips.
Because the PCS synced indication is on in his dumps, I
am assuming he is on a Fibre link, so this is relevant.
3) When the low 5 bits of TG3PCI_CLOCK_CTRL are 0x6 or 0x7
we set DMA_RWCTL_ONE_DMA in the DMA R/W control register.
On all 5703 we also set bit 23 to enable some hw bug workaround.
4) On 5703 (and 5704), we always clear the low 4 bits of DMA R/W
control.
A quick perusal shows that these same exact things get done in
the bcm5700 driver too.
next prev parent reply other threads:[~2005-05-03 22:53 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-02 23:24 Mystery packet killing tg3 Stephen Hemminger
2005-05-03 3:02 ` David S. Miller
2005-05-03 21:05 ` Stephen Hemminger
2005-05-03 21:13 ` David S. Miller
2005-05-03 20:41 ` Michael Chan
2005-05-03 22:03 ` David S. Miller
2005-05-03 21:28 ` Michael Chan
2005-05-03 22:53 ` David S. Miller [this message]
2005-05-03 22:45 ` Stephen Hemminger
2005-05-03 22:39 ` David S. Miller
2005-05-03 22:59 ` Stephen Hemminger
2005-05-03 21:29 ` Stephen Hemminger
2005-05-04 18:30 ` Andi Kleen
2005-05-04 18:44 ` Peter Buckingham
2005-05-05 11:43 ` Andi Kleen
2005-05-05 16:20 ` Stephen Hemminger
2005-05-05 18:01 ` Andi Kleen
2005-05-05 17:09 ` Peter Buckingham
2005-05-05 17:32 ` Rick Jones
2005-05-05 17:38 ` Peter Buckingham
2005-05-05 17:45 ` John Heffner
2005-05-05 18:06 ` Andi Kleen
2005-05-05 18:21 ` Peter Buckingham
2005-05-05 18:31 ` Andi Kleen
2005-05-05 18:40 ` Peter Buckingham
2005-05-05 18:56 ` Andi Kleen
2005-05-05 19:02 ` Peter Buckingham
2005-05-05 19:24 ` Andi Kleen
2005-05-04 19:41 ` Stephen Hemminger
-- strict thread matches above, loose matches on Subject: below --
2005-05-04 6:09 Michael Chan
2005-05-04 6:27 Michael Chan
2005-05-04 22:51 ` Stephen Hemminger
2005-05-04 22:30 ` Michael Chan
[not found] ` <20050505113356.0f1b4c00.davem@davemloft.net>
2005-05-05 19:56 ` Michael Chan
2005-05-05 21:42 ` 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=20050503155355.6ac3f4a6.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jgarzik@pobox.com \
--cc=mchan@broadcom.com \
--cc=netdev@oss.sgi.com \
--cc=shemminger@osdl.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).