From: Manfred Spraul <manfred@colorfullife.com>
To: Carl-Daniel Hailfinger <c-d.hailfinger.kernel.2004@gmx.net>
Cc: Brian Lazara <blazara@nvidia.com>,
Christoph Hellwig <hch@infradead.org>,
Andrew de Quincey <adq@lidskialf.net>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] new device support for forcedeth.c second try
Date: Sat, 19 Jun 2004 18:18:32 +0200 [thread overview]
Message-ID: <40D46758.10304@colorfullife.com> (raw)
In-Reply-To: <40D43DC3.9000909@gmx.net>
Carl-Daniel Hailfinger wrote:
>Hi,
>
>Brian, thank you very much for contributing to forcedeth.
>
I agree, thanks a lot.
> NvRegOffloadConfig = 0x90,
> #define NVREG_OFFLOAD_HOMEPHY 0x601
>-#define NVREG_OFFLOAD_NORMAL 0x5ee
>+#define NVREG_OFFLOAD_NORMAL RX_NIC_BUFSIZE
>
>
Interesting - does that explain why VLAN doesn't work properly? I have a
report that maximum sized packets are rejected.
>+ struct {
>+ u32 Length:14;
>+ u32 Flags:18;
>+ } v2;
>
>
Bitfields for hw access are evil, it caused problems before. I'd prefer
a macro with explicit shifts.
>+
>+ //wait for 500ms
>+ mdelay(500);
>
>
Waiting for phy reset is also evil - it should be done either in a
separate thread or asynchroneously. Not urgent, we can fix it later.
>+
>+ // check auto negotiation is complete
>+ mii_status = mii_rw(dev, np->phyaddr, MII_BMSR, MII_READ);
>+ while (!(mii_status & BMSR_ANEGCOMPLETE)) {
>+ udelay(NV_MIIBUSY_DELAY);
>+ mii_status = mii_rw(dev, np->phyaddr, MII_BMSR, MII_READ);
>+ microseconds++;
>+ if (microseconds == 20) {
>+ microseconds = 0;
>+ milliseconds++;
>+ }
>+ if (milliseconds > 1200) {
>+ printk(KERN_INFO "%s: phy init failed to autoneg.\n", dev->name);
>+ return PHY_TIMEOUT;
>+ }
>
>
Dito.
The phy code needs a big rewrite and support for ethtool anyway. I'd
propose to merge the patch after removing the bitfields - everything
else looks good. Perhaps there is a bit too much code duplication with
the v1/v2 functions, but that's also not fatal.
--
Manfred
next prev parent reply other threads:[~2004-06-19 16:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-19 13:21 [PATCH] new device support for forcedeth.c second try Carl-Daniel Hailfinger
2004-06-19 13:55 ` Francois Romieu
2004-06-19 14:15 ` Bartlomiej Zolnierkiewicz
2004-06-19 14:35 ` Carl-Daniel Hailfinger
2004-06-19 14:56 ` Bartlomiej Zolnierkiewicz
2004-06-19 15:08 ` Francois Romieu
2004-06-19 16:18 ` Manfred Spraul [this message]
2004-06-19 16:50 ` Carl-Daniel Hailfinger
2004-06-19 16:56 ` Christoph Hellwig
2004-06-21 3:06 ` [PATCH] new device support for forcedeth.c third try Carl-Daniel Hailfinger
-- strict thread matches above, loose matches on Subject: below --
2004-06-21 17:10 [PATCH] new device support for forcedeth.c second try Brian Lazara
2004-06-21 17:36 ` Carl-Daniel Hailfinger
2004-06-21 19:00 ` Kalin KOZHUHAROV
2004-06-21 19:48 ` Carl-Daniel Hailfinger
2004-06-21 21:38 ` Kalin KOZHUHAROV
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=40D46758.10304@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=adq@lidskialf.net \
--cc=blazara@nvidia.com \
--cc=c-d.hailfinger.kernel.2004@gmx.net \
--cc=hch@infradead.org \
--cc=linux-kernel@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