Problem doing 'echo Y > /sys/class/net/ww*/qmi/raw_ip'

Bjørn Mork bjorn at mork.no
Thu Aug 8 11:26:08 UTC 2019


Martin Schmid <scm at aps-systems.ch> writes:

> Hello everybody
>
> Maybe someone has an idea for this:
>
> I'm using Debian installations, all with sysvinit so far. There are
> some systemd components present since debian Jessie.
> I've testet with multiple kernel and libqmi versions. The current
> setup is a Buster with kernel 4.19.37 and qmicli 1.22.0.
> The modem is a SIM7500 or SIM7600, both needing raw_ip.
>
> I can control the modem and it's looking good so far, except that
> qmi-network is unable to set raw_ip to 'Y'.
>
> The file /sys/class/net/ww*/qmi/raw_ip' exists and is readable. But
> when trying to alter its content, there's an error: 'device or
> resource busy'

AFAICS there are only two possibilities: The interface is either up and
running or it is enslaved by some other driver denying the change with
EBUSY (bridge maybe?):

	/* we don't want to modify a running netdev */
	if (netif_running(dev->net)) {
		netdev_err(dev->net, "Cannot change a running device\n");
		ret = -EBUSY;
		goto err;
	}

	/* let other drivers deny the change */
	ret = call_netdevice_notifiers(NETDEV_PRE_TYPE_CHANGE, dev->net);
	ret = notifier_to_errno(ret);
	if (ret) {
		netdev_err(dev->net, "Type change was refused\n");
		goto err;
	}


You should see one of those error messages in the kernel log, telling
you which path we hit.  

> I could't find out why the device should be busy and what process is
> keeping it unconfigurable.
>
> All ifdown, 'ip link set down' does not help. Even removing qmi_wwan
> and readding it does not work.

My guess is that something is overriding your manual attempts to set the
interface down. Please verify that it actually is stopped with
'ip link show' or 'ifconfig'.

> Looking at /proc/net/netlink doesn't tell me anything. At the moment,
> I cannot match the eth id to an interface name.

I don't understand this... What are you trying to do here?



Bjørn


More information about the libqmi-devel mailing list