From: Jesse Brandeburg <jesse.brandeburg@intel.com>
To: intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org,
Marcin Szycik <marcin.szycik@linux.intel.com>,
Jesse Brandeburg <jesse.brandeburg@intel.com>
Subject: [Intel-wired-lan] [PATCH iwl-next v1 01/13] e1000e: make lost bits explicit
Date: Tue, 21 Nov 2023 13:19:09 -0800 [thread overview]
Message-ID: <20231121211921.19834-2-jesse.brandeburg@intel.com> (raw)
In-Reply-To: <20231121211921.19834-1-jesse.brandeburg@intel.com>
For more than 15 years this code has passed in a request for a page and
masked off that page when read/writing. This code has been here forever,
but FIELD_PREP finds the bug when converted to use it. Change the code
to do exactly the same thing but allow the conversion to FIELD_PREP in a
later patch. To make it clear what we lost when making this change I
left a comment, but there is no point to change the code to generate a
correct sequence at this point.
This is not a Fixes tagged patch on purpose because it doesn't change
the binary output.
Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
---
drivers/net/ethernet/intel/e1000e/80003es2lan.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000e/80003es2lan.c b/drivers/net/ethernet/intel/e1000e/80003es2lan.c
index be9c695dde12..74671201208e 100644
--- a/drivers/net/ethernet/intel/e1000e/80003es2lan.c
+++ b/drivers/net/ethernet/intel/e1000e/80003es2lan.c
@@ -1035,17 +1035,18 @@ static s32 e1000_setup_copper_link_80003es2lan(struct e1000_hw *hw)
* iteration and increase the max iterations when
* polling the phy; this fixes erroneous timeouts at 10Mbps.
*/
- ret_val = e1000_write_kmrn_reg_80003es2lan(hw, GG82563_REG(0x34, 4),
- 0xFFFF);
+ /* these next three accesses were always meant to use page 0x34 using
+ * GG82563_REG(0x34, N) but never did, so we've just corrected the call
+ * to not drop bits
+ */
+ ret_val = e1000_write_kmrn_reg_80003es2lan(hw, 4, 0xFFFF);
if (ret_val)
return ret_val;
- ret_val = e1000_read_kmrn_reg_80003es2lan(hw, GG82563_REG(0x34, 9),
- ®_data);
+ ret_val = e1000_read_kmrn_reg_80003es2lan(hw, 9, ®_data);
if (ret_val)
return ret_val;
reg_data |= 0x3F;
- ret_val = e1000_write_kmrn_reg_80003es2lan(hw, GG82563_REG(0x34, 9),
- reg_data);
+ ret_val = e1000_write_kmrn_reg_80003es2lan(hw, 9, reg_data);
if (ret_val)
return ret_val;
ret_val =
--
2.39.3
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
next prev parent reply other threads:[~2023-11-21 21:19 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-21 21:19 [Intel-wired-lan] [PATCH iwl-next v1 00/13] intel: use FIELD_PREP and FIELD_GET Jesse Brandeburg
2023-11-21 21:19 ` Jesse Brandeburg [this message]
2023-11-24 10:59 ` [Intel-wired-lan] [PATCH iwl-next v1 01/13] e1000e: make lost bits explicit Simon Horman
2023-11-21 21:19 ` [Intel-wired-lan] [PATCH iwl-next v1 02/13] intel: add bit macro includes where needed Jesse Brandeburg
2023-11-24 10:59 ` Simon Horman
2023-11-21 21:19 ` [Intel-wired-lan] [PATCH iwl-next v1 03/13] intel: legacy: field prep conversion Jesse Brandeburg
2023-11-24 10:59 ` Simon Horman
2023-12-05 6:15 ` Pucha, HimasekharX Reddy
2023-11-21 21:19 ` [Intel-wired-lan] [PATCH iwl-next v1 04/13] i40e: " Jesse Brandeburg
2023-11-24 11:00 ` Simon Horman
2023-11-21 21:19 ` [Intel-wired-lan] [PATCH iwl-next v1 05/13] iavf: " Jesse Brandeburg
2023-11-24 11:00 ` Simon Horman
2023-11-21 21:19 ` [Intel-wired-lan] [PATCH iwl-next v1 06/13] ice: " Jesse Brandeburg
2023-11-24 11:00 ` Simon Horman
2023-12-05 6:29 ` Pucha, HimasekharX Reddy
2023-11-21 21:19 ` [Intel-wired-lan] [PATCH iwl-next v1 07/13] ice: fix pre-shifted bit usage Jesse Brandeburg
2023-11-24 11:00 ` Simon Horman
2023-11-21 21:19 ` [Intel-wired-lan] [PATCH iwl-next v1 08/13] igc: field prep conversion Jesse Brandeburg
2023-11-24 11:01 ` Simon Horman
2023-12-05 11:16 ` naamax.meir
2023-11-21 21:19 ` [Intel-wired-lan] [PATCH iwl-next v1 09/13] intel: legacy: field get conversion Jesse Brandeburg
2023-11-24 11:01 ` Simon Horman
2023-12-05 6:33 ` Pucha, HimasekharX Reddy
2023-11-21 21:19 ` [Intel-wired-lan] [PATCH iwl-next v1 10/13] igc: " Jesse Brandeburg
2023-11-24 11:01 ` Simon Horman
2023-12-06 8:22 ` naamax.meir
2023-11-21 21:19 ` [Intel-wired-lan] [PATCH iwl-next v1 11/13] i40e: " Jesse Brandeburg
2023-11-24 11:02 ` Simon Horman
2023-11-27 8:38 ` Loktionov, Aleksandr
2023-12-05 6:38 ` Pucha, HimasekharX Reddy
2023-11-21 21:19 ` [Intel-wired-lan] [PATCH iwl-next v1 12/13] iavf: " Jesse Brandeburg
2023-11-24 11:02 ` Simon Horman
2023-11-21 21:19 ` [Intel-wired-lan] [PATCH iwl-next v1 13/13] ice: " Jesse Brandeburg
2023-11-24 11:03 ` Simon Horman
2023-11-29 22:31 ` Jesse Brandeburg
2023-11-30 16:26 ` Simon Horman
2023-12-05 6:41 ` Pucha, HimasekharX Reddy
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=20231121211921.19834-2-jesse.brandeburg@intel.com \
--to=jesse.brandeburg@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=marcin.szycik@linux.intel.com \
--cc=netdev@vger.kernel.org \
/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