EG95 + Debian 11 : Error in installation driver

Hi,

I’would like to install a EG95 on debian 11 on arm64.

All It"s okay until driver installation :
Entering directory ‘/usr/src/linux-headers-5.15.32-v8+’
CC [M] /tmp/files/drivers/./drivers/usb/serial/usb_wwan.o
CC [M] /tmp/files/drivers/./drivers/usb/serial/option.o
/tmp/files/drivers/./drivers/usb/serial/option.c:1979:23: error: initialization of ‘unsigned int (*)(struct tty_struct )’ from incompatible pointer type ‘int ()(struct tty_struct )’ [-Werror=incompatible-pointer-types]
1979 | .write_room = usb_wwan_write_room,
| ^~~~~~~~~~~~~~~~~~~
/tmp/files/drivers/./drivers/usb/serial/option.c:1979:23: note: (near initialization for ‘option_1port_device.write_room’)
/tmp/files/drivers/./drivers/usb/serial/option.c:1980:23: error: initialization of ‘unsigned int (
)(struct tty_struct )’ from incompatible pointer type ‘int ()(struct tty_struct )’ [-Werror=incompatible-pointer-types]
1980 | .chars_in_buffer = usb_wwan_chars_in_buffer,
| ^~~~~~~~~~~~~~~~~~~~~~~~
/tmp/files/drivers/./drivers/usb/serial/option.c:1980:23: note: (near initialization for ‘option_1port_device.chars_in_buffer’)
/tmp/files/drivers/./drivers/usb/serial/option.c:1987:20: error: initialization of ‘void (
)(struct usb_serial_port )’ from incompatible pointer type ‘int ()(struct usb_serial_port *)’ [-Werror=incompatible-pointer-types]
1987 | .port_remove = usb_wwan_port_remove,
| ^~~~~~~~~~~~~~~~~~~~
/tmp/files/drivers/./drivers/usb/serial/option.c:1987:20: note: (near initialization for ‘option_1port_device.port_remove’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:277: /tmp/files/drivers/./drivers/usb/serial/option.o] Error 1
make[1]: *** [Makefile:1868: /tmp/files/drivers] Error 2
make[1]: Leaving directory ‘/usr/src/linux-headers-5.15.32-v8+’
make: *** [Makefile:10: modules] Error 2

I’have tested the same methode with debian 10 and it’s work.
I’ think i have a old version of divers (2019) and debian 11 not done.

Can I’have the last version ?

Someone from Quectel can send you the source for more recent kernels.

Often the stock option driver also works:

# identify vendor & product id of your module via lsusb
modprobe option
dd of=/sys/bus/usb-serial/drivers/option1/new_id <<<"REPLACE-WITH-VENDORID REPLACE-WITH-PRODUCTID"

If your module can’t handle USB power save (like the BG95-M3 MiniPCI) and crashes after a few seconds; just disable USB power save (e.g. via udev).