Martin Mares [Fri, 26 Dec 2003 22:52:21 +0000 (22:52 +0000)]
Clean up types
* lib/header.h (PCI_*_MASK): Cast to pciaddr_t explicitly.
* lib/pci.h: Types declared in <sys/types.h> should be usable on all
platforms we currently support, so kill the forest of #ifdef's and
use them in all cases.
* lib/pci.h: Use ULONG_MASK to decide whether we should use long
or long long to represent a 64-bit address. Killed HAVE_LONG_ADDRESS.
Define format strings for addresses, port numbers and IRQ numbers
directly in pci.h.
* lib/proc.c (proc_scan): Use PCIADDR_T_FMT for scanf'ing addresses.
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-17
Martin Mares [Fri, 26 Dec 2003 22:07:54 +0000 (22:07 +0000)]
Added support for GNU Hurd
2003-12-26 Marco Gerards <metgerards@student.han.nl>
Added support for the GNU Hurd (cleaned up by Martin Mares):
* lib/configure [GNU]: Use the i386 ports for configuration access.
* lib/i386-ports.c: Don't call iopl() on the Hurd.
* lib/pci.h [OS_GNU]: Include <sys/types.h> and use it for defining
u8 to u32.
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-16
Martin Mares [Fri, 26 Dec 2003 21:57:34 +0000 (21:57 +0000)]
Fixed calls to config_fetch()
* lspci.c (show_pcix_bridge, show_pcix_nobridge): Don't forget to call
config_fetch() to ensure that the registers have been read. Thanks to
Bill Wood <bill.wood@hp.com> for the patch.
* lspci.c: Ensure that failure of config_fetch() is handled correctly
at all places.
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-15
Martin Mares [Fri, 26 Dec 2003 21:46:26 +0000 (21:46 +0000)]
Fixed @SHAREDIR@
lspci.man: There was one more explicit reference to /usr/share/pci.ids.
Changed to @SHAREDIR@. Patch from Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-14
Martin Mares [Fri, 26 Dec 2003 21:41:11 +0000 (21:41 +0000)]
setpci: -D should not disable reading
setpci.c (ex_op): The demo mode was never documented to disable reads,
only writes, so conform with the definition.
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-12
Martin Mares [Fri, 26 Dec 2003 21:30:06 +0000 (21:30 +0000)]
Introduced NONRET macro
pciutils.h, common.c, setpci.c: Introduced a NONRET macro encapsulating
the GCC specific __attribute__((noreturn)) and killed the hack with
redefining __attribute__ on non-GCC compilers.
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-10
Martin Mares [Fri, 26 Dec 2003 21:24:27 +0000 (21:24 +0000)]
Support masking in setpci
setpci.c: Individual bits to be set can be specified as <value>:<mask>.
Contributed by Thayne Harbaugh <tharbaugh@lnxi.com> and cleaned up
by me.
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-9
Martin Mares [Fri, 26 Dec 2003 20:19:17 +0000 (20:19 +0000)]
Fixed parallel builds
Makefile: Added missing dependencies. Parallel builds work now.
Problem reported by Andreas Haumer <andreas@xss.co.at>, but I chose
a different fix.
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-8
Martin Mares [Fri, 26 Dec 2003 20:13:26 +0000 (20:13 +0000)]
Use := instead of =
Makefile (MANDIR): Use `:=' instead of `=' to avoid executing the shell
command every time $(MANDIR) is referenced.
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-7
Martin Mares [Fri, 26 Dec 2003 20:09:21 +0000 (20:09 +0000)]
Incorrect error message fixed.
lspci.c (main): The error message for `lspci -s' incorrectly mentioned
a `-f' switch. Reported by Steve Finney <Steve.Finney@SpirentCom.COM>.
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-6
Martin Mares [Fri, 26 Dec 2003 20:07:46 +0000 (20:07 +0000)]
Removed memory leak in pci_generic_bus_scan().
lib/generic.c: Removed memory leak in pci_generic_bus_scan().
Reported by Gary Parnes <gary_parnes@terago.com>.
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-5
Martin Mares [Fri, 26 Dec 2003 20:04:29 +0000 (20:04 +0000)]
Fixed UNUSED
Replaced obsolete syntax of __attribute__((unused)) in the middle of
parameter declarations (which is no longer supported by GCC 3.1) by the
current syntax (attribute at the end). Thanks to pixel@mandrakesoft.com
for reporting this problem.
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-4
Martin Mares [Fri, 27 Dec 2002 19:01:51 +0000 (19:01 +0000)]
(pci_generic_scan_bus): Added work-around for devices with
discontiguous numbering of functions. This is already present in the Linux
kernel for several years, but I forgot to update pciutils as well.
Martin Mares [Sun, 24 Mar 2002 12:14:40 +0000 (12:14 +0000)]
(pci_lookup_name): When printing unknown subsystem vendor or device
hexadecimally, don't confuse it with chip vendor/device ID. First reported by
Marc Boucher <marc@mbsi.ca>.