mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bjorn_helgaas@hp.com>
To: "David S. Miller" <davem@redhat.com>
Cc: linux-kernel@vger.kernel.org, Grant Grundler <grundler@cup.hp.com>
Subject: Re: tg3: back-to-back register write bug workaround causes MCA
Date: Fri, 14 Feb 2003 10:24:27 -0700	[thread overview]
Message-ID: <200302141024.27005.bjorn_helgaas@hp.com> (raw)
In-Reply-To: <20030212.193217.27086083.davem@redhat.com>

On Wednesday 12 February 2003 8:32 pm, David S. Miller wrote:
> This sounds like either a bug in your ia64's PCI chipset or
> in the tigon3 device.

We haven't captured a PCI trace yet, but I think we have a good
lead.  The MCA occurs in tg3_chip_reset(), which does:

	tw32(GRC_MISC_CFG, GRC_MISC_CFG_CORECLK_RESET);

The comment immediately after the reset:

        /* Flush PCI posted writes.  The normal MMIO registers
         * are inaccessible at this time so this is the only
         * way to make this reliably.  I tried to use indirect
         * register read/write but this upset some 5701 variants.
         */
        pci_read_config_dword(tp->pdev, PCI_COMMAND, &val);

says that the MMIO registers are inaccessible at this time.
Presumably they became inaccessible when tg3_write_indirect_reg32()
did the write to GRC_MISC_CFG, so the read-after-write for the
TG3_FLAG_5701_REG_WRITE_BUG is then reading an inaccessible register.

One unusual thing about our ia64 chipset (and our parisc chipset)
is that it's typically configured so PCI master aborts cause an MCA.
My understanding is that most other PCI controllers basically ignore
master aborts, so the aborted read would just return -1 instead of
causing an MCA.

The following change (though not correct because it ignores
TG3_FLAG_PCIX_TARGET_HWBUG) avoids the MCA:

--- 1.57/drivers/net/tg3.c      Fri Feb 14 09:24:48 2003
+++ edited/drivers/net/tg3.c    Fri Feb 14 09:26:49 2003
@@ -3059,7 +3059,7 @@
                }
        }
 
-       tw32(GRC_MISC_CFG, GRC_MISC_CFG_CORECLK_RESET);
+       writel(GRC_MISC_CFG_CORECLK_RESET, tp->regs + GRC_MISC_CFG);
 
        /* Flush PCI posted writes.  The normal MMIO registers
         * are inaccessible at this time so this is the only

So perhaps we need a special-case path for resetting, so we don't
try to access the registers while they're disabled.

Bjorn


      reply	other threads:[~2003-02-14 17:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-13  0:30 Bjorn Helgaas
2003-02-13  3:32 ` David S. Miller
2003-02-14 17:24   ` Bjorn Helgaas [this message]

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=200302141024.27005.bjorn_helgaas@hp.com \
    --to=bjorn_helgaas@hp.com \
    --cc=davem@redhat.com \
    --cc=grundler@cup.hp.com \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®