Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>,
	<intel-wired-lan@lists.osuosl.org>
Cc: Brett Creeley <brett.creeley@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH net-next v9 3/5] ice: add ability to set FW log configuration
Date: Fri, 3 Mar 2023 15:21:48 -0800	[thread overview]
Message-ID: <015f0231-35b5-a7e4-513e-513e9d0c407b@intel.com> (raw)
In-Reply-To: <20230302215109.124-4-paul.m.stillwell.jr@intel.com>

On 3/2/2023 1:51 PM, Paul M Stillwell Jr wrote:

[...]

> +/**
> + * ice_pf_fwlog_update_modules - update 1 or more modules via debugfs
> + * @pf: pointer to the PF struct
> + * @log_level: log_level to use for the @events
> + * @events: events to update
> + */
> +int ice_pf_fwlog_update_modules(struct ice_pf *pf, u8 log_level,
> +				unsigned long events)
> +{
> +	struct ice_fwlog_module_entry *entries;
> +	u16 module_id, max_bits;
> +	struct ice_hw *hw = &pf->hw;

In addition to what lkp reported. RCT

> +
> +	if (log_level >= ICE_FWLOG_LEVEL_INVALID) {
> +		dev_err(ice_pf_to_dev(pf), "Invalid FW log level %u, all level(s) >= %u are invalid\n",
> +			log_level, ICE_FWLOG_LEVEL_INVALID);
> +		return -EINVAL;
> +	}
> +
> +	if (events >= BIT(ICE_AQC_FW_LOG_ID_MAX)) {
> +		dev_err(ice_pf_to_dev(pf), "Invalid FW log events 0x%lx, all FW log event bits >= 0x%lx are invalid\n",
> +			events, BIT(ICE_AQC_FW_LOG_ID_MAX));
> +		return -EINVAL;
> +	}
> +
> +	entries = (struct ice_fwlog_module_entry *)hw->fwlog_cfg.module_entries;
> +
> +	max_bits = min_t(u16, BITS_PER_TYPE(unsigned long),
> +			 ICE_AQC_FW_LOG_ID_MAX);
> +
> +	for_each_set_bit(module_id, &events, max_bits) {
> +		entries[module_id].log_level = log_level;
> +	}
> +
> +	return 0;
> +}
> +
>   /**
>    * ice_register_netdev - register netdev
>    * @vsi: pointer to the VSI struct
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

  parent reply	other threads:[~2023-03-03 23:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-02 21:51 [Intel-wired-lan] [PATCH net-next v9 0/5] add v2 FW logging for ice driver Paul M Stillwell Jr
2023-03-02 21:51 ` [Intel-wired-lan] [PATCH net-next v9 1/5] ice: remove FW logging code Paul M Stillwell Jr
2023-03-02 21:51 ` [Intel-wired-lan] [PATCH net-next v9 2/5] ice: enable debugfs to check FW logging status Paul M Stillwell Jr
2023-03-03 23:21   ` Tony Nguyen
2023-03-06 22:00     ` Paul M Stillwell Jr
2023-03-02 21:51 ` [Intel-wired-lan] [PATCH net-next v9 3/5] ice: add ability to set FW log configuration Paul M Stillwell Jr
2023-03-03  1:23   ` kernel test robot
2023-03-03 23:21   ` Tony Nguyen [this message]
2023-03-06 22:11     ` Paul M Stillwell Jr
2023-03-02 21:51 ` [Intel-wired-lan] [PATCH net-next v9 4/5] ice: enable FW logging based on stored configuration Paul M Stillwell Jr
2023-03-03 23:22   ` Tony Nguyen
2023-03-06 22:14     ` Paul M Stillwell Jr
2023-03-02 21:51 ` [Intel-wired-lan] [PATCH net-next v9 5/5] ice: add ability to enable FW logging and capture data Paul M Stillwell Jr
2023-03-03 23:23   ` Tony Nguyen
2023-03-08 23:22     ` Paul M Stillwell Jr

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=015f0231-35b5-a7e4-513e-513e9d0c407b@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=brett.creeley@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=paul.m.stillwell.jr@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