From: "Rafał Bilski" <rafalbilski@interia.pl>
To: Tim Hockin <thockin@hockin.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Mark Brown <broonie@sirena.org.uk>,
linux-kernel@vger.kernel.org
Subject: Re: Natsemi DP83815 driver spaming
Date: Wed, 02 May 2007 22:05:31 +0200 [thread overview]
Message-ID: <4638EF0B.9050701@interia.pl> (raw)
In-Reply-To: <b3ece790705020744p2e73bb5fo2c0acad947a5de15@mail.gmail.com>
>> > I'm not sure what the right answer is. The code was designed to do
>> > the right thing, and yet in your case it's broken. Does it need to be
>> > a build option to work around broken hardware? Yuck.
>>
>> Without a system that really needs the original problem that was being
>> worked around it's going to be hard to see if the workaround still does
>> the job. Given the nature of the failure I wouldn't be surprised if it
>> broke different things on every board that has problems.
>
> I'm sure if you were to revert that code today, you'd find people who
> had problems :)
>
>> How about a sysfs tuneable? It's not nice but at least it's runtime.
>
> Fine by me - but I have very little time to do the work.
What about module option?
---
drivers/net/natsemi.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index 349b96a..933e106 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -90,6 +90,10 @@ static int rx_copybreak;
static int options[MAX_UNITS];
static int full_duplex[MAX_UNITS];
+/* Used to disable "is PHY alive" check for compatibility with broken
+ * designs using rev. C chips. */
+static int disable_phy_check;
+
/* Operational parameters that are set at compile time. */
/* Keep the ring sizes a power of two for compile efficiency.
@@ -141,6 +145,7 @@ module_param(debug, int, 0);
module_param(rx_copybreak, int, 0);
module_param_array(options, int, NULL, 0);
module_param_array(full_duplex, int, NULL, 0);
+module_param(disable_phy_check, int, 0);
MODULE_PARM_DESC(mtu, "DP8381x MTU (all boards)");
MODULE_PARM_DESC(debug, "DP8381x default debug level");
MODULE_PARM_DESC(rx_copybreak,
@@ -148,6 +153,8 @@ MODULE_PARM_DESC(rx_copybreak,
MODULE_PARM_DESC(options,
"DP8381x: Bits 0-3: media type, bit 17: full duplex");
MODULE_PARM_DESC(full_duplex, "DP8381x full duplex setting(s) (1)");
+MODULE_PARM_DESC(disable_phy_check, "DP8381[56]: PHY lockup check disable"
+ " (all boards)");
/*
Theory of Operation
@@ -1753,7 +1760,7 @@ static void netdev_timer(unsigned long data)
writew(1, ioaddr+PGSEL);
dspcfg = readw(ioaddr+DSPCFG);
writew(0, ioaddr+PGSEL);
- if (dspcfg != np->dspcfg) {
+ if (!disable_phy_check && dspcfg != np->dspcfg) {
if (!netif_queue_stopped(dev)) {
spin_unlock_irq(&np->lock);
if (netif_msg_hw(np))
--
1.5.0.6
----------------------------------------------------------------------
Zrob numer kumplom >> http://link.interia.pl/f1a5d
next prev parent reply other threads:[~2007-05-02 20:05 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-30 20:58 Natsemi DP83815 driver spaming Rafał Bilski
2007-05-01 3:55 ` Andrew Morton
2007-05-01 7:17 ` Rafał Bilski
2007-05-01 8:23 ` Rafał Bilski
2007-05-01 8:35 ` Andrew Morton
2007-05-01 10:40 ` Rafał Bilski
2007-05-01 8:46 ` Mark Brown
2007-05-01 10:25 ` Rafał Bilski
2007-05-01 18:08 ` Mark Brown
2007-05-01 19:10 ` Rafał Bilski
2007-05-01 19:52 ` Rafał Bilski
2007-05-01 21:27 ` Mark Brown
[not found] ` <b3ece790705011543gdca3a9ei905d3499b6c18dc8@mail.gmail.com>
2007-05-02 5:54 ` Rafał Bilski
[not found] ` <b3ece790705012303x1e5a2d03xddf6c14aec5a99d8@mail.gmail.com>
2007-05-02 6:34 ` Rafał Bilski
2007-05-02 6:51 ` Tim Hockin
2007-05-02 8:22 ` Mark Brown
[not found] ` <b3ece790705020744p2e73bb5fo2c0acad947a5de15@mail.gmail.com>
2007-05-02 20:05 ` Rafał Bilski [this message]
2007-05-02 20:48 ` Tim Hockin
2007-05-02 21:41 ` Mark Brown
2007-05-03 6:33 ` Rafał Bilski
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=4638EF0B.9050701@interia.pl \
--to=rafalbilski@interia.pl \
--cc=akpm@linux-foundation.org \
--cc=broonie@sirena.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=thockin@hockin.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