lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241023124014.GU402847@kernel.org>
Date: Thu, 24 Oct 2024 18:02:56 +0800
From: Jinjian Song <jinjian.song@...ocom.com>
To: horms@...nel.org
Cc: angelogioacchino.delregno@...labora.com,
	chandrashekar.devegowda@...el.com,
	chiranjeevi.rapolu@...ux.intel.com,
	corbet@....net,
	danielwinkler@...gle.com,
	davem@...emloft.net,
	edumazet@...gle.com,
	haijun.liu@...iatek.com,
	helgaas@...nel.org,
	jinjian.song@...ocom.com,
	jiri@...nulli.us,
	johannes@...solutions.net,
	korneld@...gle.com,
	kuba@...nel.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	linux-mediatek@...ts.infradead.org,
	loic.poulain@...aro.org,
	m.chetan.kumar@...ux.intel.com,
	matthias.bgg@...il.com,
	netdev@...r.kernel.org,
	pabeni@...hat.com,
	ricardo.martinez@...ux.intel.com,
	ryazanov.s.a@...il.com,
	songjinjian@...mail.com
Subject: Re: [net-next,RESEND v6 2/2] net: wwan: t7xx: Add debug port

>+ Jiri
>
>On Mon, Oct 21, 2024 at 08:19:34PM +0800, Jinjian Song wrote:
>> From: Jinjian Song <songjinjian@...mail.com>
>> 
>> 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.
>
>...

Hi Jiri,

T7XX is MTK WWAN device platform, ADB and MIPC channel is common in all MTK
platform, the ports used to debug, and we need a way to create the channels
to usespace, so use the sysfs to trigger that.

The previous plan consider using devlink framework to set param to create 
ports inside t7xx driver, but later after communicating with Loic and Jiri
, it was replaced with the current plan.
https://lore.kernel.org/all/CAMZdPi-qZ3JjZmEAtEmJETNzKd+k6UcLnLkM0MZoSZ1hKaOXuA@mail.gmail.com/

Best Regards,
Jinjian,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ