Bug#499501: xserver-xorg-core: does not detect video devices anymore (kfreebsd-amd64)
tags 499501 +patch
severity 499501 important
thanks
after upgrade from 2:1.4.2-1 to 2:1.4.2-6 X does not start anymore.
Downgrading to 2:1.4.2-1 restores functionality.
The important part of diff between startup-logs is bellow.
It looks like there have been reduced range of scanned busses.
It might be GNU/kFreeBSD specific.
I can't see anything in the diff between -1 and -6 that would change
this. Is it reproducible? Any kernel change?
It is 100% reproducible.
I found the cause, there have been change in GNU/kFreeBSD specific headers.
The identification (struct pcisel) have been extended by domain field in
FreeBSD 7.x series. There is a ABI compatibility layer - the reason why
2:1.4.2-1 works. With current interface, the io.pi_sel.pc_domain is not
initialized, it contains garbage, in the first iteration
it have been luckily zeroed -> some entries have been found.
In long term, it should properly handle domains, but in short term
(for current sid and our lenny snapshot) please, could you add
the patch bellow. It really does not affect any official release
architectures.
Many thanks
Petr
only in patch2:
unchanged:
--- xorg-server-1.4.2.orig/hw/xfree86/os-support/bus/freebsdPci.c
+++ xorg-server-1.4.2/hw/xfree86/os-support/bus/freebsdPci.c
@@ -133,6 +133,7 @@
{
struct pci_io io;
int error;
+ io.pi_sel.pc_domain = 0;
io.pi_sel.pc_bus = BUS(tag);
io.pi_sel.pc_dev = DFN(tag) >> 3;
io.pi_sel.pc_func = DFN(tag) & 7;
@@ -148,6 +149,7 @@
freebsdPciCfgWrite(PCITAG tag, int off, CARD32 val)
{
struct pci_io io;
+ io.pi_sel.pc_domain = 0;
io.pi_sel.pc_bus = BUS(tag);
io.pi_sel.pc_dev = DFN(tag) >> 3;
io.pi_sel.pc_func = DFN(tag) & 7;
Reply to: