mhvtl-0.19 error in kernel module compilation

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

mhvtl-0.19 error in kernel module compilation

rami766


make -C /lib/modules/2.6.30.10-105.2.23.fc11.x86_64/build SUBDIRS=/root/mhvtl-0.19/kernel modules
make[1]: Entering directory `/usr/src/kernels/2.6.30.10-105.2.23.fc11.x86_64'
  CC [M]  /root/mhvtl-0.19/kernel/mhvtl.o
/root/mhvtl-0.19/kernel/mhvtl.c:1430: error: unknown field ?bus_id? specified in initializer
/root/mhvtl-0.19/kernel/mhvtl.c:1430: warning: initialization from incompatible pointer type
/root/mhvtl-0.19/kernel/mhvtl.c: In function ?vtl_add_adapter?:
/root/mhvtl-0.19/kernel/mhvtl.c:1484: error: ?struct device? has no member named ?bus_id?
make[2]: *** [/root/mhvtl-0.19/kernel/mhvtl.o] Error 1
make[1]: *** [_module_/root/mhvtl-0.19/kernel] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.30.10-105.2.23.fc11.x86_64'
make: *** [default] Error 2




Reply | Threaded
Open this post in threaded view
|

Re: mhvtl-0.19 error in kernel module compilation

ap2010
If you look into the file mhtvl.c at line 1430 you'll find the following:

#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30)
        .init_name      = "pseudo_0",
#else
        .bus_id         = "pseudo_0",
#endif
        .release        = pseudo_0_release,

I am using fc12 with kernel 2.6.32 and have no problems. Since you are using kernel 2.6.30 I assume that the #else bit is chosen. While this sounds ok, it could be that the actual kernel version 2.6.30.10-105.2.23 would be fine using the first bit.

So try editing these lines and change them to:

        .init_name      = "pseudo_0",
        .release        = pseudo_0_release,

Do the same at lines 1484 and change:

#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30)
        dev_set_name(&vtl_hba->dev, "adapter%d", vtl_add_host);
#else
        sprintf(vtl_hba->dev.bus_id, "adapter%d", vtl_add_host);
#endif

to
        dev_set_name(&vtl_hba->dev, "adapter%d", vtl_add_host);

If that fixes it, then chosing the kernelversion for compilation will be less straight forward (in other words, even within the 2.6.30 kernel releases there are differences, at least with Fedora).

Cheers,

Albert
Reply | Threaded
Open this post in threaded view
|

Re: mhvtl-0.19 error in kernel module compilation

rami766
Yep .. This did it ..



 ~ # diff /root/mhvtl-0.19/kernel/mhvtl.c /root/mhvtl-0.19-kernel.2.6.30.10-105.2.23.fc11.x86_64/kernel/mhvtl.c
1430c1430
<       .bus_id         = "pseudo_0",
---
>         .init_name      = "pseudo_0",
1484c1484
<       sprintf(vtl_hba->dev.bus_id, "adapter%d", vtl_add_host);
---
>         dev_set_name(&vtl_hba->dev, "adapter%d", vtl_add_host);


Thanks

Rami