Subject: Re: ex0 driver trouble in -current
To: None <feico@pasta.cs.uit.no>
From: Masanori Kanaoka <kanaoka@ann.hi-ho.ne.jp>
List: current-users
Date: 04/21/2001 00:45:05
Hi,

   Subject: Re: ex0 driver trouble in -current
Message-ID: <20010420161307.F12888@pasta.cs.uit.no>

$ Hmmm, can it be that with the added support for PCMCIA cards in that
$ driver and with that power-save support, that also the PCI cards are
$ put into sleep, when the system goes into sleep mode? 

I wrote power-save code for ex_cardbus. I test next cards.

	3Com	3C905C-TX	PCI
 	3Com	3CXFE575BT	CardBus
 	3Com	3CCFE575CT	CardBus

It works fine for me. Now I read Mail with 3CCFE575CTCT.
My CVS server have next ex PCI card, it also work fine. 

 ex0 at pci0 dev 11 function 0: 3Com 3c905C-TX 10/100 Ethernet with mngmt (rev. 0x74)
 ex0: interrupting at irq 9
 ex0: MAC address 00:01:02:49:7e:2b
 ukphy0 at ex0 phy 24: Generic IEEE 802.3u media interface
 ukphy0: OUI 0x001018, model 0x0017, rev. 6
 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto

But I scour my patch. I doubt two points.

I don't know whether next patch is useful for you or not.
Would you please try next patch?

Regards! 
---
 Masanori Kanaoka	kanaoka@ann.hi-ho.ne.jp

Index: sys/dev/ic/elinkxl.c
===================================================================
RCS file: /ftp/cvs/syssrc/sys/dev/ic/elinkxl.c,v
retrieving revision 1.47
diff -u -r1.47 elinkxl.c
--- sys/dev/ic/elinkxl.c	2001/01/30 19:27:39	1.47
+++ sys/dev/ic/elinkxl.c	2001/04/20 14:50:38
@@ -1110,7 +1110,7 @@
 	int ret = 0;
 	struct ifnet *ifp = &sc->sc_ethercom.ec_if;
 
-	if ((ifp->if_flags & IFF_RUNNING) == 0 ||
+	if (sc->enabled == 0 ||
 	    (sc->sc_dev.dv_flags & DVF_ACTIVE) == 0)
 		return (0);
 
Index: sys/dev/pci/if_ex_pci.c
===================================================================
RCS file: /ftp/cvs/syssrc/sys/dev/pci/if_ex_pci.c,v
retrieving revision 1.15
diff -u -r1.15 if_ex_pci.c
--- sys/dev/pci/if_ex_pci.c	2000/12/28 22:59:13	1.15
+++ sys/dev/pci/if_ex_pci.c	2001/04/20 15:17:05
@@ -246,6 +246,7 @@
 
 	sc->enable = NULL;
 	sc->disable = NULL;
+	sc->power = NULL;
 	sc->enabled = 1;
 
 	sc->sc_dmat = pa->pa_dmat;