On 2013-11-26 15:25, Steven Kauffmann wrote:
> Hi all,
>
> We are running an old version of xenomai 2.4 with a patched 2.6.26.8
> kernel ( 2.6.26.8-ipipe-2.0-18). In this pc we have a intel pro 1000
> card that we are using with rtnet (version 0.9.12). We would like to
> upgrade rtnet to 0.9.13 because we need the rt_e1000e module. When
> building the modules we get this error:
>
> CC [M] /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/80003es2lan.o
> /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/80003es2lan.c: In
> function 'e1000_cfg_on_link_up_80003es2lan':
> /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/80003es2lan.c:1191:
> error: 'SPEED_1000' undeclared (first use in this function)
> /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/80003es2lan.c:1191:
> error: (Each undeclared identifier is reported only once
> /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/80003es2lan.c:1191:
> error: for each function it appears in.)
>
> Adding the following lines in drivers/e1000e/e1000.h
> #define SPEED_10 10
> #define SPEED_100 100
> #define SPEED_1000 1000
>
> Rerun make and now get the following error:
>
> CC [M] /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/ich8lan.o
> /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/ich8lan.c: In function
> 'e1000_acquire_swflag_ich8lan':
> /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/ich8lan.c:869: error:
> implicit declaration of function 'WARN'
>
> Changing WARN into e_dbg but now getting another error:
>
> CC [M] /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/ich8lan.o
> /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/ich8lan.c: In function
> 'e1000_acquire_swflag_ich8lan':
> /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/ich8lan.c:869: error:
> expected ')' before numeric constant
>
> Formatting this line so it works with e_dbg and rerun make again:
>
> CC [M] /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/netdev.o
> /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/netdev.c:56:30: error:
> linux/pm_runtime.h: No such file or directory
> /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/netdev.c: In function
> 'e1000_open':
> /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/netdev.c:2726: error:
> implicit declaration of function 'pm_runtime_get_sync'
> /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/netdev.c:2791: error:
> implicit declaration of function 'pm_runtime_put'
> /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/netdev.c:2809: error:
> implicit declaration of function 'pm_runtime_put_sync'
> /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/netdev.c: In function
> 'e1000_power_off':
> /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/netdev.c:3678: error:
> implicit declaration of function 'pci_prepare_to_sleep'
> /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/netdev.c:3682: error:
> implicit declaration of function 'pci_wake_from_d3'
> /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/netdev.c: In function
> 'e1000_io_slot_reset':
> /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/netdev.c:3814: error:
> 'struct pci_dev' has no member named 'state_saved'
> /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/netdev.c: In function
> 'e1000_map_rtskb':
> /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/netdev.c:3915: warning:
> passing argument 1 of 'dma_mapping_error' makes integer from pointer
> without a cast
> /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/netdev.c:3915: error:
> too many arguments to function 'dma_mapping_error'
> /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/netdev.c: In function
> 'e1000_probe':
> /home/mobile/skau/rtnet-0.9.13/drivers/e1000e/netdev.c:3998: error:
> implicit declaration of function
> 'pci_request_selected_regions_exclusive'
> make[4]: *** [/home/mobile/skau/rtnet-0.9.13/drivers/e1000e/netdev.o] Error 1
>
>
> The linux/pm_runtime.h file is not available in my kernel source tree.
> According the linux cross reference this header is included in the
> kernel source starting from version 2.6.32. Does that mean that I have
> to build a new patched kernel? Or is there another way to solve this
> error?
You can wrap the differences in the driver so that it builds against
older versions as well. Other drivers like the e1000 may provide
inspirations for this. But in general it is better to upgrade to a
recent kernel, also to take advantage of bug fixes added since then.
Jan
|