found problem: CVS head on FreeBSD-4.6 hangs hard

Brad Karp <[email protected]> Thu, 27 Jun 2002 17:03:14 -0700
Newsgroups gmane.comp.xfree86.neomagic
Message-ID <[email protected]>
I posted recently that on my Sony SR7K (NeoMagic NM2380) running FreeBSD 
4.6-RELEASE, a build of XFree86 from the CVS head of 6/13/02 locks the machine 
hard; the machine doesn't respond to VT switches anymore, and the console in 
unrecoverable, though Ctrl-Alt-DEL succeeds in triggering a clean shutdown 
(with no further console output).

Egbert Eich suggested I diff through sources to find the commit that causes 
the breakage.

Done.

Revision 3.51 of xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c (committed 
on 4/4/02 by eich) introduces code to notice CardBus bridges and treat them 
specially (several switch statements with new PCI_SUBCLASS_BRIDGE_CARDBUS 
cases in them).

It's this CardBus-specific code that causes the hang; if I #ifdef out all such 
CardBus-specific cases, the build runs as expected.

Note that it's *not* {save,restore}PciCardBusState() that cause the hang; with 
the code in those commented out, the hang still occurs.

Under FreeBSD 4.X, there is no CardBus support; only NEWCARD in 5.X supports 
CardBus. It's likely that diddling the CardBus controller under 4.X ist streng 
verboten.

Suggestions:

	- Try it on a 5.X machine (I can't; don't have time to reinstall the
	  OS) with NEWCARD CardBus support, to see if it works there.

	- #ifdef out the CardBus code for FreeBSD 4.X, and for 5.X, too, if
	  it fails on 5.X. This code likely causes the CVS head of XFree86
	  to fail on all FreeBSD 4.X laptops.

-Brad, [email protected]