mirror-linux/include/linux/usb
Laurent Vivier 55f854dd5b qmi_wwan: allow max_mtu above hard_mtu to control rx_urb_size
Commit c7159e960f ("usbnet: limit max_mtu based on device's hard_mtu")
capped net->max_mtu to the device's hard_mtu in usbnet_probe(). While
this correctly prevents oversized packets on standard USB network
devices, it breaks the qmi_wwan driver.

qmi_wwan relies on userspace (e.g. ModemManager) setting a large MTU on
the wwan0 interface to configure rx_urb_size via usbnet_change_mtu().
QMI modems negotiate USB transfer sizes of 16,383 or 32,767 bytes, and
the USB receive buffers must be sized accordingly. With max_mtu capped
to hard_mtu (~1500 bytes), userspace can no longer raise the MTU, the
receive buffers remain small, and download speeds drop from >300 Mbps
to ~0.8 Mbps.

Introduce a FLAG_NOMAXMTU driver flag that allows individual usbnet
drivers to opt out of the max_mtu cap. Set this flag in qmi_wwan's
driver_info structures to restore the previous behavior for QMI devices,
while keeping the safety fix in place for all other usbnet drivers.

Fixes: c7159e960f ("usbnet: limit max_mtu based on device's hard_mtu")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/lkml/CAPh3n803k8JcBPV5qEzUB-oKzWkAs-D5CU7z=Vd_nLRCr5ZqQg@mail.gmail.com/
Reported-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
Tested-by: Daniele Palmas <dnlplm@gmail.com>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Link: https://patch.msgid.link/20260304134338.1785002-1-lvivier@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-03-06 16:31:41 -08:00
..
audio-v2.h
audio-v3.h
audio.h
c67x00.h
ccid.h
cdc-wdm.h
cdc.h
cdc_ncm.h net: usb: cdc-ncm: check for filtering capability 2025-07-21 16:59:26 -07:00
ch9.h
chipidea.h usb: chipidea: ci_hdrc_imx: Set out of band wakeup for i.MX95 2025-11-19 18:06:49 +01:00
composite.h usb: gadget: Remove unused usb_remove_config 2025-06-19 12:26:48 +02:00
ehci-dbgp.h
ehci_def.h
ehci_pdriver.h
ezusb.h
func_utils.h
functionfs.h
g_hid.h
gadget.h usb: gadget: udc: fix use-after-free in usb_gadget_state_work 2025-10-28 15:46:02 +01:00
gadget_configfs.h usb: gadget: Constify struct configfs_item_operations and configfs_group_operations 2025-12-23 15:31:01 +01:00
hcd.h USB: HCD: remove logic about which hcd is loaded 2026-01-14 15:59:00 +01:00
input.h
iowarrior.h
irda.h
isp116x.h
isp1301.h
ljca.h
m66592.h
mctp-usb.h
midi-v2.h
musb-ux500.h
musb.h
net2280.h
of.h
ohci_pdriver.h
onboard_dev.h
otg-fsm.h
otg.h
pd.h tcpm: Parse and log AVS APDO 2025-10-22 10:58:31 +02:00
pd_ado.h
pd_bdo.h
pd_ext_sdb.h
pd_vdo.h
phy.h
phy_companion.h
quirks.h usb: core: add USB_QUIRK_NO_BOS for devices that hang on BOS descriptor 2026-01-07 17:07:00 +01:00
r8a66597.h
r8152.h net: usb: r8152: add TRENDnet TUC-ET2G 2026-02-27 19:27:31 -08:00
renesas_usbhs.h
rndis_host.h
role.h
rzv2m_usb3drd.h
serial.h
sl811.h
storage.h
tcpci.h
tcpm.h
tegra_usb_phy.h usb: phy: tegra: parametrize PORTSC1 register offset 2026-02-05 17:16:24 +01:00
typec.h usb: typec: Introduce mode_selection bit 2026-01-23 17:18:01 +01:00
typec_altmode.h usb: typec: Introduce mode_selection bit 2026-01-23 17:18:01 +01:00
typec_dp.h usb: typec: altmodes/displayport: do not index invalid pin_assignments 2025-06-24 15:42:55 +01:00
typec_mux.h usb: typec: Stub out typec_switch APIs when CONFIG_TYPEC=n 2025-09-17 12:42:30 +02:00
typec_retimer.h
typec_tbt.h usb: typec: ps883x: Add USB4 mode and TBT3 altmode support 2025-10-22 10:58:32 +02:00
uas.h
ulpi.h
usb338x.h
usb_phy_generic.h
usbio.h usb: misc: Add Intel USBIO bridge driver 2025-09-12 14:05:09 +02:00
usbnet.h qmi_wwan: allow max_mtu above hard_mtu to control rx_urb_size 2026-03-06 16:31:41 -08:00
uvc.h media: uvcvideo: Document how to format GUIDs 2026-01-05 12:21:21 +01:00
webusb.h
xhci-dbgp.h
xhci-sideband.h xhci: sideband: add api to trace sideband usage 2025-09-12 14:08:02 +02:00