[ewg] ofed 1.5.1 and rhel4u7: ipath_driver.c:150: error: unknown field `groups' specified in initializer

Brian J. Murrell Brian.Murrell at oracle.com
Tue Jun 8 13:41:02 PDT 2010


Hi All,

In trying to build OFED 1.5.1 with RHEL4U7's linux-2.6.9-78.0.24 kernel,
I am getting the following errors:

  gcc -Wp,-MD,/cache/build/BUILD/ofa_kernel-1.5.1/drivers/infiniband/hw/ipath/.ipath_driver.o.d -nostdinc -iwithprefix include -D__KERNEL__ -D__OFED_BUILD__  -include include/linux/autoconf.h  -include /cache/build/BUILD/ofa_kernel-1.5.1/include/linux/autoconf.h  -I/cache/build/BUILD/ofa_kernel-1.5.1/kernel_addons/backport/2.6.9_U7/include/     -I/cache/build/BUILD/ofa_kernel-1.5.1/include  -I/cache/build/BUILD/ofa_kernel-1.5.1/drivers/infiniband/debug  -I/usr/local/include/scst  -I/cache/build/BUILD/ofa_kernel-1.5.1/drivers/infiniband/ulp/srpt  -I/cache/build/BUILD/ofa_kernel-1.5.1/drivers/net/cxgb3  -Iinclude    -I/cache/build/BUILD/lustre-kernel-2.6.9/lustre-1.8.3.53/linux-2.6.9-78.0.24/arch//include   -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -g -Wdeclaration-after-statement  -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks	 -Wno-sign-compare -funit-at-a-time -DIPATH_IDSTR=QLogic kernel.org driver -DIPATH_KERN_TYPE=0  -DMODULE -DKBUILD_BASENAME=ipath_driver -DKBUILD_MODNAME=ib_ipath -c -o /cache/build/BUILD/ofa_kernel-1.5.1/drivers/infiniband/hw/ipath/.tmp_ipath_driver.o /cache/build/BUILD/ofa_kernel-1.5.1/drivers/infiniband/hw/ipath/ipath_driver.c
/cache/build/BUILD/ofa_kernel-1.5.1/drivers/infiniband/hw/ipath/ipath_driver.c:150: error: unknown field `groups' specified in initializer
/cache/build/BUILD/ofa_kernel-1.5.1/drivers/infiniband/hw/ipath/ipath_driver.c:150: warning: initialization from incompatible pointer type
/cache/build/BUILD/ofa_kernel-1.5.1/drivers/infiniband/hw/ipath/ipath_driver.c: In function `ipath_verify_pioperf':
/cache/build/BUILD/ofa_kernel-1.5.1/drivers/infiniband/hw/ipath/ipath_driver.c:366: warning: implicit declaration of function `__iowrite32_copy'
/cache/build/BUILD/ofa_kernel-1.5.1/drivers/infiniband/hw/ipath/ipath_driver.c: In function `ipath_init_one':
/cache/build/BUILD/ofa_kernel-1.5.1/drivers/infiniband/hw/ipath/ipath_driver.c:620: warning: passing arg 1 of `iounmap' discards qualifiers from pointer target type
/cache/build/BUILD/ofa_kernel-1.5.1/drivers/infiniband/hw/ipath/ipath_driver.c: In function `ipath_remove_one':
/cache/build/BUILD/ofa_kernel-1.5.1/drivers/infiniband/hw/ipath/ipath_driver.c:789: warning: passing arg 1 of `iounmap' discards qualifiers from pointer target type
/cache/build/BUILD/ofa_kernel-1.5.1/drivers/infiniband/hw/ipath/ipath_driver.c: In function `ipath_reset_device':
/cache/build/BUILD/ofa_kernel-1.5.1/drivers/infiniband/hw/ipath/ipath_driver.c:2598: warning: implicit declaration of function `pid_nr'
/cache/build/BUILD/ofa_kernel-1.5.1/drivers/infiniband/hw/ipath/ipath_driver.c: In function `ipath_signal_procs':
/cache/build/BUILD/ofa_kernel-1.5.1/drivers/infiniband/hw/ipath/ipath_driver.c:2656: warning: implicit declaration of function `kill_pid'
make[4]: *** [/cache/build/BUILD/ofa_kernel-1.5.1/drivers/infiniband/hw/ipath/ipath_driver.o] Error 1
make[3]: *** [/cache/build/BUILD/ofa_kernel-1.5.1/drivers/infiniband/hw/ipath] Error 2
make[2]: *** [/cache/build/BUILD/ofa_kernel-1.5.1/drivers/infiniband] Error 2
make[1]: *** [_module_/cache/build/BUILD/ofa_kernel-1.5.1] Error 2
make[1]: Leaving directory `/cache/build/BUILD/lustre-kernel-2.6.9/lustre-1.8.3.53/linux-2.6.9-78.0.24'
make: *** [kernel] Error 2

I know these sorts of things usually wind up being operator error but
I've checked the release notes and they specify as supported:

- RedHat EL4 up7        2.6.9-78.ELsmp

Does that really preclude the 2.6.9-78.0.24 variant of that kernel?

I  have checked into the nature of the problem and found that the struct
being initialized is:

static struct pci_driver ipath_driver = {
        .name = IPATH_DRV_NAME,
        .probe = ipath_init_one,
        .remove = __devexit_p(ipath_remove_one),
        .id_table = ipath_pci_tbl,
        .driver = {
                .groups = ipath_driver_attr_groups,
        },
};

struct pci_driver has the following definition:

struct pci_driver {
        struct list_head node;
        char *name;
        const struct pci_device_id *id_table;   /* must be non-NULL for probe to be called */
        int  (*probe)  (struct pci_dev *dev, const struct pci_device_id *id);   /* New device inserted */
        void (*remove) (struct pci_dev *dev);   /* Device removed (NULL if not a hot-plug capable driver) */
        int  (*suspend) (struct pci_dev *dev, u32 state);       /* Device suspended */
        int  (*resume) (struct pci_dev *dev);                   /* Device woken up */   
        int  (*enable_wake) (struct pci_dev *dev, u32 state, int enable);   /* Enable wake event */

        struct device_driver    driver;
        struct pci_dynids dynids;
};

and struct device_driver the following definition:

struct device_driver {
        char                    * name;
        struct bus_type         * bus;

        struct semaphore        unload_sem;
        struct kobject          kobj;
        struct list_head        devices;

        int     (*probe)        (struct device * dev);
        int     (*remove)       (struct device * dev);
        void    (*shutdown)     (struct device * dev);
        int     (*suspend)      (struct device * dev, u32 state, u32 level);
        int     (*resume)       (struct device * dev, u32 level);
};

So, indeed, no groups member in struct device_driver.

I also checked
ofa_kernel-1.5.1/kernel_addons/backport/2.6.9_U7/include/linux/device.h
to make sure there was not a backport override that I was not missing
and there is not.

Looking at linux-2.6.9-78, the story is the same though.  No .groups
member of struct device_driver.

So what am I missing here?

Cheers,
b.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.openfabrics.org/pipermail/ewg/attachments/20100608/c92a5ed0/attachment.sig>


More information about the ewg mailing list