Martin Mares [Fri, 28 May 2004 10:45:38 +0000 (10:45 +0000)]
Decode all bits in type 1 headers
lspci.c: Decode all bits of the secondary status word in type 1 headers.
Thanks to Maciej W. Rozycki <macro@ds2.pg.gda.pl> for the patch.
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-38
Martin Mares [Sat, 27 Dec 2003 19:42:38 +0000 (19:42 +0000)]
Added sysfs support
* lib/pci.h (PCIADDR_PORT_FMT): Use %llx instead of %Lx, because the latter
is not supported by all C libraries.
* Makefile: Always enter the lib directory (remember that we don't have
full dependecies for the library in the top-level Makefile; hmmm, another
thing to rewrite some day).
* lib/sysfs.c: Added Linux sysfs access method based on the patch
written by Matthew Wilcox <willy@fc.hp.com>.
* lib/proc.c: Renamed the access method name from "/proc/bus/pci" to "Linux-proc".
* lib/pread.h: The hacks to support pread on various versions
of Linux libc moved there.
* lib/proc.c (proc_setup): The return value of snprintf() varies
between glibc versions, so we need to check both for a negative
values and for too large values.
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-33
Martin Mares [Sat, 27 Dec 2003 13:28:42 +0000 (13:28 +0000)]
New release system
Integrated a new system for making release.
Really applied the fbsd-device patch this time.
Released as 2.1.99-test2.
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-29
Martin Mares [Sat, 27 Dec 2003 00:40:21 +0000 (00:40 +0000)]
Remove ghosts of syscall access method
* pciutils.h, common.c, lspci.man, setpci.man, lib/internal.h:
Remove shadows of the syscall access method which was never
implemented.
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-25
Martin Mares [Sat, 27 Dec 2003 00:33:56 +0000 (00:33 +0000)]
update-pciids should preserve permissions
* update-pciids.sh: Try to preserve permissions of the old file
if chmod supports --reference. Should close Debian Bug #223740.
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-24
Martin Mares [Sat, 27 Dec 2003 00:23:03 +0000 (00:23 +0000)]
Redhat and Mandrake fixes
* lib/proc.c (proc_setup): Increased path name length limit to 1024.
Thanks for Redhat and Mandrake for inspiration.
* lib/configure: Recognize ppc and ppc64, both have 64-bit addresses.
Grabbed from Redhat (Fedora) patches.
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-23
Martin Mares [Fri, 26 Dec 2003 23:56:29 +0000 (23:56 +0000)]
Merged bug fixes from Debian patches
* lspci.c (show_verbose): "Cache Line Size" should be capitalized.
* lspci.c (show_pcix_nobridge): Added a missing newline.
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-22
Martin Mares [Fri, 26 Dec 2003 23:53:07 +0000 (23:53 +0000)]
Corrected masking of hdr_type
* lib/proc.c (proc_scan): When reading the header type, don't
forget to clear the topmost bit indicating that the device has
multiple functions. Grabbed from Debian patches.
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-21
Martin Mares [Fri, 26 Dec 2003 23:30:47 +0000 (23:30 +0000)]
Updated the FreeBSD port
Updated the FreeBSD port. Thanks to Samy Al Bahra <samy@kerneled.com>
for the patches:
* lib/Makefile: Add ${FREEBSD_SYS} to the include path if it's defined.
* lib/fbsd-device.c: Select the right set of system includes according
to __FreeBSD_version.
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-20
Martin Mares [Fri, 26 Dec 2003 23:13:13 +0000 (23:13 +0000)]
Added support for SunOS/i386
Merged support for Solaris on i386 by Bill Moore <billm@eng.sun.com>
and cleaned up:
* lib/configure: Recognize SunOS.
* lib/internal.h: Learn how to recognize byte order on SunOS.
* lib/i386-ports.c: Split OS-dependent I/O port access from i386-ports.c.
* lib/i386-io-linux.h: Linux specific part.
* lib/i386-io-hurd.h: GNU/Hurd specific part.
* lib/i386-io-sunos.h: SunOS specific part.
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-18
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.