i’m trying to build driver to use EM7511 and MC7430
here’s some error
[kevin@localhost GobiSerial] make
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions Module.* modules.order .cache.mk
make -C /lib/modules/3.10.0-957.21.2.el7.x86_64/build M=/home/kevin/Downloads/orinigin/GobiSerial modules
make[1]: Entering directory `/usr/src/kernels/3.10.0-957.21.2.el7.x86_64'
CC [M] /home/kevin/Downloads/orinigin/GobiSerial/GobiSerial.o
/home/kevin/Downloads/orinigin/GobiSerial/GobiSerial.c:232:2: warning: #warning "Assuming disc_mutex is locked external to the module" [-Wcpp]
#warning "Assuming disc_mutex is locked external to the module"
^
/home/kevin/Downloads/orinigin/GobiSerial/GobiSerial.c: In function ‘Gobi_portremove’:
/home/kevin/Downloads/orinigin/GobiSerial/GobiSerial.c:561:26: error: ‘struct usb_serial_port’ has no member named ‘number’
port_number = (u8)port->number;
^
make[2]: *** [/home/kevin/Downloads/orinigin/GobiSerial/GobiSerial.o] Error 1
make[1]: *** [_module_/home/kevin/Downloads/orinigin/GobiSerial] Error 2
make[1]: Leaving directory `/usr/src/kernels/3.10.0-957.21.2.el7.x86_64'
make: *** [all] Error 2
[kevin@localhost GobiSerial]
[kevin@localhost GobiNet] make
make -C /lib/modules/3.10.0-957.21.2.el7.x86_64/build M=/home/kevin/Downloads/orinigin/GobiNet modules
make[1]: Entering directory `/usr/src/kernels/3.10.0-957.21.2.el7.x86_64'
CC [M] /home/kevin/Downloads/orinigin/GobiNet/GobiUSBNet.o
In file included from include/net/sock.h:62:0,
from include/net/inet_sock.h:27,
from include/net/ip.h:30,
from /home/kevin/Downloads/orinigin/GobiNet/GobiUSBNet.c:94:
include/linux/memcontrol.h: In function ‘task_in_memcg_oom’:
include/linux/memcontrol.h:141:2: warning: return makes integer from pointer without a cast [enabled by default]
return p->memcg_oom.memcg;
^
/home/kevin/Downloads/orinigin/GobiNet/GobiUSBNet.c: In function ‘GobiUSBNetProbe’:
/home/kevin/Downloads/orinigin/GobiNet/GobiUSBNet.c:2963:14: error: ‘struct net_device_ops’ has no member named ‘ndo_change_mtu’
pNetDevOps->ndo_change_mtu = GobiUSBNetChangeMTU;
^
make[2]: *** [/home/kevin/Downloads/orinigin/GobiNet/GobiUSBNet.o] Error 1
make[1]: *** [_module_/home/kevin/Downloads/orinigin/GobiNet] Error 2
make[1]: Leaving directory `/usr/src/kernels/3.10.0-957.21.2.el7.x86_64'
make: *** [all] Error 2
[kevin@localhost GobiNet]
I don’t see problem to compile the driver SierraLinuxQMIdriversS2.37N2.57 on Ubuntu 14.04:
owner@CNHKG-EX-001367:~/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiSerial$ sudo make
rm -rf *.o ~ core .depend ..cmd *.ko .mod.c .tmp_versions Module. modules.order .cache.mk
make -C /lib/modules/3.13.0-158-generic/build M=/home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiSerial modules
make[1]: Entering directory /usr/src/linux-headers-3.13.0-158-generic' CC [M] /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiSerial/GobiSerial.o /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiSerial/GobiSerial.c:232:2: warning: #warning "Assuming disc_mutex is locked external to the module" [-Wcpp] #warning "Assuming disc_mutex is locked external to the module" ^ Building modules, stage 2. MODPOST 1 modules CC /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiSerial/GobiSerial.mod.o LD [M] /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiSerial/GobiSerial.ko make[1]: Leaving directory/usr/src/linux-headers-3.13.0-158-generic’
owner@CNHKG-EX-001367:~/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiSerial$ cd …
owner@CNHKG-EX-001367:~/QMI/SierraLinuxQMIdriversS2.37N2.57$ cd GobiNet/
owner@CNHKG-EX-001367:~/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiNet$ sudo make
make -C /lib/modules/3.13.0-158-generic/build M=/home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiNet modules
make[1]: Entering directory /usr/src/linux-headers-3.13.0-158-generic' CC [M] /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiNet/GobiUSBNet.o In file included from include/net/sock.h:57:0, from include/net/inet_sock.h:27, from include/net/ip.h:30, from /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiNet/GobiUSBNet.c:94: include/linux/memcontrol.h: In function ‘task_in_memcg_oom’: include/linux/memcontrol.h:154:2: warning: return makes integer from pointer without a cast [enabled by default] return p->memcg_oom.memcg; ^ /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiNet/GobiUSBNet.c: At top level: /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiNet/GobiUSBNet.c:109:2: warning: #warning "Remove memcontrol.h task_in_memcg_oom warning : replace 'return p->memcg_oom.memcg;' to 'return p->memcg_oom.memcg==NULL ? 0 : 1;' in function task_in_memcg_oom" [-Wcpp] #warning "Remove memcontrol.h task_in_memcg_oom warning : replace 'return p->memcg_oom.memcg;' to 'return p->memcg_oom.memcg==NULL ? 0 : 1;' in function task_in_memcg_oom" ^ /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiNet/GobiUSBNet.c:110:2: warning: #warning "Commnet '#define MEMCG_NOT_FIX' above after fix applied." [-Wcpp] #warning "Commnet '#define MEMCG_NOT_FIX' above after fix applied." ^ CC [M] /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiNet/QMIDevice.o CC [M] /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiNet/QMI.o LD [M] /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiNet/GobiNet.o Building modules, stage 2. MODPOST 1 modules CC /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiNet/GobiNet.mod.o LD [M] /home/owner/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiNet/GobiNet.ko make[1]: Leaving directory/usr/src/linux-headers-3.13.0-158-generic’
owner@CNHKG-EX-001367:~/QMI/SierraLinuxQMIdriversS2.37N2.57/GobiNet$
I can compile S2.28N2.42 on CentOS7.6, however, after make install, blacklist qc_serial qmi_wwan, there is no /dev/qcqmi0 or /dev/qcqmi1. ip link does not show the EM7455 as an interface. I can get /dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyUSB2 but am unable to bring up a network. ModemManager and NetworkManager are disabled.
Did kernel log show any hints on gobinet driver?
I tried to connect WP7605 to centOS, I can see the /dev/qcqmi0 port.
[ 1455.679980] usb 1-1: New USB device found, idVendor=1199, idProduct=68c0
[ 1455.679994] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1455.680005] usb 1-1: Product: Sierra Wireless WP7605
[ 1455.680015] usb 1-1: Manufacturer: Sierra Wireless, Incorporated
[ 1455.680026] usb 1-1: SerialNumber: 2A91728507040403
[ 1455.808953] GobiNet 1-1:1.8 eth0: register ‘GobiNet’ at usb-0000:02:03.0-1, GobiNet Ethernet Device, 16:b1:07:81:d8:be
[ 1455.878796] USB Speed : USB 2.0
[ 1455.930539] cdc_ether 1-1:1.19 usb0: register ‘cdc_ether’ at usb-0000:02:03.0-1, CDC Ethernet Device, aa:d6:aa:04:90:e9
[ 1456.898322] IPv6: ADDRCONF(NETDEV_UP): ens35u1i19: link is not ready
[ 1457.010424] IPv6: ADDRCONF(NETDEV_UP): ens35u1i8: link is not ready
[ 1457.010604] IPv6: ADDRCONF(NETDEV_UP): ens35u1i8: link is not ready
[ 1457.942796] e1000: ens33 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
[ 1460.692484] TE Flow Control disabled
[ 1461.504227] creating qcqmi0
[ 1461.508159] RawIP mode
[owner@localhost GobiNet] ls /dev/qcqmi0
/dev/qcqmi0
[owner@localhost GobiNet] modinfo GobiNet
filename: /lib/modules/3.10.0-957.el7.x86_64/kernel/drivers/net/usb/GobiNet.ko
license: Dual BSD/GPL
description: GobiNet
author: Qualcomm Innovation Center
version: 2017-04-05/SWI_2.42
retpoline: Y
rhelversion: 7.6
srcversion: 61832D2CF4F8DCAE933EE06
alias: usb:v1199p9110ddcdscdpiciscipin
alias: usb:v1199p9102ddcdscdpiciscipin
alias: usb:v1199p9100ddcdscdpiciscipin
alias: usb:v1199p9070ddcdscdpiciscipin
alias: usb:v1199p9061ddcdscdpiciscipin
alias: usb:v1199p9056ddcdscdpiciscipin
alias: usb:v1199p9055ddcdscdpiciscipin
alias: usb:v1199p9054ddcdscdpiciscipin
alias: usb:v1199p9053ddcdscdpiciscipin
alias: usb:v1199p9051ddcdscdpiciscipin
alias: usb:v1199p9041ddcdscdpiciscipin
alias: usb:v1199p68C0ddcdscdpiciscipin
alias: usb:v1199p9071ddcdscdpiciscipin
alias: usb:v03F0p371Dddcdscdpiciscipin
alias: usb:v1199p9019ddcdscdpiciscipin
alias: usb:v1199p9015ddcdscdpiciscipin
alias: usb:v1199p9013ddcdscdpiciscipin
alias: usb:v1199p9011ddcdscdpiciscipin
alias: usb:v05C6p920Dddcdscdpiciscipin
alias: usb:v1199p68A2ddcdscdpiciscipin
depends: usbnet
vermagic: 3.10.0-957.el7.x86_64 SMP mod_unload modversions
parm: debug:Debuging enabled or not (int)
parm: qos_debug:QoS Debuging enabled or not (int)
parm: interruptible:Listen for and return on user interrupt (int)
parm: txQueueLength:Number of IP packets which may be queued up for transmit (int)
parm: iTEEnable:TE Flow Control enabled or not (int)
parm: iRAWIPEnable:RAWIP enabled or not (int)
In general, I’d say it’s almost impossible to use any out-of-tree driver with CentOS or RHEL kernels. They backport both features and arbitrary bug fixes to their kernels without changing the version numbers accordingly.
The WARN (which is not a panic) you are hitting is wrapped in a complex set of kernel version checks, trying to make the driver compatible with kernels both before and after a specific usb-serial change:
I didn’t bother checking, but I am pretty sure you’ll find that CentOS changed this driver API without updating the LINUX_VERSION_CODE accordingly. They do stuff like that all the time.