# Re: \[net-next,RESEND v6 2/2\] net: wwan: t7xx: Add debug port

- From: Simon Horman \<horms@kernel.org\>
- Date: 2024-10-23 12:40:21 
- List: netdev
- Page: https://ratatoskr.run/netdev/2024/10/2795472
- Thread: https://ratatoskr.run/netdev/2024/10/2791856/t.md

```text
+ Jiri

On Mon, Oct 21, 2024 at 08:19:34PM +0800, Jinjian Song wrote:
> From: Jinjian Song <redacted>
> 
> Add support for userspace to switch on the debug port(ADB,MIPC).
>  - ADB port: /dev/wwan0adb0
>  - MIPC port: /dev/wwan0mipc0
> 
> Application can use ADB (Android Debg Bridge) port to implement
> functions (shell, pull, push ...) by ADB protocol commands.
> E.g., ADB commands:
>  - A_OPEN: OPEN(local-id, 0, "destination")
>  - A_WRTE: WRITE(local-id, remote-id, "data")
>  - A_OKEY: READY(local-id, remote-id, "")
>  - A_CLSE: CLOSE(local-id, remote-id, "")
> 
> Link: https://android.googlesource.com/platform/packages/modules/adb/+/refs/heads/main/README.md
> 
> Application can use MIPC (Modem Information Process Center) port
> to debug antenna tunner or noise profiling through this MTK modem
> diagnostic interface.
> 
> By default, debug ports are not exposed, so using the command
> to enable or disable debug ports.
> 
> Switch on debug port:
>  - debug: 'echo debug > /sys/bus/pci/devices/${bdf}/t7xx_mode
> 
> Switch off debug port:
>  - normal: 'echo normal > /sys/bus/pci/devices/${bdf}/t7xx_mode

Hi,

I am somewhat surprised to see vendor-specific sysfs controls being added.
And I am wondering if another mechanism was considered. It seems to
me that devlink would be appropriate. Jiri (CCed) may have an opinion on
that.

...
```
