From: "John W. Linville" <linville@tuxdriver.com>
To: linux-kernel@vger.kernel.org
Cc: netdev@oss.sgi.com, akpm@osdl.org, jgarzik@pobox.com,
Donald Becker <becker@scyld.com>,
marcelo.tosatti@cyclades.com
Subject: [patch 2.4.28-pre3] 3c59x: reload EEPROM values at rmmod for needy cards
Date: Fri, 8 Oct 2004 12:44:15 -0400 [thread overview]
Message-ID: <20041008124415.F14378@tuxdriver.com> (raw)
In-Reply-To: <20041007134601.B29517@tuxdriver.com>; from linville@tuxdriver.com on Thu, Oct 07, 2004 at 01:46:01PM -0400
Enable reload of EEPROM values in reset at rmmod for cards that need
it, similar to old EEPROM_NORESET flag but in reverse.
Signed-of-by: John W. Linville <linville@tuxdriver.com>
---
(Most?) 3c905 and (some?) 3c905B cards need an additional bit unmasked
in the reset at rmmod or else they don't get reinitialized properly when
the driver is reloaded.
drivers/net/3c59x.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
Please note that this depends on the "3c59x: resync with 2.6" patch
which I posted earlier today.
--- linux-2.4/drivers/net/3c59x.c.orig
+++ linux-2.4/drivers/net/3c59x.c
@@ -413,7 +413,7 @@ enum { IS_VORTEX=1, IS_BOOMERANG=2, IS_C
HAS_PWR_CTRL=0x20, HAS_MII=0x40, HAS_NWAY=0x80, HAS_CB_FNS=0x100,
INVERT_MII_PWR=0x200, INVERT_LED_PWR=0x400, MAX_COLLISION_RESET=0x800,
EEPROM_OFFSET=0x1000, HAS_HWCKSM=0x2000, WNO_XCVR_PWR=0x4000,
- EXTRA_PREAMBLE=0x8000, };
+ EXTRA_PREAMBLE=0x8000, EEPROM_RESET=0x10000, };
enum vortex_chips {
CH_3C590 = 0,
@@ -502,16 +502,16 @@ static struct vortex_chip_info {
{"3c900B-FL Cyclone 10base-FL",
PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, },
{"3c905 Boomerang 100baseTx",
- PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII, 64, },
+ PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_RESET, 64, },
{"3c905 Boomerang 100baseT4",
- PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII, 64, },
+ PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_RESET, 64, },
{"3c905B Cyclone 100baseTx",
- PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, },
+ PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE|EEPROM_RESET, 128, },
{"3c905B Cyclone 10/100/BNC",
- PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, },
+ PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EEPROM_RESET, 128, },
{"3c905B-FX Cyclone 100baseFx",
- PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, },
+ PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM|EEPROM_RESET, 128, },
{"3c905C Tornado",
PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, },
{"3c920B-EMB-WNM (ATI Radeon 9100 IGP)",
@@ -562,7 +562,7 @@ static struct vortex_chip_info {
{"3c982 Hydra Dual Port B",
PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_HWCKSM|HAS_NWAY, 128, },
{"3c905B-T4",
- PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, },
+ PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE|EEPROM_RESET, 128, },
{"3c920B-EMB-WNM Tornado",
PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, },
@@ -3091,7 +3091,8 @@ static void __devexit vortex_remove_one
pci_restore_state(VORTEX_PCI(vp), vp->power_state);
}
/* Should really use issue_and_wait() here */
- outw(TotalReset|0x14, dev->base_addr + EL3_CMD);
+ outw(TotalReset | ((vp->drv_flags & EEPROM_RESET) ? 0x04 : 0x14),
+ dev->base_addr + EL3_CMD);
pci_free_consistent(pdev,
sizeof(struct boom_rx_desc) * RX_RING_SIZE
next prev parent reply other threads:[~2004-10-08 16:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-28 18:54 [patch 2.6.9-rc2] 3c59x: do not mask reset of aism logic at rmmod John W. Linville
2004-09-29 17:16 ` Donald Becker
2004-09-30 13:14 ` John W. Linville
2004-10-07 17:46 ` John W. Linville
2004-10-08 16:39 ` [patch 2.6.9-rc3] 3c59x: reload EEPROM values at rmmod for needy cards John W. Linville
2004-10-15 19:33 ` Jeff Garzik
2004-10-15 21:12 ` Andrew Morton
2004-10-08 16:44 ` John W. Linville [this message]
2004-10-17 15:05 ` [patch 2.6.9-rc2] 3c59x: remove EEPROM_RESET for 3c905B John W. Linville
2004-10-17 15:20 ` [patch 2.4.28-pre3] " John W. Linville
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=20041008124415.F14378@tuxdriver.com \
--to=linville@tuxdriver.com \
--cc=akpm@osdl.org \
--cc=becker@scyld.com \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.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).