summaryrefslogtreecommitdiff
path: root/src/common_bridge.c
Commit message (Collapse)AuthorAgeFilesLines
* Protect config.h like usual.Thomas Klausner2013-06-071-0/+3
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* PCI: set correct mask value when matching for bridges.Egbert Eich2013-01-031-1/+3
| | | | | | | | The mask must not be zero otherwise the matching condition will never be true: ((val & mask) == set). Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Guillem Jover <guillem@hadrons.org>
* Strip trailing whitespaceAlan Coopersmith2011-09-161-5/+5
| | | | | | | Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}' git diff -w & git diff -b show no diffs from this change Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Fix detection of multi-function cardsBryce Harrington2010-12-141-2/+2
| | | | | | | | | | | Bit 7 of the pci device header type is an indicator of multi-function devices, so needs to be masked when examining the bridge type. Thanks go to Chih-Pin Wu for finding the bug and its fix. https://bugs.launchpad.net/ubuntu/+source/libpciaccess/+bug/681207 Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Bryce Harrington <bryce@canonical.com>
* Revert "Don't try to use bogus bridge data"Jesse Barnes2010-12-061-4/+0
| | | | | | | | | | | | | | | | | | | This reverts commit 2bda5b733bb12854760750c08138db95e77aea0c. It actually conflicts with 9ba94caf57e3a8c3e9c6f3f5f068f4a7a7b3ff9d which came earlier, but I didn't catch it probably because I did a blind rebase before pushing. When reading bridge bus info, we may need to read out the current bridge info if the PCI bridge private is uninitialized, so remove the check at the top that would always short circuit the case where the priv was still 0. References: https://bugs.launchpad.net/ubuntu/+source/libpciaccess/+bug/681207. Reported-by: Bryce Harrington <bryce@canonical.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
* Add pci_device_get_parent_bridge()Adam Jackson2009-12-021-0/+40
| | | | | | | Copied from linuxPci.c in the X server. Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
* Don't try to use bogus bridge dataJesse Barnes2009-06-301-0/+4
| | | | | | If, for whatever reason, we weren't able to read bridge data (therefore leaving bridge.pci or bridge.pcmcia empty), we shouldn't try to look at the bus data inside the pci/pcmcia struct.
* Be more paranoid about reading bridge info (#20786)Darren Smith2009-04-141-4/+16
|
* Make sure header_type is available in read_bridge_info.Ian Romanick2007-03-271-0/+9
|
* Added some function preamble comments.Ian Romanick2006-07-301-0/+34
|
* Add pci_device_get_bridge_buses, bump API version to 0.5.0.Ian Romanick2006-07-251-0/+52
|
* Add support for querying bridge information. Bump to version 0.5.0.Ian Romanick2006-07-061-0/+213