Bug 217290

Summary: issues with cdc ncm host class driver
Product: Networking Reporter: Kaushal Purohit (kaushal.purohit)
Component: OtherAssignee: Stephen Hemminger (stephen)
Status: RESOLVED CODE_FIX    
Severity: normal CC: kaushal.purohit, linux-usb, oliver, regressions
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 6.2.9 Subsystem:
Regression: No Bisected commit-id:
Attachments: NCM capabilities description
patch checking capability
check for capability before filtering (improved)

Description Kaushal Purohit 2023-04-03 06:21:36 UTC
Created attachment 304078 [details]
NCM capabilities description

Hi,

Referring to patch with commit ID (e10dcb1b6ba714243ad5a35a11b91cc14103a9a9). 

This is a spec violation for CDC NCM class driver. Driver clearly says the significance of network capabilities. (snapshot attached)

https://www.usb.org/sites/default/files/NCM10_012011.zip (Spec)

However, with the mentioned patch these values are disrespected and commands specific to these capabilities are sent from the host regardless of device' capabilities to handle them.

Currently we are setting these bits to 0 indicating no capabilities on our device and still we observe that Host (Linux kernel host cdc driver) has been sending requests specific to these capabilities.

Please let me know if there is a better way to indicate host that device does not have these capabilities.

Thanks,
Kaushal
Comment 1 Oliver Neukum 2023-04-04 19:49:39 UTC
Created attachment 304084 [details]
patch checking capability
Comment 2 Oliver Neukum 2023-04-05 10:52:23 UTC
Created attachment 304086 [details]
check for capability before filtering (improved)

use symbolic constants for capability
Comment 3 The Linux kernel's regression tracker (Thorsten Leemhuis) 2023-05-22 09:21:25 UTC
This look stuck. 

Kaushal Purohit: did you ever try that patch? Or did you stop caring?
Comment 4 Kaushal Purohit 2023-06-27 06:46:30 UTC
Yes attached patch was working well. I did not see set filter params request after applying this patch.

Thanks for fixing it,
Kaushal