From: Jinjian Song <SongJinJian@hotmail.com>
To: Loic Poulain <loic.poulain@linaro.org>
Cc: "chandrashekar.devegowda@intel.com"
<chandrashekar.devegowda@intel.com>,
"chiranjeevi.rapolu@linux.intel.com"
<chiranjeevi.rapolu@linux.intel.com>,
"corbet@lwn.net" <corbet@lwn.net>,
"danielwinkler@google.com" <danielwinkler@google.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"haijun.liu@mediatek.com" <haijun.liu@mediatek.com>,
"jiri@resnulli.us" <jiri@resnulli.us>,
"johannes@sipsolutions.net" <johannes@sipsolutions.net>,
"kuba@kernel.org" <kuba@kernel.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linuxwwan@intel.com" <linuxwwan@intel.com>,
"m.chetan.kumar@linux.intel.com" <m.chetan.kumar@linux.intel.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"nmarupaka@google.com" <nmarupaka@google.com>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"ricardo.martinez@linux.intel.com"
<ricardo.martinez@linux.intel.com>,
"ryazanov.s.a@gmail.com" <ryazanov.s.a@gmail.com>,
"vsankar@lenovo.com" <vsankar@lenovo.com>,
Joey Zhao <joey.zhao@fibocom.com>,
"Qifeng Liu(Qifeng)" <liuqf@fibocom.com>,
"Fuqiang Yan(Felix)" <felix.yan@fibocom.com>
Subject: Re: [net-next v4 0/5] net: wwan: t7xx: fw flashing & coredump support
Date: Wed, 13 Dec 2023 14:08:51 +0000 [thread overview]
Message-ID: <MEYP282MB26978CC014D395597DDCF1EFBB8DA@MEYP282MB2697.AUSP282.PROD.OUTLOOK.COM> (raw)
Hi Loic,
Thank you very much.
>On Mon, 11 Dec 2023 at 03:06, Jinjian Song <SongJinJian@hotmail.com> wrote:
>
> > > > Mon, Sep 18, 2023 at 08:56:26AM CEST, SongJinJian@hotmail.com wrote:
> > > >Tue, Sep 12, 2023 at 11:48:40AM CEST, songjinjian@hotmail.com wrote:
> > > >>>Adds support for t7xx wwan device firmware flashing & coredump
> > > >>>collection using devlink.
> > > >
> > > >>I don't believe that use of devlink is correct here. It seems like a misfit. IIUC, what you need is to communicate with the modem. Basically a communication channel to modem. The other wwan drivers implement these channels in _ctrl.c files, using multiple protocols. Why can't you do something similar and let devlink out of this please?
> > > >
> > > >>Until you put in arguments why you really need devlink and why is it a good fit, I'm against this. Please don't send any other versions of this patchset that use devlink.
> > > >
> > > > Yes, t7xx driver need communicate with modem with a communication channel to modem.
> > > > I took a look at the _ctrl.c files under wwan directory, it seemed the implementation can be well integrated with QualCommon's modem, if we do like this, I think we need modem firmware change, maybe not be suitable for current MTK modem directly.
> > > > Except for Qualcomm modem driver, there is also an Intel wwan
> > > > driver 'iosm' and it use devlink to implement firmware
> > > > flash(https://www.kernel.org/doc/html/latest/networking/devlink/
> > > > io sm.html), Intel and MTK design and use devlink to do this
> > > > work on
> > >
> > > If that exists, I made a mistake as a gatekeeper. That usage looks
> > > wrong.
> > >
> > > > 'mtk_t7xx' driver and I continue to do this work.
> > > >
> > > > I think devlink framework can support this scene and if we use devlink we don't need to develop other flash tools or other user space applications, use upstream devlink commands directly.
> > >
> > > Please don't.
>
> > So this is clear that devlink should not be used for this wwan
> firmware upgrade, if you still want to abstract the fastboot protocol
> part, maybe the easier would be to move on the generic firmware
> framework, and especially the firmware upload API which seems to be a
> good fit here?
> https://docs.kernel.org/driver-api/firmware/fw_upload.html#firmware-up
> load-api
>
> 1.This API seemed fit here, but I haven't find the refer to use the API, codes in /lib/test_firmware.c shown some intruduce, I think if I'm consider how to implement ops.prepare(what to verify, it seemed modem will do that) and ops.poll_complete? And it seemed request_firmware API also can recieve the data from use space, is it a way to use sysfs to trigger request firmware to kernel?
>
> In addition to this, I may have to create sysfs interface to pass the firmware partition parameter.And find a nother way to export the coredump port to user space.
>
> 2.How about we add a new WWAN port type, abstract fastboot and dump channel, like WWAN_PORT_XXX, then use this port with WWAN framework to handle firmware ops and dump ops.
>
> Hope to get your advice, thanks very much.
>
> I want to implement it use the way of title 2, create a new WWAN port type used for the channel with modem.
>I understand that the firmware update may not be as simple as submitting a single blob, and so firmware-upload-api may not be easy to use as is. But can you elaborate a bit on 'abstracting fastboot', not sure why it is necessary to add another abstraction level when fastboot is already supported by open source tools/libraries.
It maybe not necessary to add another abstraction level for fastboot. Previously, I thought that the open source tools/libraries worked with USB devices directly, but at that time, I thought it might be more troublesome to adapt to PCIe devices, so abstraction may be an easy way.
Currently, I think create the channel is better than using firmware upload API, I want add a new WWAN port type for this channel, and using fastboot protocol command to write data through this port.
e.g.
t7xx driver to create the channel /dev/wwan0fastboot0 when needed, I want to check whether fastboot open source tools can works with this channel directly, if not, consider using commands directly.
1.create this channel /dev/wwan0fastboot0.
2.download:size > /dev/wwan0fastboot0
3."firmwire data" > /dev/wwan0fastboot0
4.flash:partition > /dev/wwan0fastboot0
Regards,
Jinjian
next reply other threads:[~2023-12-13 14:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-13 14:08 Jinjian Song [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-12-11 2:06 Jinjian Song
2023-12-12 21:44 ` Loic Poulain
2023-11-03 6:32 Jinjian Song
2023-10-22 14:49 Jinjian Song
2023-10-08 3:19 萝卜 英雄
2023-09-18 6:56 SongJinJian
2023-11-03 10:41 ` Jiri Pirko
2023-11-09 15:21 ` Loic Poulain
2023-09-12 9:48 Jinjian Song
2023-09-13 9:17 ` Jiri Pirko
2023-09-21 9:36 ` Loic Poulain
2023-11-03 10:40 ` Jiri Pirko
2023-09-13 9:26 ` Jiri Pirko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=MEYP282MB26978CC014D395597DDCF1EFBB8DA@MEYP282MB2697.AUSP282.PROD.OUTLOOK.COM \
--to=songjinjian@hotmail.com \
--cc=chandrashekar.devegowda@intel.com \
--cc=chiranjeevi.rapolu@linux.intel.com \
--cc=corbet@lwn.net \
--cc=danielwinkler@google.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=felix.yan@fibocom.com \
--cc=haijun.liu@mediatek.com \
--cc=jiri@resnulli.us \
--cc=joey.zhao@fibocom.com \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxwwan@intel.com \
--cc=liuqf@fibocom.com \
--cc=loic.poulain@linaro.org \
--cc=m.chetan.kumar@linux.intel.com \
--cc=netdev@vger.kernel.org \
--cc=nmarupaka@google.com \
--cc=pabeni@redhat.com \
--cc=ricardo.martinez@linux.intel.com \
--cc=ryazanov.s.a@gmail.com \
--cc=vsankar@lenovo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®