From: David Miller <davem@davemloft.net>
To: devzero@web.de
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] fix #51791 - bug? mac 00:00:00:00:00:00 with natsemi DP83815 after driver load
Date: Tue, 18 Nov 2014 15:49:17 -0500 (EST) [thread overview]
Message-ID: <20141118.154917.171051693633411092.davem@davemloft.net> (raw)
In-Reply-To: <trinity-9c3b63ff-f474-4d99-84d8-29034921bb3c-1416183467662@3capp-webde-bs06>
From: "Roland Kletzing" <devzero@web.de>
Date: Mon, 17 Nov 2014 01:17:47 +0100
> This one should fix Bugzilla #51791 (details below).
>
> Natsemi driver does not read MAC correctly from eeprom, while natsemi-diag from nictools-pci does. Apparently, tt`s a timing issue in the kernel driver.
>
> According to ftp://ftp.gwdg.de/pub/linux/misc/donald.becker/diag/natsemi-diag.c , eeprom_delay(ee_addr) is defined as follows:
>
> /* Delay between EEPROM clock transitions.
> This flushes the write buffer to prevent quick double-writes.
> */
> #define eeprom_delay(ee_addr) inl(ee_addr); inl(ee_addr)
>
> while in the natsemi linux kernel driver, the delay is done this way :
>
> #define eeprom_delay(ee_addr) readl(ee_addr)
>
> , which results in the MAC being all zero`s.
>
> So i simply added a second readl() to increase delay (instead of turning into inl() as proposed before). This may look a little bit ugly, but it`s fixing the problem for me.
>
> I´m not sure how many natsemi users being left on this planet (probably few), but i guess this change does not do any harm on platforms where the driver does not behave buggy, so please consider adding it to mainline/stable/longterm.
>
> Signed-off-by: Roland Kletzing <devzero@web.de>
Please post your patch as a clean new email, without quoting things
after your signoff etc.
Also, please break your lines up to 80 columns max.
Thanks.
prev parent reply other threads:[~2014-11-18 20:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <trinity-1cec0308-6242-413f-a63f-b09cded30a4f-1416096326518@3capp-webde-bs03>
2014-11-17 0:17 ` [PATCH] fix #51791 - bug? mac 00:00:00:00:00:00 with natsemi DP83815 after driver load Roland Kletzing
2014-11-18 20:49 ` David Miller [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=20141118.154917.171051693633411092.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=devzero@web.de \
--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