ubuntu 18.04server 安装 usb控制器驱动 (ZX200)报错
内核 4.19.6
make: Warning: File 'Makefile' has modification time 2394936413 s in the future
rm -f *.o *.ko *.order *.symve* *.mod.c *.mod.o *~
make -C /lib/modules/4.19.6l/build M=/home/ubuntu/Desktop/ZX[]()200/kernel/src modules
make[1]: Entering directory '/opt/linux-4.19.6'
make[2]: Warning: File '/home/ubuntu/Desktop/ZX200/kernel/src/Makefile' has modification time 2394936413 s in the future
CC [M] /home/ubuntu/Desktop/ZX200/kernel/src/zxgb_main.o
/home/ubuntu/Desktop/ZX200/kernel/src/zxgb_main.c: In function ‘zxgb_gso_case’:
/home/ubuntu/Desktop/ZX200/kernel/src/zxgb_main.c:880:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if(frag_remain == 0)
^~
/home/ubuntu/Desktop/ZX200/kernel/src/zxgb_main.c:883:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
for(i=1; i<=6; i++)
^~~
/home/ubuntu/Desktop/ZX200/kernel/src/zxgb_main.c: In function ‘zxgb_rx_srv’:
/home/ubuntu/Desktop/ZX200/kernel/src/zxgb_main.c:1829:9: error: ‘struct net_device’ has no member named ‘last_rx’
netdev->last_rx = jiffies;
^~
/home/ubuntu/Desktop/ZX200/kernel/src/zxgb_main.c: In function ‘zxgb_set_int_cap’:
/home/ubuntu/Desktop/ZX200/kernel/src/zxgb_main.c:2043:9: error: implicit declaration of function ‘pci_enable_msi_range’; did you mean ‘pci_enable_msix_range’? [-Werror=implicit-function-declaration]
ret = pci_enable_msi_range(pdev,adapter->num_tx_queues,adapter->num_rx_queues);
^~~~~~~~~~~~~~~~~~~~
pci_enable_msix_range
/home/ubuntu/Desktop/ZX200/kernel/src/zxgb_main.c: At top level:
/home/ubuntu/Desktop/ZX200/kernel/src/zxgb_main.c:5782:21: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.ndo_get_stats64 = zxgb_get_stats64,
^~~~~~~~~~~~~~~~
/home/ubuntu/Desktop/ZX200/kernel/src/zxgb_main.c:5782:21: note: (near initialization for ‘zxgb_netdev_ops.ndo_get_stats64’)
/home/ubuntu/Desktop/ZX200/kernel/src/zxgb_main.c: In function ‘zxgb_probe’:
/home/ubuntu/Desktop/ZX200/kernel/src/zxgb_main.c:6158:2: error: implicit declaration of function ‘setup_timer’; did you mean ‘sk_stop_timer’? [-Werror=implicit-function-declaration]
setup_timer(&adapter->watchdog_timer,zxgb_watchdog_timer,(unsigned long)adapter);
^~~~~~~~~~~
sk_stop_timer
cc1: some warnings being treated as errors
scripts/Makefile.build:305: recipe for target '/home/ubuntu/Desktop/ZX200/kernel/src/zxgb_main.o' failed
make[2]: *** [/home/ubuntu/Desktop/ZX200/kernel/src/zxgb_main.o] Error 1
Makefile:1517: recipe for target '_module_/home/ubuntu/Desktop/ZX200/kernel/src' failed
make[1]: *** [_module_/home/ubuntu/Desktop/ZX200/kernel/src] Error 2
make[1]: Leaving directory '/opt/linux-4.19.6'
Makefile:7: recipe for target 'all' failed
make: *** [all] Error 2
结果 :成功安装驱动,解决报错
帮忙解决一下,私信我可以把驱动附件发你