From: Sascha Hauer <s.hauer@pengutronix.de>
To: Denis Orlov <denorl2009@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] net: e1000: read EEPROM through EERD register on 8257x adapters
Date: Mon, 16 Jan 2023 13:41:52 +0100 [thread overview]
Message-ID: <20230116124152.GD24755@pengutronix.de> (raw)
In-Reply-To: <20230113140909.31769-1-denorl2009@gmail.com>
On Fri, Jan 13, 2023 at 05:09:09PM +0300, Denis Orlov wrote:
> For some reason, we would only use EERD if Flash is used as non-volatile
> memory. However, looking at e1000e driver sources from Linux this is how
> they are reading NVM on those cards for both EEPROM and Flash.
>
> This fixes issues with reading EEPROM in driver on QEMU emulated 82574
> PCIe card.
>
> Signed-off-by: Denis Orlov <denorl2009@gmail.com>
> ---
> drivers/net/e1000/eeprom.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Applied, thanks
Sascha
>
> diff --git a/drivers/net/e1000/eeprom.c b/drivers/net/e1000/eeprom.c
> index 27143bd6d0..c90faf3a58 100644
> --- a/drivers/net/e1000/eeprom.c
> +++ b/drivers/net/e1000/eeprom.c
> @@ -495,6 +495,7 @@ int32_t e1000_init_eeprom_params(struct e1000_hw *hw)
> case e1000_82571:
> case e1000_82572:
> e1000_eeprom_uses_spi(eeprom, eecd);
> + eeprom->read = e1000_read_eeprom_eerd;
> break;
>
> case e1000_82573:
> @@ -502,7 +503,6 @@ int32_t e1000_init_eeprom_params(struct e1000_hw *hw)
> if (e1000_is_onboard_nvm_eeprom(hw)) {
> e1000_eeprom_uses_spi(eeprom, eecd);
> } else {
> - eeprom->read = e1000_read_eeprom_eerd;
> eeprom->type = e1000_eeprom_flash;
> eeprom->word_size = 2048;
>
> @@ -513,6 +513,7 @@ int32_t e1000_init_eeprom_params(struct e1000_hw *hw)
> eecd &= ~E1000_EECD_AUPDEN;
> e1000_write_reg(hw, E1000_EECD, eecd);
> }
> + eeprom->read = e1000_read_eeprom_eerd;
> break;
>
> case e1000_80003es2lan:
> --
> 2.30.2
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
prev parent reply other threads:[~2023-01-16 12:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-13 14:09 [PATCH] net: e1000: read EEPROM through EERD register on 8257x adapters Denis Orlov
2023-01-16 12:41 ` Sascha Hauer [this message]
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=20230116124152.GD24755@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=denorl2009@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.