summaryrefslogtreecommitdiffstats
path: root/sys/dev/ar
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1995-12-05 02:01:59 +0000
committerdg <dg@FreeBSD.org>1995-12-05 02:01:59 +0000
commit8156a5707a8830d1ce5658e103e6780f22cfc8dd (patch)
tree85cbbd7c1e0b938f939f958fcf5fd93d4c5c5406 /sys/dev/ar
parentfd5819ba7c85b8236d4b1f4cc3340e673229a93a (diff)
downloadFreeBSD-src-8156a5707a8830d1ce5658e103e6780f22cfc8dd.zip
FreeBSD-src-8156a5707a8830d1ce5658e103e6780f22cfc8dd.tar.gz
all:
Removed ifnet.if_init and ifnet.if_reset as they are generally unused. Change the parameter passed to if_watchdog to be a ifnet * rather than a unit number. All of this is an attempt to move toward not needing an array of softc pointers (which is usually static in size) to point to the driver softc. if_ed.c: Changed some of the argument passing to some functions to make a little more sense. if_ep.c, if_vx.c: Killed completely bogus use of if_timer. It was being set in such a way that the interface was being reset once per second (blech!).
Diffstat (limited to 'sys/dev/ar')
-rw-r--r--sys/dev/ar/if_ar.c34
-rw-r--r--sys/dev/ar/if_ar_isa.c34
2 files changed, 16 insertions, 52 deletions
diff --git a/sys/dev/ar/if_ar.c b/sys/dev/ar/if_ar.c
index ce46405..10c923a 100644
--- a/sys/dev/ar/if_ar.c
+++ b/sys/dev/ar/if_ar.c
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ar.c,v 1.7 1995/11/16 20:16:34 jhay Exp $
+ * $Id: if_ar.c,v 1.1.1.1 1995/11/21 02:32:04 peter Exp $
*/
/*
@@ -201,8 +201,7 @@ static struct kern_devconf kdc_arc_template = {
void arstart(struct ifnet *ifp);
int arioctl(struct ifnet *ifp, int cmd, caddr_t data);
-void arwatchdog(int port_number);
-void arinit(int port_number);
+void arwatchdog(struct ifnet *ifp);
static void ar_up(struct ar_softc *sc);
static void ar_down(struct ar_softc *sc);
@@ -397,7 +396,6 @@ int arattach(struct isa_device *id)
ifp->if_ioctl = arioctl;
ifp->if_start = arstart;
ifp->if_watchdog = arwatchdog;
- ifp->if_init = arinit;
sc->ifsppp.pp_flags = PP_KEEPALIVE;
@@ -666,15 +664,15 @@ int arioctl(struct ifnet *ifp, int cmd, caddr_t data)
/*
* This is to catch lost tx interrupts.
*/
-void arwatchdog(int unit)
+void arwatchdog(struct ifnet *ifp)
{
- struct ar_softc *sc = ARUNIT2SC(unit);
+ struct ar_softc *sc = ARUNIT2SC(ifp->if_unit);
- if(!(sc->ifsppp.pp_if.if_flags & IFF_RUNNING))
+ if(!(ifp->if_flags & IFF_RUNNING))
return;
/* XXX if(sc->ifsppp.pp_if.if_flags & IFF_DEBUG) */
- printf("ar%d: transmit failed.\n", unit);
+ printf("ar%d: transmit failed.\n", ifp->if_unit);
ARC_SET_SCA(sc->hc->iobase, sc->scano);
sc->hc->sca->msci[sc->scachan].cmd = SCA_CMD_TXABORT;
@@ -682,9 +680,9 @@ void arwatchdog(int unit)
ar_down(sc);
ar_up(sc);
- sc->ifsppp.pp_if.if_flags &= ~IFF_OACTIVE;
+ ifp->if_flags &= ~IFF_OACTIVE;
- arstart(&sc->ifsppp.pp_if);
+ arstart(ifp);
}
static void ar_up(struct ar_softc *sc)
@@ -769,22 +767,6 @@ static void ar_down(struct ar_softc *sc)
}
/*
- * I don't think anything ever calls this function.
- */
-void arinit(int unit)
- {
- int s;
- struct ar_softc *sc = ARUNIT2SC(unit);
-
- printf("ar%d: OOPS, so somebody do call arinit!\n", unit);
-
- s = splimp();
- ar_down(sc);
- ar_up(sc);
- splx(s);
- }
-
-/*
* Initialize the card, allocate memory for the ar_softc structures
* and fill in the pointers.
*/
diff --git a/sys/dev/ar/if_ar_isa.c b/sys/dev/ar/if_ar_isa.c
index ce46405..10c923a 100644
--- a/sys/dev/ar/if_ar_isa.c
+++ b/sys/dev/ar/if_ar_isa.c
@@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_ar.c,v 1.7 1995/11/16 20:16:34 jhay Exp $
+ * $Id: if_ar.c,v 1.1.1.1 1995/11/21 02:32:04 peter Exp $
*/
/*
@@ -201,8 +201,7 @@ static struct kern_devconf kdc_arc_template = {
void arstart(struct ifnet *ifp);
int arioctl(struct ifnet *ifp, int cmd, caddr_t data);
-void arwatchdog(int port_number);
-void arinit(int port_number);
+void arwatchdog(struct ifnet *ifp);
static void ar_up(struct ar_softc *sc);
static void ar_down(struct ar_softc *sc);
@@ -397,7 +396,6 @@ int arattach(struct isa_device *id)
ifp->if_ioctl = arioctl;
ifp->if_start = arstart;
ifp->if_watchdog = arwatchdog;
- ifp->if_init = arinit;
sc->ifsppp.pp_flags = PP_KEEPALIVE;
@@ -666,15 +664,15 @@ int arioctl(struct ifnet *ifp, int cmd, caddr_t data)
/*
* This is to catch lost tx interrupts.
*/
-void arwatchdog(int unit)
+void arwatchdog(struct ifnet *ifp)
{
- struct ar_softc *sc = ARUNIT2SC(unit);
+ struct ar_softc *sc = ARUNIT2SC(ifp->if_unit);
- if(!(sc->ifsppp.pp_if.if_flags & IFF_RUNNING))
+ if(!(ifp->if_flags & IFF_RUNNING))
return;
/* XXX if(sc->ifsppp.pp_if.if_flags & IFF_DEBUG) */
- printf("ar%d: transmit failed.\n", unit);
+ printf("ar%d: transmit failed.\n", ifp->if_unit);
ARC_SET_SCA(sc->hc->iobase, sc->scano);
sc->hc->sca->msci[sc->scachan].cmd = SCA_CMD_TXABORT;
@@ -682,9 +680,9 @@ void arwatchdog(int unit)
ar_down(sc);
ar_up(sc);
- sc->ifsppp.pp_if.if_flags &= ~IFF_OACTIVE;
+ ifp->if_flags &= ~IFF_OACTIVE;
- arstart(&sc->ifsppp.pp_if);
+ arstart(ifp);
}
static void ar_up(struct ar_softc *sc)
@@ -769,22 +767,6 @@ static void ar_down(struct ar_softc *sc)
}
/*
- * I don't think anything ever calls this function.
- */
-void arinit(int unit)
- {
- int s;
- struct ar_softc *sc = ARUNIT2SC(unit);
-
- printf("ar%d: OOPS, so somebody do call arinit!\n", unit);
-
- s = splimp();
- ar_down(sc);
- ar_up(sc);
- splx(s);
- }
-
-/*
* Initialize the card, allocate memory for the ar_softc structures
* and fill in the pointers.
*/
OpenPOWER on IntegriCloud