Modem interface not available DEVICE_CLAIM_FAILED error
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 426
- Forks
- 212
- Avg merge
- 5h 54m
- Merged PRs (30d)
- 10
Description
Since a8b101f netifd no longer tolerates VLANs on devices not supporting them.
Thus the device containing a dot in name and NETIF_F_VLAN_CHALLENGED set in mhi_netdev_setup() produces non-functional interface with DEVICE_CLAIM_FAILED error:
ifstatus modem
{
"up": false,
"pending": false,
"available": true,
"autostart": true,
"dynamic": false,
"proto": "dhcpv6",
"device": "rmnet_mhi0.1",
"data": {
},
"errors": [
{
"subsystem": "interface",
"code": "DEVICE_CLAIM_FAILED"
}
]
}
Prior to a8b101f the same error accompanied with message "kernel: 8021q: VLANs not supported on rmnet_mhi0" allowed workarounds (e.g. see openwrt issue 23714).
Unable to find one at this point.
The current code is targeting "vlan device left behind by a previous netifd run" does not tolerate an existing kernel netdev which is not an 8021q VLAN.
/* tolerate a vlan device left behind by a previous netifd run */
if (system_vlan_add(vldev->dep.dev, vldev->id) < 0 &&
errno != EEXIST) {
ret = -1;
goto release;
}
System log: netifd is unable to ifup/ifdown the modem as evidenced by lack of netifd messages
09-16 11:16:10.181 qmodem_network[21066]: Modem 0000_03_00_0 Start Dial Now
09-16 11:16:15.792 kernel: [I][mhi_netdev_open] Opened net dev interface
09-16 11:16:15.792 kernel: 8021q: VLANs not supported on rmnet_mhi0
09-16 11:16:15.810 kernel: [I][mhi_netdev_open] Opened net dev interface
09-16 11:16:15.810 kernel: 8021q: VLANs not supported on rmnet_mhi0
09-16 11:16:15.827 kernel: [I][mhi_netdev_open] Opened net dev interface
09-16 11:16:15.827 kernel: 8021q: VLANs not supported on rmnet_mhi0
09-16 11:16:15.844 kernel: [I][mhi_netdev_open] Opened net dev interface
09-16 11:16:15.844 kernel: 8021q: VLANs not supported on rmnet_mhi0
09-16 11:16:19.003 kernel: net rmnet_mhi0: link_state 0x0 -> 0x1
09-16 11:16:19.003 kernel: [I][mhi_netdev_open] Opened net dev interface
09-16 11:16:19.008 netifd[18164]: Network device 'rmnet_mhi0' link is up
09-16 11:16:19.012 netifd[18164]: VLAN 'rmnet_mhi0.1' link is up
09-16 11:16:19.012 netifd[18164]: Interface 'modem' has link connectivity
Dial log: device named 'rmnet_mhi0.1'
[09-16 11:16:10.368] modem_dial:modem_path=/sys/bus/pci/devices/0000:03:00.0/,driver=mhi,interface=modem,at_port=/dev/mhi_DUN,using_sim_slot:1,dns_list:,bridge_enabled:0,bridge_ports:,bridge_management_ip:
[09-16 11:16:15.548] modem_dial:info sim card is ready
[09-16 11:16:15.606] modem_dial:create interface modem with proto dhcpv6 and metric 11
[09-16 11:16:15.768] modem_dial:set interface modem to rmnet_mhi0.1
[09-16 11:16:15.846] modem_dial:network reload
[09-16 11:16:17.986] modem_dial:firewall reload
[09-16 11:16:17.988] modem_dial:dialing /sys/bus/pci/devices/0000:03:00.0/ driver mhi
[09-16 11:16:18.010] modem_dial:dialing: quectel-CM-M -6 -i rmnet_mhi0 -d -M 11 -f /var/run/qmodem/0000_03_00_0_dir/dial_log
[09-16_11:16:18:013] network interface 'rmnet_mhi0' or qmidev '' is not exist
[09-16_11:16:18:013] netcard driver = pcie_mhi, driver version = V1.4
[09-16_11:16:18:013] qmap_mode = 1, qmap_version = 9, qmap_size = 15360, muxid = 0x81, qmap_netcard = rmnet_mhi0.1
[09-16_11:16:18:013] Modem works in QMI mode
[09-16 11:16:18.013] modem_dial:pid: 21671
[09-16_11:16:18:019] cdc_wdm_fd = 8
[09-16_11:16:18:034] Get clientWDS = 19
[09-16_11:16:18:039] Get clientWDS = 20
[09-16_11:16:18:043] Get clientDMS = 1
[09-16_11:16:18:047] Get clientNAS = 1
[09-16_11:16:18:051] Get clientUIM = 2
[09-16_11:16:18:055] Get clientWDA = 1
[09-16_11:16:18:059] requestBaseBandVersion RM551EGL00AAR02A02M8G
[09-16_11:16:18:059] Modem model RM551EGL00AAR02A02M8G does not require FCC authentication
[09-16_11:16:18:064] qmap_settings.rx_urb_size = 15360
[09-16_11:16:18:064] qmap_settings.ul_data_aggregation_max_datagrams = 11
[09-16_11:16:18:064] qmap_settings.ul_data_aggregation_max_size = 8192
[09-16_11:16:18:064] qmap_settings.dl_minimum_padding = 0
[09-16_11:16:18:076] Skipping FCC authentication - not required for this modem model
[09-16_11:16:18:081] requestGetSIMStatus SIMStatus: SIM_READY
[09-16_11:16:18:091] requestGetProfile[pdp:1 index:1] fast.t-mobile.com///0/IPV6
[09-16_11:16:18:095] requestRegistrationState2 MCC: 310, MNC: 260, PS: Attached, DataCap: 5G_SA
[09-16_11:16:18:100] requestQueryDataCall IPv6ConnectionStatus: DISCONNECTED
[09-16_11:16:18:100] ip link set dev rmnet_mhi0 down
[09-16_11:16:18:103] ip addr flush dev rmnet_mhi0.1
[09-16_11:16:18:106] ip link set dev rmnet_mhi0.1 down
[09-16_11:16:18:987] requestSetupDataCall WdsConnectionIPv6Handle: 0xe3df15b0
[09-16_11:16:19:001] ip link set dev rmnet_mhi0 up
[09-16_11:16:19:010] ip link set dev rmnet_mhi0.1 up
[09-16_11:16:19:013] ip -6 address flush dev rmnet_mhi0.1
[09-16_11:16:19:017] ip -6 address add 2607:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/64 dev rmnet_mhi0.1
[09-16_11:16:19:021] ip -6 route add default dev rmnet_mhi0.1 metric 11
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked mhi_netdev_setup() code and the netifd VLAN handling introduced by commit a8b101f. Reproduce the rmnet_mhi0.1 setup using the provided ifstatus and system logs; done means the modem interface can be brought up without DEVICE_CLAIM_FAILED.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100