summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* libpciaccess 0.13.4libpciaccess-0.13.4Alan Coopersmith2015-04-301-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Bug 89151: Fix build on NetBSD/alpha and NetBSD/sparc64.Tobias Nygren2015-02-161-2/+6
| | | | | | | | | | | | This patch is required for building on NetBSD/alpha (needs platform specific -lalpha) and NetBSD/sparc64 (no platform specific library, just -lpci). The patch also generalizes to support all NetBSD platforms with pci bus. https://bugs.freedesktop.org/show_bug.cgi?id=89151 Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
* Check for __linux__ instead of linux during compilationEero Tamminen2015-02-121-1/+3
| | | | | | | | | | | | | | | | "__linux__" is the POSIX define for checking for Linux OS, "linux" is deprecated and apparently not supported by Android. Besides correcting the define, patch adds error for the case OS isn't recognized. Signed-off-by: Eero Tamminen <eero.t.tamminen@intel.com> v2: Drop double negative from commit msg. Spotted by Mateusz Jończyk. [Emil Velikov: Remove irrelevant Android details from commit msg.] Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Include config.h before any other headers.Emil Velikov2015-02-124-16/+16
| | | | | | | | | The former has a series of defines which in some cases are crusial to be set before including any system headers. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Add missing guards around config.h inclusionChih-Wei Huang2015-02-123-0/+8
| | | | | | | | | | | In some cases the header may not exist, leading to compilation issues. Add the ifdef HAVE_CONFIG_H, as it is those in other parts of the project. [Emil Velikov: Split out from a larger commit, rework commit message] Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Include the POSIX fcntl.h instead of sys/fcntl.hEmil Velikov2015-02-121-1/+1
| | | | | | | | | | | | The former is part of the POSIX standard, and (unlike the latter) is more widely available. v2: Drop gracious d in header name. Spotted by Alan. Cc: Adam Jackson <ajax@redhat.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* libpciaccess 0.13.3libpciaccess-0.13.3Alan Coopersmith2015-02-031-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Use PCIOCREADMASK on OpenBSD.Mark Kettenis2014-09-291-6/+25
| | | | | | | | | | | If the machdep.allowaperture sysctl(8) variable is set to 0, writing to PCI config space is not allowed. So instead of writing 0xffffffff to the BARs in order to determine their size, use the PCIOCREADMASK ioctl(2) which returns the mask of changeable bits that was saved by the kernel when the devices was initially probed. Reviewed-by: Matthieu Herrb <matthieu@herbb.eu> Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
* Implement the kernel_has_driver() method for NetBSD.Matthew Green2014-08-301-0/+24
| | | | | | | | | This has the benefit of stopping the "vesa" driver from loading on hardware that has been claimed by a kernel driver and thus shouldn't be using "vesa". Reviewed-by: Matthieu Herrb <matthieu@herrb.eu> Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
* Solaris: Fix fd leak in pci_device_solx_devfs_map_range()Alan Coopersmith2014-07-031-0/+3
| | | | | | | | | | | Caching fd's for reuse is most effective when you actually stick the newly opened fd in the cache, instead of letting it leak at the end of the function. Regression introduced by yours truly in commit 9f2d95e61896f41adb. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Randy Fishel <randy.fishel@oracle.com>
* Enable use of __attribute__((deprecated)) with Solaris Studio 12.4 compilerAlan Coopersmith2014-05-311-1/+1
| | | | | | Support for this attribute is added in the 12.4 beta release. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Fix IO access functions on linux+sysfs.Marcin Ko?cielnicki2014-02-117-18/+54
| | | | | | | The offsets on the resourceX files are relative to BAR base - don't add the base address ourselves. Reviewed-by: Adam Jackson <ajax@redhat.com>
* Fix a compilation error on GNU Hurd platforms.Samuel Pitoiset2014-01-311-1/+1
| | | | | | | This fixes a typo (unAMp instead of unMAp) introduced in the Windows/Cygwin support patch. Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* Windows/Cygwin: Add support through the WinIo librarySamuel Pitoiset2014-01-276-4/+210
| | | | | | | | | V2: - Add support for unmapping - Add a README.cygwin Reviewed-by: Martin Peres <martin.peres@free.fr> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
* Improve NetBSD i386 detection.Thomas Klausner2013-11-221-1/+1
| | | | | | | | | | Sometimes, other values are reported for the CPU part, like "i486--netbsdelf"). From: Mark Davies <markd@NetBSD.org> Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Reviewed-By: Matt Dew <marcoz@osource.org> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Fix zlib handling on NetBSD.Thomas Klausner2013-07-211-2/+2
| | | | | | Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* libpciaccess 0.13.2libpciaccess-0.13.2Alan Coopersmith2013-07-201-1/+1
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Fix Sun bug #7035791: scanpci should report 64 bit registersJohn Martin2013-07-201-2/+4
| | | | | | | | | | | | | | | | | | On a system which has allocated 64-bit device addresses scanpci -v will show entries such as: [...] BASE0 0xce000000 SIZE 16777216 MEM BASE1 0x00000fc1f8000000 SIZE 134217728 MEM64 PREFETCHABLE BASE3 0x00000fc1f6000000 SIZE 33554432 MEM64 PREFETCHABLE [...] instead of: [...] BASE0 0xce000000 SIZE 16777216 MEM BASE1 0xf8000000 SIZE 134217728 MEM PREFETCHABLE BASE3 0xf6000000 SIZE 33554432 MEM PREFETCHABLE [...] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Resync COPYING file with copyrights/licenses from codeAlan Coopersmith2013-07-201-3/+33
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* pci_device_solx_devfs_probe: implicit conversion changes signedness warningsAlan Coopersmith2013-07-061-1/+1
| | | | | | | | | | | | | solx_devfs.c:615:32: warning: implicit conversion changes signedness: 'unsigned long' to 'int' [-Wsign-conversion] for (i = 0; i < len; i = i + CELL_NUMS_1275) { ~ ~~^~~~~~~~~~~~~~~~ solx_devfs.c:615:30: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] for (i = 0; i < len; i = i + CELL_NUMS_1275) { ^ ~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Solaris: Remove #defines for Ultra 45 southbridge device idsAlan Coopersmith2013-07-061-20/+0
| | | | | | | | | Workaround for these chipsets was removed in commit d76fb36d9c28be0f7c with the switch of probing methods from the PCI address poking that upset them to using the already collected data from the kernel via devinfo, but the #define to identify them was left behind unused - remove it too. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* pci_device_solx_devfs_read: fix sign conversion/comparison warningsAlan Coopersmith2013-07-061-1/+1
| | | | | | | | | | | | | | | Fixes: solx_devfs.c:824:19: warning: comparison of integers of different signs: 'int' and 'pciaddr_t' (aka 'unsigned long') [-Wsign-compare] for (i = 0; i < size; i += PCITOOL_ACC_ATTR_SIZE(PCITOOL_ACC_ATTR_SIZE_1)) ~ ^ ~~~~ solx_devfs.c:826:28: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] cfg_prg.offset = offset + i; ~ ^ solx_devfs.c:844:19: warning: implicit conversion changes signedness: 'int' to 'pciaddr_t' (aka 'unsigned long') [-Wsign-conversion] *bytes_read = i; ~ ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Support more pci functions on NetBSD.Thomas Klausner2013-07-061-0/+325
| | | | | Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Fix build on NetBSD-4.Thomas Klausner2013-07-062-0/+25
| | | | | | Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Enable boot_vga support only if WSDISPLAYIO_GET_BUSID is defined.Thomas Klausner2013-07-061-0/+6
| | | | | | | | Fixes build on NetBSD-5. Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* pci_id_file_open: move variable inside the #ifndef that uses itAlan Coopersmith2013-06-241-1/+1
| | | | | | | | Clears up gcc warning on Solaris: common_device_name.c: In function 'pci_id_file_open': common_device_name.c:83:17: warning: unused variable 'result' [-Wunused-variable] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Define PCI_MATCH_ANY as an unsigned intAlan Coopersmith2013-06-241-1/+1
| | | | | | | | | | | | | | | | Clears a bunch of clang warnings of the forms: common_device_name.c:345:23: warning: comparison of integers of different signs: 'const uint32_t' (aka 'const unsigned int') and 'int' [-Wsign-compare] if ( m->vendor_id == PCI_MATCH_ANY ) { ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~ common_device_name.c:498:19: warning: implicit conversion changes signedness: 'int' to 'uint32_t' (aka 'unsigned int') [-Wsign-conversion] m.device_id = PCI_MATCH_ANY; ~ ^~~~~~~~~~~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Update NetBSD support.Thomas Klausner2013-06-112-133/+342
| | | | | | | Signed-off-by: Michael Lorenz <macallan@NetBSD.org> Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Move 'const' to correct place, so it has meaning.Thomas Klausner2013-06-111-1/+1
| | | | | Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Protect config.h like usual.Thomas Klausner2013-06-072-0/+6
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Bug 63583 - add legacy IO routines for FreeBSDAlan Coopersmith2013-06-071-0/+146
| | | | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=63583 Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Signed-off-by: Jung-uk Kim <jkim@FreeBSD.org> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Solaris: probe improvementHenry Zhao2013-03-091-292/+128
| | | | | | | | | Remove pcitool dependency in probing phase. Use the data collected from devinfo tree instead in creating pci file system. Signed-off-by: Henry Zhao <henzhao@glory3.(none)> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Solaris: Add domain support for sparc platformbaserock/morphHenry Zhao2013-01-152-88/+29
| | | | | | | | As a result the code of finding nexus node for a device in sparc is simplified and made the same as x86. Signed-off-by: Henry Zhao <henry.zhao@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* autogen.sh: Implement GNOME Build APIColin Walters2013-01-151-1/+3
| | | | | | http://people.gnome.org/~walters/docs/build-api.txt Signed-off-by: Adam Jackson <ajax@redhat.com>
* configure: Remove AM_MAINTAINER_MODEAdam Jackson2013-01-151-1/+0
| | | | Signed-off-by: Adam Jackson <ajax@redhat.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>
* scanpci: print meaningful info on BASEROMHenry Zhao2012-10-212-3/+7
| | | | | Signed-off-by: Henry Zhao <henry.zhao@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* libpciaccess: sparc rom read fixHenry Zhao2012-10-211-63/+58
| | | | | | | | Get rom address and size from device's "assigned-addresses" property if they exist. Signed-off-by: Henry Zhao <henry.zhao@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* libpciaccess: implementation of boot_vga in SolarisHenry Zhao2012-10-212-0/+22
| | | | | Signed-off-by: Henry Zhao <henry.zhao@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* libpciaccess: fix memory usage errorsMark Logan2012-10-122-11/+21
| | | | | | | | | | | This patch fixes memory usage errors that only occur on large SPARC machines with more than 256 PCI devices. In this case, memory is being used after it has been freed by calls to both free() and realloc(). This error was introduced by a previous patch: 2011-03-30 Solaris support for multiple PCI segments (domains) Signed-off-by: Mark Logan <mark.logan@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Implement legacy io & map for x86 backendSamuel Thibault2012-05-311-1/+99
| | | | | | | Add the legacy io and map methods for the x86 backend, using ioperm, in/out, and the existing mmap method. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* Solaris: refactor pci_device_solx_devfs_map_range to reduce code duplicationAlan Coopersmith2012-04-231-20/+21
| | | | | | | | The sparc & x86 cases were doing essentially the same things with different paths, so make the path setup be inside the platform specific #ifdefs, make the open, mmap, & error handling common code. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Solaris: Implement map_legacy & legacy_io functionsAlan Coopersmith2012-04-231-2/+135
| | | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jay Cotton <jay.cotton@oracle.com>
* Bump to 0.13.1libpciaccess-0.13.1Julien Cristau2012-04-092-2/+2
| | | | Signed-off-by: Julien Cristau <jcristau@debian.org>
* Fix pci_io_handle allocation routines.Matthieu Herrb2012-04-041-35/+4
| | | | | | | | | | | | | The previous version of new_io_handle() would invalidate all previous allocations when realloc moves the base pointer of the ios array. Since I cannot figure out where this array is useful, just get rid of it, providing sound stable memory allocation. Fixes vgaHWSaveFonts() in 1.12 xserver on OpenBSD, but other sub-systems relaying on pci_io could be affected too. Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Tested-by: Tormod Volden <debian.tormod@gmail.com>
* Fix openbsd_pci.c:pci_device_vgaarb_set_target();Thordur Bjornsson2012-03-141-0/+1
| | | | | | | A return (0) got lost, add it back. Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Reviewed-by: Mark Kettenis <mark.kettenis@xs4all.nl>
* linux: Fix out[bwl] macros on non-I/O architecturesAdam Jackson2012-03-051-3/+3
| | | | Signed-off-by: Adam Jackson <ajax@redhat.com>
* Merge branch 'master' of ssh://git.freedesktop.org/git/xorg/lib/libpciaccessAdam Jackson2012-03-051-1/+1
|\
| * configure.ac: Bump to 0.13libpciaccess-0.13Jeremy Huddleston2012-03-031-1/+1
| | | | | | | | Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
* | Use O_CLOEXEC for internal file descriptorsAdam Jackson2012-02-2710-28/+60
|/ | | | | | | | Well, almost all of them. zlib doesn't support "e" in the mode string in gzopen() though it will silently accept and ignore it, and Solaris appears not to support "e" in the mode string at all. Signed-off-by: Adam Jackson <ajax@redhat.com>