Re: suspect bug in vge(4)

From: Pyun YongHyeon <pyunyh_at_gmail.com>
Date: Mon, 15 Jun 2009 10:31:06 +0900
On Sun, Jun 14, 2009 at 04:12:53PM +0200, Thomas Lotterer wrote:
> Thomas Lotterer wrote:
> >Pyun YongHyeon wrote:
> >>On Thu, Jun 11, 2009 at 05:39:03PM +0200, Thomas Lotterer wrote:
> >>>Pyun YongHyeon wrote:
> >>>>Could you show me dmesg output(only vge(4) related one)?
> >>># dmesg | grep vge
> >>>vge0: <VIA Networking Gigabit Ethernet> port 0xec00-0xecff mem 
> >>>0xdf7ff000-0xdf7ff0ff irq 28 at device 0.0 on pci2
> >>>vge0: MSIX count : 0
> >>>vge0: MSI count : 1
> >>
> >>I wonder why "Using 1 MSI messages" message is missing.
> >
> I stud if_vge.c with device_printf() statements.
> 
> Turns out pci_alloc_msi() returns 6 = ENXIO
> 
> The pci_alloc_msi_method() in /usr/src/sys/dev/pci/pci.c
> lists three cases returning ENXIO and all are located at the very top of 
> the function.
> 
> - If rid 0 is allocated, then fail.
> - Already have allocated messages?
> - If MSI is blacklisted for this system, fail.
> 
> The pci_msi_blacklisted() and pci_msi_device_blacklisted() in 
> /usr/src/sys/dev/pci/pci.c
> seem to check chipsets, devices and tunables
> 

Correct. FreeBSD maintains a quirk table of known devices that do
not work with MSI. These buggy devices are black listed by default.
Compare your device ids with the list. Use pciconf(8) to get PCI
device ids.

> Regarding the chipset
> # dmesg | egrep ^acpi
> acpi0: <VX800 AWRDACPI> on motherboard
> acpi0: [ITHREAD]
> acpi0: Power Button (fixed)
> acpi0: reservation of 0, a0000 (3) failed
> acpi0: reservation of 100000, 7bde0000 (3) failed
> acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0
> acpi_button0: <Power Button> on acpi0
> acpi_button1: <Sleep Button> on acpi0
> 
> Regarding the tunables
> # sysctl -a | fgrep hw.pci.
> hw.pci.honor_msi_blacklist: 1
> hw.pci.enable_msix: 1
> hw.pci.enable_msi: 1
> hw.pci.do_power_resume: 1
> hw.pci.do_power_nodriver: 0
> hw.pci.enable_io_modes: 1
> hw.pci.host_mem_start: 2147483648
> hw.pci.mcfg: 1
> hw.pci.irq_override_mask: 57080
> 
> No cheating here
> # sysctl hw.pci.honor_msi_blacklist=0
> sysctl: oid 'hw.pci.honor_msi_blacklist' is read only
> 

That tunable is read only. You can set it in /boot/loader.conf.
hw.pci.honor_msi_blacklist="0"

> Ideas and suggestions welcome.
> -- 
> http://thomas.lotterer.net
Received on Sun Jun 14 2009 - 23:27:54 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:49 UTC