public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jinjian Song <songjinjian@hotmail.com>
To: jiri@resnulli.us
Cc: chandrashekar.devegowda@intel.com,
	chiranjeevi.rapolu@linux.intel.com, danielwinkler@google.com,
	davem@davemloft.net, edumazet@google.com,
	haijun.liu@mediatek.com, ilpo.jarvinen@linux.intel.com,
	jesse.brandeburg@intel.com, jinjian.song@fibocom.com,
	johannes@sipsolutions.net, kuba@kernel.org, linuxwwan@intel.com,
	linuxwwan_5g@intel.com, loic.poulain@linaro.org,
	m.chetan.kumar@linux.intel.com, netdev@vger.kernel.org,
	pabeni@redhat.com, ricardo.martinez@linux.intel.com,
	ryazanov.s.a@gmail.com, songjinjian@hotmail.com,
	soumya.prakash.mishra@intel.com
Subject: Re: [net-next 2/6] net: wwan: t7xx: Driver registers with Devlink framework
Date: Mon,  7 Aug 2023 20:44:00 +0800	[thread overview]
Message-ID: <ME3P282MB270324EC4CEEB864D04ECDB2BB0CA@ME3P282MB2703.AUSP282.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <MEYP282MB26973DD342BDD69914C06FCFBB0EA@MEYP282MB2697.AUSP282.PROD.OUTLOOK.COM>

Sat, Aug 05, 2023 at 02:12:13PM CEST, songjinjian@hotmail.com wrote:
>>Thu, Aug 03, 2023 at 04:18:08AM CEST, songjinjian@hotmail.com wrote:
>>
>>[...]
>>
>>>>+static const struct devlink_param t7xx_devlink_params[] = {
>>>>+	DEVLINK_PARAM_DRIVER(T7XX_DEVLINK_PARAM_ID_FASTBOOT,
>>>>+			     "fastboot", DEVLINK_PARAM_TYPE_BOOL,
>>>>+			     BIT(DEVLINK_PARAM_CMODE_DRIVERINIT),
>>>>+			     NULL, NULL, NULL),
>>>
>>>driver init params is there so the user could configure driver instance
>>>and then hit devlink reload in order to reinitialize with the new param
>>>values. In your case, it is a device command. Does not make any sense to
>>>have it as param.
>>>
>>>NAK
>>
>>Thanks for your review, so drop this param and set this param insider driver when driver_reinit,
>>is that fine?
>
>I don't understand the question, sorry.

Thanks for your review, I mean if I don't define fastboot param like devlink_param above, I will
define a global bool variable in driver, then when devlink ... driver_reinit, set this variable to true.

like:
   t7xx_devlink { 
       ....
       bool reset_to_fastboot;
   }


   t7xx_devlink_reload_down () {
       ...
       case DEVLINK_RELOAD_ACTION_DRIVER_REINIT:
           t7xx_devlink.reset_to_fastboot = true;
       ...
   }

   other functions use this variable:

   if (t7xx_devlink.reset_to_fastboot) {
        iowrite(reg, "reset to fastboot");
   }

Intel colleague has change to the way of devlink_param, so I hope to keep this.

>

  parent reply	other threads:[~2023-08-07 12:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230803021812.6126-1-songjinjian@hotmail.com>
2023-08-03  2:18 ` [net-next 1/6] net: wwan: t7xx: Infrastructure for early port configuration Jinjian Song
2023-08-03  2:18 ` [net-next 2/6] net: wwan: t7xx: Driver registers with Devlink framework Jinjian Song
2023-08-03  9:31   ` Jiri Pirko
2023-08-03  9:59   ` Jiri Pirko
2023-08-05 10:25   ` Jinjian Song
2023-08-05 12:12   ` Jinjian Song
2023-08-07  7:22     ` Jiri Pirko
2023-08-07 12:44     ` Jinjian Song [this message]
2023-08-07 12:58       ` Jiri Pirko
2023-08-10 15:19       ` Jinjian Song
2023-08-03  2:18 ` [net-next 3/6] net: wwan: t7xx: Implements devlink ops of firmware flashing Jinjian Song
2023-08-03  9:52   ` Jiri Pirko
2023-08-05 12:05   ` Jinjian Song
2023-08-07  7:35     ` Jiri Pirko
2023-08-07 12:26     ` Jinjian Song
2023-08-07 13:01       ` Jiri Pirko
2023-08-10 15:32       ` Jinjian Song

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=ME3P282MB270324EC4CEEB864D04ECDB2BB0CA@ME3P282MB2703.AUSP282.PROD.OUTLOOK.COM \
    --to=songjinjian@hotmail.com \
    --cc=chandrashekar.devegowda@intel.com \
    --cc=chiranjeevi.rapolu@linux.intel.com \
    --cc=danielwinkler@google.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=haijun.liu@mediatek.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=jinjian.song@fibocom.com \
    --cc=jiri@resnulli.us \
    --cc=johannes@sipsolutions.net \
    --cc=kuba@kernel.org \
    --cc=linuxwwan@intel.com \
    --cc=linuxwwan_5g@intel.com \
    --cc=loic.poulain@linaro.org \
    --cc=m.chetan.kumar@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=ricardo.martinez@linux.intel.com \
    --cc=ryazanov.s.a@gmail.com \
    --cc=soumya.prakash.mishra@intel.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