[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <DM6PR11MB4610DE31C2D26BB4CB709341F3192@DM6PR11MB4610.namprd11.prod.outlook.com>
Date: Wed, 15 Jan 2025 11:39:09 +0000
From: "Kwapulinski, Piotr" <piotr.kwapulinski@...el.com>
To: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@...il.com>, "Nguyen, Anthony
L" <anthony.l.nguyen@...el.com>, "Kitszel, Przemyslaw"
<przemyslaw.kitszel@...el.com>
CC: "andrew+netdev@...n.ch" <andrew+netdev@...n.ch>, "davem@...emloft.net"
<davem@...emloft.net>, "edumazet@...gle.com" <edumazet@...gle.com>,
"kuba@...nel.org" <kuba@...nel.org>, "pabeni@...hat.com" <pabeni@...hat.com>,
"michal.swiatkowski@...ux.intel.com" <michal.swiatkowski@...ux.intel.com>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2 net-next] ixgbe: Fix endian handling for ACI descriptor
registers
>-----Original Message-----
>From: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@...il.com>
>Sent: Wednesday, January 15, 2025 4:41 AM
>To: Nguyen, Anthony L <anthony.l.nguyen@...el.com>; Kitszel, Przemyslaw <przemyslaw.kitszel@...el.com>; Kwapulinski, Piotr <piotr.kwapulinski@...el.com>
>Cc: andrew+netdev@...n.ch; davem@...emloft.net; edumazet@...gle.com; kuba@...nel.org; pabeni@...hat.com; michal.swiatkowski@...ux.intel.com; intel-wired-lan@...ts.osuosl.org; netdev@...r.kernel.org; linux-kernel@...r.kernel.org; Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@...il.com>
>Subject: [PATCH v2 net-next] ixgbe: Fix endian handling for ACI descriptor registers
>
>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@...il.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
>
Please avoid the closed external links in the future. Thank you.
Reviewed-by: Piotr Kwapulinski <piotr.kwapulinski@...el.com>
Powered by blists - more mailing lists