logo       

Re: pciutils cross.patch: msg#00057

t2.devel

Subject: Re: pciutils cross.patch


Hello Martin,

the patch applied and I got no compile errors.


Regards,
yokoy


On Fri, 31 Aug 2007 11:01:55 +0200
Martin Mares <mj@xxxxxx> wrote:

> Hi!
>
> > this patch works fine for me...
> >
> > version pciutils-2.2.6.tar.gz
> > Testet on an amd x2 to cross compile from x86 host system to a x86_64
> > target.
>
> I have added an override for both ar and ranlib to my tree.
>
> Here is a diff of my tree against the 2.2.6 release, could you please
> verify that it compiles in your setup?
>
> Have a nice fortnight
> --
> Martin `MJ' Mares <mj@xxxxxx> http://mj.ucw.cz/
> Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
> A bug in the code is worth two in the documentation.
>
>
>
> diff --git a/ChangeLog b/ChangeLog
> index ca07312..962d642 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,24 @@
> +2007-08-31 Martin Mares <mj@xxxxxx>
> +
> + * Makefile, lib/Makefile: `ar' and `ranlib' can be overriden to allow
> + cross-compilation.
> +
> +2007-08-27 Martin Mares <mj@xxxxxx>
> +
> + * lib/names.c (pci_open): When calling gzopen(), use "rb" file mode
> + instead of "r". This is needed on DOS systems, where this function
> + somewhat illogically uses the binary flag for the compressed file
> + instead of the decompressed stream inside, where binariness really
> + matters.
> +
> +2007-08-14 Martin Mares <mj@xxxxxx>
> +
> + * lspci.c (show_ht): Added decoding of Hypertransport MSI mapping
> capability,
> + based on a patch by Jason Gunthorpe.
> +
> + * tests/cap-MSI-mapping: Added a test case. I plan to add test cases
> + (which are dumps of config space) for all new features.
> +
> 2007-06-20 Martin Mares <mj@xxxxxx>
>
> * Released as 2.2.6.
> diff --git a/Makefile b/Makefile
> index 192205c..016cdaa 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -17,6 +17,8 @@ LIBDIR=$(PREFIX)/lib
> PKGCFDIR=$(LIBDIR)/pkgconfig
> INSTALL=install
> DIRINSTALL=install -d
> +AR=ar
> +RANLIB=ranlib
> PCILIB=lib/libpci.a
> PCILIBPC=lib/libpci.pc
> PCIINC=lib/config.h lib/header.h lib/pci.h lib/types.h lib/sysdep.h
> diff --git a/lib/Makefile b/lib/Makefile
> index 9751eb5..2b6dac6 100644
> --- a/lib/Makefile
> +++ b/lib/Makefile
> @@ -54,8 +54,8 @@ all: $(PCILIB) $(PCILIBPC)
>
> $(PCILIB): $(OBJS)
> rm -f $@
> - ar rcs $@ $^
> - ranlib $@
> + $(AR) rcs $@ $^
> + $(RANLIB) $@
>
> $(PCILIBPC): $(PCILIBPC).in
> sed <$< >$@ -e 's,@PREFIX@,$(PREFIX),' \
> diff --git a/lib/names.c b/lib/names.c
> index 6d671d1..eee2f19 100644
> --- a/lib/names.c
> +++ b/lib/names.c
> @@ -1,7 +1,7 @@
> /*
> * The PCI Library -- ID to Name Translation
> *
> - * Copyright (c) 1997--2006 Martin Mares <mj@xxxxxx>
> + * Copyright (c) 1997--2007 Martin Mares <mj@xxxxxx>
> *
> * Can be freely distributed and used under the terms of the GNU GPL.
> */
> @@ -26,7 +26,7 @@ static pci_file pci_open(struct pci_acce
> size_t len;
> char *new_name;
>
> - result = gzopen(a->id_file_name, "r");
> + result = gzopen(a->id_file_name, "rb");
> if (result)
> return result;
> len = strlen(a->id_file_name);
> @@ -36,7 +36,7 @@ static pci_file pci_open(struct pci_acce
> memcpy(new_name, a->id_file_name, len - 3);
> new_name[len - 3] = 0;
> pci_set_name_list_path(a, new_name, 1);
> - return gzopen(a->id_file_name, "r");
> + return gzopen(a->id_file_name, "rb");
> }
>
> #define pci_close(f) gzclose(f)
> diff --git a/lspci.c b/lspci.c
> index 192ef57..db5a8bd 100644
> --- a/lspci.c
> +++ b/lspci.c
> @@ -941,7 +941,18 @@ show_ht(struct device *d, int where, int
> printf("HyperTransport: Address Mapping\n");
> break;
> case PCI_HT_CMD_TYP_MSIM:
> - printf("HyperTransport: MSI Mapping\n");
> + printf("HyperTransport: MSI Mapping Enable%c Fixed%c\n",
> + FLAG(cmd, PCI_HT_MSIM_CMD_EN),
> + FLAG(cmd, PCI_HT_MSIM_CMD_FIXD));
> + if (verbose >= 2 && !(cmd & PCI_HT_MSIM_CMD_FIXD))
> + {
> + u32 offl, offh;
> + if (!config_fetch(d, where + PCI_HT_MSIM_ADDR_LO, 8))
> + break;
> + offl = get_conf_long(d, where + PCI_HT_MSIM_ADDR_LO);
> + offh = get_conf_long(d, where + PCI_HT_MSIM_ADDR_HI);
> + printf("\t\tMapping Address Base: %016llx\n", ((unsigned long
> long)offh << 32) | (offl & ~0xfffff));
> + }
> break;
> case PCI_HT_CMD_TYP_DR:
> printf("HyperTransport: DirectRoute\n");
> diff --git a/tests/cap-MSI-mapping b/tests/cap-MSI-mapping
> new file mode 100644
> index 0000000..30bd01d
> --- /dev/null
> +++ b/tests/cap-MSI-mapping
> @@ -0,0 +1,17 @@
> +0a:01.0 PCI bridge: Broadcom HT2100 PCI-Express Bridge (rev a2) (prog-if 01
> [Subtractive decode])
> +00: 66 11 40 01 47 00 10 00 a2 01 04 06 40 00 01 00
> +10: 00 00 00 00 00 00 00 00 0a 0b 0b 00 51 51 00 20
> +20: 60 ff 60 ff f1 ff 01 00 ff ff ff ff 00 00 00 00
> +30: 00 00 00 00 a0 00 00 00 00 00 00 00 00 01 01 00
> +40: 00 00 00 00 01 00 01 00 01 00 00 00 00 00 01 00
> +50: 08 00 a1 00 20 00 11 11 40 00 11 77 40 05 75 00
> +60: 02 00 75 00 00 00 00 00 00 00 00 00 0c 05 03 03
> +70: 00 00 00 00 00 00 00 00 0d 50 00 00 00 00 00 00
> +80: 05 78 82 00 00 00 00 00 00 00 00 00 00 00 00 00
> +90: 00 00 00 00 00 00 00 00 01 80 03 c8 08 00 00 00
> +a0: 08 b0 01 a8 00 00 e0 fe 0f 00 00 00 00 00 00 00
> +b0: 10 98 41 00 02 80 00 00 10 08 00 00 01 6d 1a 01
> +c0: 08 00 81 20 00 00 08 00 c0 03 48 01 00 00 00 00
> +d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> +e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> +f0: 01 00 08 01 00 00 00 00 00 00 00 00 00 00 00 03





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise