netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 2.6.10-rc2] 3c59x: reload EEPROM values at rmmod for needy cards
@ 2004-11-17 21:01 John W. Linville
  2004-11-17 21:44 ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: John W. Linville @ 2004-11-17 21:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev, jgarzik, akpm

Enable reload of EEPROM values in reset at rmmod for cards that need
it, similar to old EEPROM_NORESET flag but in reverse.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
3c905 cards need an additional bit unmasked in the reset at rmmod or
else they don't get reinitialized properly when the driver is reloaded.

This is a repost -- the previous patch appears to have been lost
in the shuffle.  This is the combination of the two patches posted
previously regarding EEPROM_NORESET.

 drivers/net/3c59x.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

--- 3c59x-reset-2.6/drivers/net/3c59x.c.orig
+++ 3c59x-reset-2.6/drivers/net/3c59x.c
@@ -417,7 +417,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,
@@ -505,9 +505,9 @@ 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, },
 
@@ -3169,7 +3169,8 @@ static void __devexit vortex_remove_one 
 			pci_restore_state(VORTEX_PCI(vp));
 	}
 	/* 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch 2.6.10-rc2] 3c59x: reload EEPROM values at rmmod for needy cards
  2004-11-17 21:01 [patch 2.6.10-rc2] 3c59x: reload EEPROM values at rmmod for needy cards John W. Linville
@ 2004-11-17 21:44 ` Andrew Morton
  2004-11-18  1:21   ` John W. Linville
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2004-11-17 21:44 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-kernel, netdev, jgarzik

"John W. Linville" <linville@tuxdriver.com> wrote:
>
> 3c905 cards need an additional bit unmasked in the reset at rmmod or
> else they don't get reinitialized properly when the driver is reloaded.

This has been in -mm kernels since you first sent it out.  I'm intending to
hold off until post-2.6.10 so we get a full kernel cycle for any problems
to get shaken out.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch 2.6.10-rc2] 3c59x: reload EEPROM values at rmmod for needy cards
  2004-11-17 21:44 ` Andrew Morton
@ 2004-11-18  1:21   ` John W. Linville
  2004-11-28 17:36     ` Alan Cox
  0 siblings, 1 reply; 5+ messages in thread
From: John W. Linville @ 2004-11-18  1:21 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, netdev, jgarzik

On Wed, Nov 17, 2004 at 01:44:25PM -0800, Andrew Morton wrote:
> "John W. Linville" <linville@tuxdriver.com> wrote:
> >
> > 3c905 cards need an additional bit unmasked in the reset at rmmod or
> > else they don't get reinitialized properly when the driver is reloaded.
> 
> This has been in -mm kernels since you first sent it out.  I'm intending to
> hold off until post-2.6.10 so we get a full kernel cycle for any problems
> to get shaken out.

Cool...someone was asking for it in netdev-2.[46], and Jeff didn't
have it.  That is what provoked the resend.

Thanks for the update!

John
-- 
John W. Linville
linville@tuxdriver.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch 2.6.10-rc2] 3c59x: reload EEPROM values at rmmod for needy cards
  2004-11-18  1:21   ` John W. Linville
@ 2004-11-28 17:36     ` Alan Cox
  2004-11-28 19:06       ` Jeff Garzik
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Cox @ 2004-11-28 17:36 UTC (permalink / raw)
  To: John W. Linville
  Cc: Andrew Morton, Linux Kernel Mailing List, netdev, jgarzik

On Iau, 2004-11-18 at 01:21, John W. Linville wrote:
> On Wed, Nov 17, 2004 at 01:44:25PM -0800, Andrew Morton wrote:
> > This has been in -mm kernels since you first sent it out.  I'm intending to
> > hold off until post-2.6.10 so we get a full kernel cycle for any problems
> > to get shaken out.
> 
> Cool...someone was asking for it in netdev-2.[46], and Jeff didn't
> have it.  That is what provoked the resend.

Merged into -ac since you essentially can't use 3c59x/3c90x with DHCP on
some systems or get it back from suspend with several distributions.
This IMHO should go into 2.6.10 because its a showstopper for many
users. 

Alan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch 2.6.10-rc2] 3c59x: reload EEPROM values at rmmod for needy cards
  2004-11-28 17:36     ` Alan Cox
@ 2004-11-28 19:06       ` Jeff Garzik
  0 siblings, 0 replies; 5+ messages in thread
From: Jeff Garzik @ 2004-11-28 19:06 UTC (permalink / raw)
  To: Alan Cox; +Cc: John W. Linville, Andrew Morton, Linux Kernel Mailing List,
	netdev

Alan Cox wrote:
> On Iau, 2004-11-18 at 01:21, John W. Linville wrote:
> 
>>On Wed, Nov 17, 2004 at 01:44:25PM -0800, Andrew Morton wrote:
>>
>>>This has been in -mm kernels since you first sent it out.  I'm intending to
>>>hold off until post-2.6.10 so we get a full kernel cycle for any problems
>>>to get shaken out.
>>
>>Cool...someone was asking for it in netdev-2.[46], and Jeff didn't
>>have it.  That is what provoked the resend.
> 
> 
> Merged into -ac since you essentially can't use 3c59x/3c90x with DHCP on
> some systems or get it back from suspend with several distributions.
> This IMHO should go into 2.6.10 because its a showstopper for many
> users. 

Poke Andrew to push it upstream, he's the 3c59x maintainer.

	Jeff

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-11-28 19:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-17 21:01 [patch 2.6.10-rc2] 3c59x: reload EEPROM values at rmmod for needy cards John W. Linville
2004-11-17 21:44 ` Andrew Morton
2004-11-18  1:21   ` John W. Linville
2004-11-28 17:36     ` Alan Cox
2004-11-28 19:06       ` Jeff Garzik

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).