https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=298838

            Bug ID: 298838
           Summary: umb(4): expose MBIM software radio state/control to
                    userland
           Product: Base System
           Version: 15.1-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: [email protected]
          Reporter: [email protected]

umb(4) already implements MBIM software-radio control and records hardware and
software radio state, but userland cannot access either. At present, the only
tested way to ensure that the modem is no longer active is to power off the USB
device. If exposing these functions to userland is desirable, the remaining
question is which FreeBSD interface should provide them.

---


Environment
-----------

FreeBSD 15.1-RELEASE-p2 amd64

Modem:

    Dell DW5811e Snapdragon X7 LTE
    Sierra Wireless EM7455B

Driver:

    umb(4)

Control utility:

    umbctl(8)


Existing kernel support
-----------------------

umb(4) implements radio control through MBIM_CID_RADIO_STATE.

The driver provides:

    umb_radio()

which sends:

    MBIM_RADIO_STATE_ON
    MBIM_RADIO_STATE_OFF

The driver also records:

    hw_radio_on
    sw_radio_on

Neither radio control nor these state values is available through umbctl(8).


Current umbctl(8) interface
---------------------------

umbctl(8) provides configuration for:

    APN
    username
    password
    PIN / PUK
    roaming

It does not provide:

    software radio on/off
    hardware radio state
    software radio state


Observed shutdown behavior
--------------------------

Starting with umb0 connected:

    ifconfig umb0 down

disconnects the data session while the modem remains attached.

A subsequent:

    ifconfig umb0 down

attempts packet-service detach. The modem returns:

    MBIM_CID_PACKET_SERVICE failed: FAILURE

The relevant umb(4) shutdown sequence is:

    disconnect
    packet-service detach
    radio off

Because packet-service detach fails, the driver does not reach the radio-off
step on this modem.

The resulting state is:

    data session disconnected
    packet service attached
    software radio on


Current workaround
------------------

The only tested method that ensures the modem is no longer active is powering
off the USB device.

This removes the modem from the system.

After a USB power cycle, the modem has also enumerated at High Speed instead of
SuperSpeed. A reboot was required to restore SuperSpeed operation.

USB power control is therefore not suitable as the normal radio-control
mechanism.


Addressed capability
--------------------

Should userland have access to the radio control already implemented in umb(4)?

The operations needed here are:

    radio off
    radio on
    report hardware radio state
    report software radio state

One possible umbctl(8) interface would be:

    umbctl umb0 radio off
    umbctl umb0 radio on

The command syntax is not the issue.

The question is which FreeBSD interface should provide this functionality if
radio control and radio-state reporting are intended to be available to
userland.


Questions
---------

1. Is the absence of userland MBIM radio control intentional?

2. If not, which FreeBSD interface should provide access to the existing umb(4)
radio-control operation?

3. Should the hardware and software radio states also be available to userland?

4. Should this functionality belong in umbctl(8), ifconfig(8), or another
interface?

I can test patches on this modem.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to