Delay selecting alternate setting in CDC NCM until network interface is raised
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 of 5 patches 4 repliesIn review
4 of 5 patches are in this archive. The cover letter announces 5.
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | usb: cdc-ncm: Change alternate setting magic numbers into #definesdrivers/ | +9 | 1 reply | |
| 3/5 | usb: usbnet: Allow drivers using usbnet to specify maximum packet sizedrivers/ | +2 | 1 reply | |
| 4/5 | usb: usbnet: Add validation of dev->maxpacket to usbnetdrivers/ | +4 | 2 replies | |
| 5/5 | usb: cdc-ncm: Allow NCM driver to determine dev->maxpacketdrivers/ | +1 | 0 replies |
Reviews trailers per patch
1 of 4 patches has a Reviewed-by or Acked-by.
| Patch | Oliver Neukum |
|---|---|
| 1/5 | |
| 3/5 | A-b |
| 4/5 | |
| 5/5 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/5] Delay selecting alternate setting in CDC NCM until network interface is raised
This patch series moves the setting of the alternate setting used for the CDC NCM data interface until the network interface is raised. Before this patch series the CDC NCM driver would select the alternate setting which allows data to be sent and received as soon as the device was probed.
While the previous behaviour was not against the CDC NCM specification it is problematic with some CDC NCM devices, e.g. Nokia 701 Mobile Telephone. These devices will only send the network connection status notification to the host if the control interrupt endpoint is read from within a few seconds of the data enabled alternate setting being selected.
This behaviour means that the network connection notification would never be received and so the network interface would stay in a disconnected state indefinitely, unless the interface was marked as 'up' almost immediately after the CDC NCM device was probed.
Toby Gray (5):
usb: cdc-ncm: Change alternate setting magic numbers into #defines
usb: cdc-ncm: Set altsetting only when network interface is opened
usb: usbnet: Allow drivers using usbnet to specify maximum packet
size
usb: usbnet: Add validation of dev->maxpacket to usbnet
usb: cdc-ncm: Allow NCM driver to determine dev->maxpacket
drivers/net/usb/cdc_ncm.c | 46 ++++++++++++++++++++++++++++++++++++-------- drivers/net/usb/usbnet.c | 7 +++++- 2 files changed, 43 insertions(+), 10 deletions(-)