From: Roger Luethi <rl@hellgate.ch>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Andrew Morton <akpm@osdl.org>, netdev@oss.sgi.com
Subject: Re: [9/9][PATCH 2.6] Restructure reset code
Date: Wed, 2 Jun 2004 22:30:26 +0200 [thread overview]
Message-ID: <20040602203026.GB31791@k3.hellgate.ch> (raw)
In-Reply-To: <40BE2DE0.4040102@pobox.com>
On Wed, 02 Jun 2004 15:43:28 -0400, Jeff Garzik wrote:
> Roger Luethi wrote:
> >Restructure code to make it easier to maintain.
> >
> >rhine_hw_init: resets chip, reloads eeprom
> >rhine_chip_reset: chip reset + what used to be wait_for_reset
> >rhine_reload_eeprom: reload eeprom, re-enable MMIO, disable
> >EEPROM-controlled
> > WOL
> >
> >Note: Chip reset clears a bunch of registers that should be reloaded
> >from EEPROM (which turns off MMIO). Deal with that later.
>
>
> Rejected, two reasons:
>
> 1) dev->dev_addr[] should be loaded from eeprom only once, at probe
> time, not once for each hw init. [this value should be written to the
> chip's MAC address registers upon each dev->open() call]
We are in violent agreement, you are describing what the driver
does with and without patch 9 (unless I seriously botched the
splitting). Incidentally, rhine_hw_init gets called only once, at probe
time (further calls are to rhine_chip_reset).
The remaining problem with the reset stuff is this: Years ago, soft
resets were added to via-rhine in the vain hope it would fix something,
but soft resets overwrite some registers that need to be reloaded
from somewhere (it's more than just the MAC address). The proper fix
for this is to remove unnecessary soft resets (i.e. all but the one at
probe time) and/or restore the registers affected by a soft reset. But
that would go beyond a simple clean-up patch.
> 2) Your "Note:" worries me... why not deal with this now? :)
Mainly because I don't have all the information needed to positively
determine the proper solution -- not yet. "Dealing with it" will likely
mean removing two soft reset calls and documenting registers that are
clobbered by soft reset (just in case), but that doesn't fit into a
clean-up patch anyway.
In summary, patch 9 is simply what all conceivable solutions have in
common -- code clean-up.
Thanks for the review.
Roger
next prev parent reply other threads:[~2004-06-02 20:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-02 11:57 [0/9][2.6] via-rhine patches Roger Luethi
2004-06-02 11:57 ` [1/9][PATCH 2.6] Nuke HAS_IP_COPYSUM Roger Luethi
2004-06-02 11:58 ` [2/9][PATCH 2.6] Nuke CanHaveMII and related code Roger Luethi
2004-06-02 11:58 ` [3/9][PATCH 2.6] Nuke HasESIPhy " Roger Luethi
2004-06-02 11:58 ` [4/9][PATCH 2.6] Nuke default_port, references to if_port, medialock Roger Luethi
2004-06-02 11:58 ` [5/9][PATCH 2.6] Nuke all pci_flags Roger Luethi
2004-06-02 11:58 ` [6/9][PATCH 2.6] Return codes for rhine_init_one Roger Luethi
2004-06-02 11:59 ` [7/9][PATCH 2.6] Rewrite special-casing Roger Luethi
2004-06-02 11:59 ` [8/9][PATCH 2.6] Add rhine_power_init(): get power regs into sane state Roger Luethi
2004-06-02 11:59 ` [9/9][PATCH 2.6] Restructure reset code Roger Luethi
2004-06-02 19:41 ` Jeff Garzik
[not found] ` <40BE2DE0.4040102@pobox.com>
2004-06-02 20:30 ` Roger Luethi [this message]
2004-06-14 10:03 ` Roger Luethi
2004-06-14 10:40 ` Andrew Morton
2004-06-14 11:00 ` Roger Luethi
[not found] ` <40BE2A90.7020508@pobox.com>
2004-06-02 19:53 ` [0/9][2.6] via-rhine patches Roger Luethi
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=20040602203026.GB31791@k3.hellgate.ch \
--to=rl@hellgate.ch \
--cc=akpm@osdl.org \
--cc=jgarzik@pobox.com \
--cc=netdev@oss.sgi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).