Closed 0ln closed 1 year ago
Internal kernel APIs changed but for some reason it still does not create /dev/xmm0
diff --git a/xmm7360.c b/xmm7360.c
index b23d660..f571d9c 100644
--- a/xmm7360.c
+++ b/xmm7360.c
@@ -1452,12 +1452,11 @@ static int xmm7360_probe(struct pci_dev *dev, const struct pci_device_id *id)
}
pci_set_master(dev);
- ret = pci_set_dma_mask(dev, 0xffffffffffffffff);
+ ret = dma_set_mask_and_coherent(xmm->dev, DMA_BIT_MASK(64));
if (ret) {
dev_err(xmm->dev, "Cannot set DMA mask\n");
goto fail;
}
- dma_set_coherent_mask(xmm->dev, 0xffffffffffffffff);
ret = pci_request_region(dev, 0, "xmm0");
if (ret) {
@JoelLinn Thanks for the patch, this helped to get the driver working on 5.18.
Initially, I had the same issue with /dev/xmm0 not being created. When poking around a bit, I noticed that lspci -k would list two modules capable of handling the modem, xmm7360 and iosm, listing iosm as the driver actually in use.
It looks like support for 7360 is included in iosm since 5.18: https://github.com/torvalds/linux/commit/1f52d7b622854b8bd7a1be3de095ca2e1f77098e I briefly attempted to get ModemManager to detect the modem with the iosm driver loaded, but ran into similar issues as described in this thread: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/385 Seems that a firmware release is anticipated for the L860, perhaps it's also needed for the L850 before it will work with ModemManager.. (?)
Eventually, I got things working again by blacklisting the iosm module and rebooting the system, this allowed the xmm7360 driver to work normally again, thanks to the patch provided by @JoelLinn.
Thanks I will open a PR then. Good catch about iosm
@regenman
Seems that a firmware release is anticipated for the L860, perhaps it's also needed for the L850 before it will work with ModemManager.. (?)
It surely isn't a firmware issue. /dev/wwan0at0
and /dev/wwan0at1
are there and work as expected (see below). The wwan0
network interface is also there. Problem is that ModemManager does not seem to know it is supposed to manage /dev/wwan0at*
: mmcli -L
returns No modems were found
. So it's a ModemManager issue.
$ sudo picocom --baud 115200 --echo /dev/wwan0at0
picocom v3.1
port is : /dev/wwan0at0
flowcontrol : none
baudrate is : 115200
parity is : none
databits are : 8
stopbits are : 1
escape is : C-a
local echo is : yes
noinit is : no
noreset is : no
hangup is : no
nolock is : no
send_cmd is : sz -vv
receive_cmd is : rz -vv -E
imap is :
omap is :
emap is : crcrlf,delbs,
logfile is : none
initstring : none
exit_after is : not set
exit is : no
Type [C-a] [C-h] to see available commands
Terminal ready
ATI3
"Fibocom LTE Module"
OK
ATI5
"XMM7360"
OK
ATI7
"L850 LTE Module"
OK
ATI8
"18500.5001.00.01.20.75"
OK
According to #181 , I blocked iosm. And only xmm7360_usb is in use now.
# lspci -k
02:00.0 Wireless controller [0d40]: Intel Corporation XMM7360 LTE Advanced Modem (rev 01)
Subsystem: Device 1cf8:8505
Kernel driver in use: xmm7360_usb
Kernel modules: iosm, xmm7360_usb
However, following the installation instruction step by step, I also got the error message "FileNotFoundError: [Errno 2] No such file or directory: '/dev/xmm0/rpc'".
archcarbon% lte up
This script must be run as root, elevating!
lte.sh: manage xmm7360-pci
APN: ctlte
Script: /home/xxxx/Downloads/xmm7360-pci-master/scripts/lte.sh; Link: /usr/local/bin
bringing wwan0 up!
Traceback (most recent call last):
File "/home/xxxx/Downloads/xmm7360-pci-master/scripts/../rpc/open_xdatachannel.py", line 42, in <module>
r = rpc.XMMRPC()
File "/home/xxxx/Downloads/xmm7360-pci-master/rpc/rpc.py", line 19, in __init__
self.fp = os.open(path, os.O_RDWR | os.O_SYNC)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/xmm0/rpc'
Cannot find device "wwan0"
Below is machine and OS info. PC brand: Thinkpad X1 carbon gen8 with 4G modem XMM7360. OS: arch linux (Linux 5.19.7-arch1-1)
Did I miss anything? What should I check? Thanks.
Strange, it builds and works fine for me, also on 5.19.7-arch1-1, on a T14s Gen1 with the same modem:
05:00.0 Wireless controller [0d40]: Intel Corporation XMM7360 LTE Advanced Modem (rev 01)
Subsystem: Intel Corporation Device 0020
Kernel modules: iosm, xmm7360
This is what I see during compilation:
make -C /lib/modules/5.19.7-arch1-1/build M=/PATH/xmm7360-pci clean
make[1]: Verzeichnis „/usr/lib/modules/5.19.7-arch1-1/build“ wird betreten
CLEAN /PATH/xmm7360-pci/Module.symvers
make[1]: Verzeichnis „/usr/lib/modules/5.19.7-arch1-1/build“ wird verlassen
make -C /lib/modules/5.19.7-arch1-1/build M=/PATH/xmm7360-pci modules
make[1]: Verzeichnis „/usr/lib/modules/5.19.7-arch1-1/build“ wird betreten
CC [M] /PATH/xmm7360-pci/xmm7360.o
/PATH/xmm7360-pci/xmm7360.c: In Funktion »xmm7360_irq0«:
/PATH/xmm7360-pci/xmm7360.c:1175:13: Warnung: der Vergleich wird immer als »true« ausgewertet, da die Adresse von »td_ring« niemals NULL sein wird [-Waddress]
1175 | if (xmm->td_ring) {
| ^~~
/PATH/xmm7360-pci/xmm7360.c:209:24: Anmerkung: »td_ring« ist hier deklariert
209 | struct td_ring td_ring[16];
| ^~~~~~~
MODPOST /PATH/xmm7360-pci/Module.symvers
CC [M] /PATH/xmm7360-pci/xmm7360.mod.o
LD [M] /PATH/xmm7360-pci/xmm7360.ko
BTF [M] /PATH/xmm7360-pci/xmm7360.ko
make[1]: Verzeichnis „/usr/lib/modules/5.19.7-arch1-1/build“ wird verlassen
make -C /lib/modules/5.19.7-arch1-1/build M=/PATH/xmm7360-pci modules_install
make[1]: Verzeichnis „/usr/lib/modules/5.19.7-arch1-1/build“ wird betreten
INSTALL /lib/modules/5.19.7-arch1-1/extra/xmm7360.ko
SIGN /lib/modules/5.19.7-arch1-1/extra/xmm7360.ko
At main.c:167:
- SSL error:02001002:system library:fopen:No such file or directory: crypto/bio/bss_file.c:69
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: crypto/bio/bss_file.c:76
sign-file: ./certs/signing_key.pem: No such file or directory
ZSTD /lib/modules/5.19.7-arch1-1/extra/xmm7360.ko.zst
DEPMOD /lib/modules/5.19.7-arch1-1
make[1]: Verzeichnis „/usr/lib/modules/5.19.7-arch1-1/build“ wird verlassen
Strange, it builds and works fine for me, also on 5.19.7-arch1-1, on a T14s Gen1 with the same modem:
05:00.0 Wireless controller [0d40]: Intel Corporation XMM7360 LTE Advanced Modem (rev 01) Subsystem: Intel Corporation Device 0020 Kernel modules: iosm, xmm7360
This is what I see during compilation:
make -C /lib/modules/5.19.7-arch1-1/build M=/PATH/xmm7360-pci clean make[1]: Verzeichnis „/usr/lib/modules/5.19.7-arch1-1/build“ wird betreten CLEAN /PATH/xmm7360-pci/Module.symvers make[1]: Verzeichnis „/usr/lib/modules/5.19.7-arch1-1/build“ wird verlassen make -C /lib/modules/5.19.7-arch1-1/build M=/PATH/xmm7360-pci modules make[1]: Verzeichnis „/usr/lib/modules/5.19.7-arch1-1/build“ wird betreten CC [M] /PATH/xmm7360-pci/xmm7360.o /PATH/xmm7360-pci/xmm7360.c: In Funktion »xmm7360_irq0«: /PATH/xmm7360-pci/xmm7360.c:1175:13: Warnung: der Vergleich wird immer als »true« ausgewertet, da die Adresse von »td_ring« niemals NULL sein wird [-Waddress] 1175 | if (xmm->td_ring) { | ^~~ /PATH/xmm7360-pci/xmm7360.c:209:24: Anmerkung: »td_ring« ist hier deklariert 209 | struct td_ring td_ring[16]; | ^~~~~~~ MODPOST /PATH/xmm7360-pci/Module.symvers CC [M] /PATH/xmm7360-pci/xmm7360.mod.o LD [M] /PATH/xmm7360-pci/xmm7360.ko BTF [M] /PATH/xmm7360-pci/xmm7360.ko make[1]: Verzeichnis „/usr/lib/modules/5.19.7-arch1-1/build“ wird verlassen make -C /lib/modules/5.19.7-arch1-1/build M=/PATH/xmm7360-pci modules_install make[1]: Verzeichnis „/usr/lib/modules/5.19.7-arch1-1/build“ wird betreten INSTALL /lib/modules/5.19.7-arch1-1/extra/xmm7360.ko SIGN /lib/modules/5.19.7-arch1-1/extra/xmm7360.ko At main.c:167: - SSL error:02001002:system library:fopen:No such file or directory: crypto/bio/bss_file.c:69 - SSL error:2006D080:BIO routines:BIO_new_file:no such file: crypto/bio/bss_file.c:76 sign-file: ./certs/signing_key.pem: No such file or directory ZSTD /lib/modules/5.19.7-arch1-1/extra/xmm7360.ko.zst DEPMOD /lib/modules/5.19.7-arch1-1 make[1]: Verzeichnis „/usr/lib/modules/5.19.7-arch1-1/build“ wird verlassen
Here is a difference between us:
# lspci -k
02:00.0 Wireless controller [0d40]: Intel Corporation XMM7360 LTE Advanced Modem (rev 01)
Subsystem: Device 1cf8:8505
Kernel driver in use: xmm7360_usb
Kernel modules: iosm, xmm7360_usb # mine with _usb
05:00.0 Wireless controller [0d40]: Intel Corporation XMM7360 LTE Advanced Modem (rev 01)
Subsystem: Intel Corporation Device 0020
Kernel modules: iosm, xmm7360 # yours without _usb
For me doing
sudo rmmod iosm
make load
Alway works. Getting connected with the script may beed multiple tries but the driver is loading and creating the dev node fine
For me doing
sudo rmmod iosm make load
Alway works. Getting connected with the script may beed multiple tries but the driver is loading and creating the dev node fine
Not work for me right now. Where the module is installed by the command "sudo insmod xmm7360"? I suspect that the module is not properly installed on my machine.
Before trying this drive of pci version, I installed an usb version. And I found that the module generated by the usb version can not be removed completely at the moment. Oops. Anyone can help?
insmod
will not install a module. It will only be inserted at runtime and lost at reboot
Finally, xmm7360 module is successfully installed. Now I have a new problem to deal with: #192
I also have been experiencing the similar issue mentioned here, and followed the
sudo rmod iosm
command and the make load
command that seemed to allow some progression. I was then successfully able to run sudo ip link set wwan0 up
which has resulted in the following:
wwan0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
I am unsure exactly if I am to return to attempting to run a script or update a file in order to gain an internet connection from my sim; as I certainly feel as though I am missing a step.
Context: Garuda on Lenovo P53.
Thanks! No doubt the issue is the keyboard operator! ;)
I installed the latest Arch Linux kernel a few days ago and noticed the modem wasn't starting up anymore. After some troubleshooting, I figured out compilation now seems to fail. I can't assure it is linked to the kernel update, but it happened right after it so I guess it's probable.
Note: I'm on a ThinkPad X1 Carbon 7th gen.