Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 May 2007 10:07:29 -0700
From:      "David Christensen" <davidch@broadcom.com>
To:        pyunyh@gmail.com, freebsd-current@freebsd.org
Subject:   RE: Releasing MSI Resources in a Module Causes Kernel Panic on -CURRENT
Message-ID:  <09BFF2FA5EAB4A45B6655E151BBDD90303ECF0B1@NT-IRVA-0750.brcm.ad.broadcom.com>
In-Reply-To: <20070515045821.GA13350@cdnetworks.co.kr>
References:  <09BFF2FA5EAB4A45B6655E151BBDD90303DE3A51@NT-IRVA-0750.brcm.ad.broadcom.com> <20070515045821.GA13350@cdnetworks.co.kr>

next in thread | previous in thread | raw e-mail | index | archive | help
>  > What is going wrong?=20
>  >=20
>=20
> I don't know any 5708 hardware details but pci_alloc_msi() may have
> failed. AFAIK just checking pci_alloc_msi() =3D=3D 0 is not enough
> and you may have to check count is 1 before proceeding to use MSI.
> I've also noted that MSIX supports needs additional resource to
> enable MSIX table/PBA on nfe(4) hardware. I'm not sure it's applicable
> to you, though.

The 5708 is a PCI-X controller behind a PCIe to PCI-X bridge.  There are
no known problems with MSI on the device and it works correctly when=20
configured under Linx (and apparently under FreeBSD too).  There's just
this problem with releasing the MSI resource.  MSI-X is not supported on
this controller.
=20
>=20
> I guess the following code could be changed from
> 	if (count =3D=3D 1 && pci_alloc_msi(dev, &count) =3D=3D 0) {
> 		rid =3D 1;
> 		sc->bce_flags |=3D BCE_USING_MSI_FLAG;
> 	} else
> 		rid =3D 0;
>=20
> To:
> 	if (count =3D=3D 1 && pci_alloc_msi(dev, &count) =3D=3D 0 &&=20
> count =3D=3D 1) {
>                                                             =20
> ^^^^^^^^^^
> 		rid =3D 1;
> 		sc->bce_flags |=3D BCE_USING_MSI_FLAG;
> 	} else
> 		rid =3D 0;
>=20
> It would be even better if you can provide a=20
> tunable(hw.bce.msi_disable)
> to disable MSI capability for bce(4).

Thanks Pyun but that doesn't appear to be the problem.  The call to
pci_alloc_msi() is returning correctly with a count of 1.  I can=20
certainly add a sysctl to disable MSI but that just masks the problem
without getting to the root cause.

Dave




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?09BFF2FA5EAB4A45B6655E151BBDD90303ECF0B1>