From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
To: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com>
Cc: anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com,
piotr.kwapulinski@intel.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, intel-wired-lan@lists.osuosl.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 net-next] ixgbe: Fix endian handling for ACI descriptor registers
Date: Wed, 15 Jan 2025 06:55:01 +0100 [thread overview]
Message-ID: <Z4dNkNLkQlSPA/SA@mev-dev.igk.intel.com> (raw)
In-Reply-To: <20250115034117.172999-1-dheeraj.linuxdev@gmail.com>
On Wed, Jan 15, 2025 at 09:11:17AM +0530, Dheeraj Reddy Jonnalagadda wrote:
> The ixgbe driver was missing proper endian conversion for ACI descriptor
> register operations. Add the necessary conversions when reading and
> writing to the registers.
>
> Fixes: 46761fd52a88 ("ixgbe: Add support for E610 FW Admin Command Interface")
> Closes: https://scan7.scan.coverity.com/#/project-view/52337/11354?selectedIssue=1602757
> Signed-off-by: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com>
> ---
> Changelog
>
> v2:
> - Updated the patch to include suggested fix
> - Updated the commit message to describe the issue
>
> drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
> index 683c668672d6..3b9017e72d0e 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
> @@ -113,7 +113,7 @@ static int ixgbe_aci_send_cmd_execute(struct ixgbe_hw *hw,
>
> /* Descriptor is written to specific registers */
> for (i = 0; i < IXGBE_ACI_DESC_SIZE_IN_DWORDS; i++)
> - IXGBE_WRITE_REG(hw, IXGBE_PF_HIDA(i), raw_desc[i]);
> + IXGBE_WRITE_REG(hw, IXGBE_PF_HIDA(i), cpu_to_le32(raw_desc[i]));
>
> /* SW has to set PF_HICR.C bit and clear PF_HICR.SV and
> * PF_HICR_EV
> @@ -145,7 +145,7 @@ static int ixgbe_aci_send_cmd_execute(struct ixgbe_hw *hw,
> if ((hicr & IXGBE_PF_HICR_SV)) {
> for (i = 0; i < IXGBE_ACI_DESC_SIZE_IN_DWORDS; i++) {
> raw_desc[i] = IXGBE_READ_REG(hw, IXGBE_PF_HIDA(i));
> - raw_desc[i] = raw_desc[i];
> + raw_desc[i] = le32_to_cpu(raw_desc[i]);
> }
> }
>
> @@ -153,7 +153,7 @@ static int ixgbe_aci_send_cmd_execute(struct ixgbe_hw *hw,
> if ((hicr & IXGBE_PF_HICR_EV) && !(hicr & IXGBE_PF_HICR_C)) {
> for (i = 0; i < IXGBE_ACI_DESC_SIZE_IN_DWORDS; i++) {
> raw_desc[i] = IXGBE_READ_REG(hw, IXGBE_PF_HIDA_2(i));
> - raw_desc[i] = raw_desc[i];
> + raw_desc[i] = le32_to_cpu(raw_desc[i]);
> }
> }
>
> --
> 2.34.1
>
Thanks for fixing it
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
next prev parent reply other threads:[~2025-01-15 5:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-15 3:41 [PATCH v2 net-next] ixgbe: Fix endian handling for ACI descriptor registers Dheeraj Reddy Jonnalagadda
2025-01-15 5:55 ` Michal Swiatkowski [this message]
2025-01-15 11:39 ` Kwapulinski, Piotr
2025-01-16 16:21 ` Simon Horman
2025-01-17 10:01 ` Przemek Kitszel
2025-01-17 18:09 ` Simon Horman
2025-01-20 14:48 ` Przemek Kitszel
2025-01-21 13:50 ` Dheeraj Reddy Jonnalagadda
2025-01-27 11:30 ` Przemek Kitszel
2025-01-18 15:05 ` kernel test robot
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=Z4dNkNLkQlSPA/SA@mev-dev.igk.intel.com \
--to=michal.swiatkowski@linux.intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=dheeraj.linuxdev@gmail.com \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=piotr.kwapulinski@intel.com \
--cc=przemyslaw.kitszel@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;
as well as URLs for NNTP newsgroup(s).