Date: Wed, 11 Mar 2009 10:08:21 +0900 From: Pyun YongHyeon <pyunyh@gmail.com> To: "Arno J. Klaassen" <arno@heho.snv.jussieu.fr> Cc: current@freebsd.org Subject: Re: msi broken? Message-ID: <20090311010821.GC13527@michelle.cdnetworks.co.kr> In-Reply-To: <wp1vt5bhc4.fsf@heho.snv.jussieu.fr> References: <wp1vt5bhc4.fsf@heho.snv.jussieu.fr>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Tue, Mar 10, 2009 at 03:08:59PM +0100, Arno J. Klaassen wrote:
>
> Hello,
>
> when upgrading this morning from a March 1 -current, if_bge
> stopped working (and irq256: bge0 not showing up in
> vmstat -i ). Setting hw.pci.enable_msi="0" makes it work again.
>
I don't have bge(4) hardwares so I can't test this. Would you try
attached patch?
[-- Attachment #2 --]
Index: sys/dev/bge/if_bge.c
===================================================================
--- sys/dev/bge/if_bge.c (revision 189658)
+++ sys/dev/bge/if_bge.c (working copy)
@@ -2912,7 +2912,7 @@
write_op(sc, BGE_MISC_CFG, BGE_32BITTIME_66MHZ);
/* Re-enable MSI, if neccesary, and enable the memory arbiter. */
- if (BGE_IS_5714_FAMILY(sc)) {
+ if (BGE_IS_5714_FAMILY(sc) || sc->bge_flags & BGE_FLAG_MSI) {
/* This chip disables MSI on reset. */
if (sc->bge_flags & BGE_FLAG_MSI) {
val = pci_read_config(dev, BGE_PCI_MSI_CTL, 2);
@@ -2922,8 +2922,10 @@
CSR_WRITE_4(sc, BGE_MSI_MODE,
val | BGE_MSIMODE_ENABLE);
}
- val = CSR_READ_4(sc, BGE_MARB_MODE);
- CSR_WRITE_4(sc, BGE_MARB_MODE, BGE_MARBMODE_ENABLE | val);
+ if (BGE_IS_5714_FAMILY(sc)) {
+ val = CSR_READ_4(sc, BGE_MARB_MODE);
+ CSR_WRITE_4(sc, BGE_MARB_MODE, BGE_MARBMODE_ENABLE | val);
+ }
} else
CSR_WRITE_4(sc, BGE_MARB_MODE, BGE_MARBMODE_ENABLE);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090311010821.GC13527>
