On Thu, Dec 02, 2010 at 03:34:40AM -0000, Chih-Pin Wu wrote: > Thanks, Bryce. > > About the bridge.pci pointer, as it stands the function will not go pass > that pointer checking and always return with ENODEV. You see priv is a > local variable (structure) and only its first member "base", which is a > pci_device structure, gets filled in with valid data from caller by type > casting (from pci_device* to pci_device_priv). The union member > "bridge", which is a pointer, is not part of the pci_device structure. > As such, the value will be null every time the function is called. So > without fixing this pointer checking thing, the code below it will never > get executed.
Ah, thanks for the added explanation, yes that makes sense. The reason I left that bit out of the patch I sent upstream is because there was a specific commit that added it: http://cgit.freedesktop.org/xorg/lib/libpciaccess/commit/?id=2bda5b733bb12854760750c08138db95e77aea0c So it's a conceptually distinct change and I figure upstream will prefer to consider that separate from the bit mask change. Also, because it looks like that change would best be implemented upstream via a revert. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/681207 Title: PCI device header type doesn't include bit7 -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
