#7 irda-utils-0.9.17 vs. pciutils 2.2.1 and higher

Christian Hamar

Hey. I mailed two maintainer about this so this is a
paste from my email:

I tried to compile irda-utils 0.9.17 (smcinit* 0.5cvs
version) on
frugalware linux (i'm one of the developers).

And i noticed that we got latest pciutils version
(pciutils-2.2.3) which
has changed some API and some modifications were made. So
irda-utils-0.9.17 and smcinit* 0.5cvs version does not
compile against
pciutils-2.2.3 .

I played a little bit with this smcinit* error. I got
the following
patch which solves the problem for newer pciutils.

A little description why and what.

-dev = pci_get_dev(acc, BUS_LPC, LPC_DEV, LPC_FUNC);
/* 5100 also dev
+dev = pci_get_dev(acc, 0, BUS_LPC, LPC_DEV, LPC_FUNC);
/* 5100 also dev

As you see inserted a 0 after acc. In newer pciutils
the pci_get_dev
function looks like this:

*pci_get_dev(struct pci_access *acc, int domain, int
bus, int dev, int
func); /* Raw access to specified device */

>From the changelog: * lib/access.c (pci_get_dev):
Added support for

I wrote 0 to there because i cant figure out what need
to be there. I
saw that pciutils inself used 0 too. So maybe not will
be a problem.

Second part of patch replaces all 'word' and 'byte'

word -> u16
byte -> u8

The changelog part for this: * lib/types.h, lib/pci.h,
`byte' and `word' are its own u8, u16, u32, byte and
word types and uses
what the user

I saw that byte """==""" u8 and word """==""" u16 at

So used them.

Now smcinit* part compiles fine against pciutils-2.2.3

As i see the changes in pciutils from 2.1.99-test8 and
higher. Refer pls
to pciutils 2.2.3 changelog for more information.

I'm waiting comments from you :)

Ps.: Of course it is not a good way to solve things,
maybe need some checks that if pciutils newer than...
then use this patch in code if not then use the old style.

Best regards

Christian Hamar alias krix
Frugalware Development Team