[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.2601260039220.40317@angie.orcam.me.uk>
Date: Mon, 26 Jan 2026 01:04:49 +0000 (GMT)
From: "Maciej W. Rozycki" <macro@...am.me.uk>
To: Andrew Lunn <andrew@...n.ch>
cc: Ethan Nelson-Moore <enelsonmoore@...il.com>,
Simon Horman <horms@...nel.org>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] docs: 3c509: remove note about card detection
failing with overclock
On Sun, 25 Jan 2026, Andrew Lunn wrote:
> > > In any case, I think it would be worth providing a reference
> > > to the commit where this was fixed.
> > I just checked with git blame and all of the mdelay/udelay references
> > in the driver predate Git history.
>
> For commits before the beginning of git, we just use the first commit
> in git.
As an active user of the driver I did some digging and tracked it down to
Linux 2.1.100, where we have this (among others):
diff -u --recursive --new-file v2.1.99/linux/drivers/net/3c509.c linux/drivers/net/3c509.c
--- v2.1.99/linux/drivers/net/3c509.c Mon Feb 23 18:12:05 1998
+++ linux/drivers/net/3c509.c Thu May 7 14:40:41 1998
@@ -27,10 +27,22 @@
FIXES:
Alan Cox: Removed the 'Unexpected interrupt' bug.
Michael Meskes: Upgraded to Donald Becker's version 1.07.
- Phil Blundell: Media selection support.
+ Alan Cox: Increased the eeprom delay. Regardless of
+ what the docs say some people definitely
+ get problems with lower (but in card spec)
+ delays
+ v1.10 4/21/97 Fixed module code so that multiple cards may be detected,
+ other cleanups. -djb
+ Andrea Arcangeli: Upgraded to Donald Becker's version 1.12.
*/
[...]
/* Read a word from the EEPROM using the regular EEPROM access register.
Assume that we are in register window zero.
*/
-__initfunc(static ushort read_eeprom(short ioaddr, int index))
+static ushort read_eeprom(short ioaddr, int index)
{
outw(EEPROM_READ + index, ioaddr + 10);
/* Pause for at least 162 us. for the read to take place. */
- udelay (300);
+ udelay (500);
return inw(ioaddr + 12);
}
/* Read a word from the EEPROM when in the ISA ID probe state. */
-__initfunc(static ushort id_read_eeprom(int index))
+static ushort id_read_eeprom(int index)
{
int bit, word = 0;
@@ -340,8 +340,8 @@
outb(EEPROM_READ + index, id_port);
/* Pause for at least 162 us. for the read to take place. */
- udelay (300);
-
+ udelay (500);
+
for (bit = 15; bit >= 0; bit--)
word = (word << 1) + (inb(id_port) & 0x01);
-- so it's not about using a time-based vs some other kind of delay. The
comment to be removed was only added along with the whole document on the
3c509 driver with Linux 2.5.13, much later (2002 vs 1998), and therefore
still stands.
NAK for the change then. Where has the idea to drop this comment come
from anyway?
Maciej
Powered by blists - more mailing lists