summaryrefslogtreecommitdiffstats
path: root/sys/dev/cm
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2003-10-30 19:45:58 +0000
committerbrooks <brooks@FreeBSD.org>2003-10-30 19:45:58 +0000
commit38e31120fcd40193d407e469c46607ecc302ab68 (patch)
tree7d01fdeb4d415c1bae5c7bd03a9a32e71d3a786d /sys/dev/cm
parent24760267308bc1cdadffe3933510627f1a8ebec9 (diff)
downloadFreeBSD-src-38e31120fcd40193d407e469c46607ecc302ab68.zip
FreeBSD-src-38e31120fcd40193d407e469c46607ecc302ab68.tar.gz
There is no way to enter the attach routine twice with the same softc
without a detach call in between so don't try to deal with that possiability. This is a diff-reduction commit for the upcoming if_xname conversion.
Diffstat (limited to 'sys/dev/cm')
-rw-r--r--sys/dev/cm/smc90cx6.c40
1 files changed, 19 insertions, 21 deletions
diff --git a/sys/dev/cm/smc90cx6.c b/sys/dev/cm/smc90cx6.c
index 82f4ea7..ff4bfe9 100644
--- a/sys/dev/cm/smc90cx6.c
+++ b/sys/dev/cm/smc90cx6.c
@@ -312,34 +312,32 @@ cm_attach(sc, unit)
*/
cm_stop(sc);
- if (!ifp->if_name) {
- ifp->if_softc = sc;
- ifp->if_unit = unit;
- ifp->if_name = "cm";
- ifp->if_output = arc_output;
- ifp->if_start = cm_start;
- ifp->if_ioctl = cm_ioctl;
- ifp->if_watchdog = cm_watchdog;
- ifp->if_init = cm_init;
- /* XXX IFQ_SET_READY(&ifp->if_snd); */
- ifp->if_snd.ifq_maxlen = IFQ_MAXLEN;
- ifp->if_timer = 0;
- ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX;
-
- arc_ifattach(ifp, linkaddress);
+ ifp->if_softc = sc;
+ ifp->if_unit = unit;
+ ifp->if_name = "cm";
+ ifp->if_output = arc_output;
+ ifp->if_start = cm_start;
+ ifp->if_ioctl = cm_ioctl;
+ ifp->if_watchdog = cm_watchdog;
+ ifp->if_init = cm_init;
+ /* XXX IFQ_SET_READY(&ifp->if_snd); */
+ ifp->if_snd.ifq_maxlen = IFQ_MAXLEN;
+ ifp->if_timer = 0;
+ ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX;
+
+ arc_ifattach(ifp, linkaddress);
#ifdef CMSOFTCOPY
- sc->sc_rxcookie = softintr_establish(IPL_SOFTNET, cm_srint, sc);
- sc->sc_txcookie = softintr_establish(IPL_SOFTNET,
- (void (*)(void *))cm_start, ifp);
+ sc->sc_rxcookie = softintr_establish(IPL_SOFTNET, cm_srint, sc);
+ sc->sc_txcookie = softintr_establish(IPL_SOFTNET,
+ (void (*)(void *))cm_start, ifp);
#endif
#if __FreeBSD_version < 500000
- callout_init(&sc->sc_recon_ch);
+ callout_init(&sc->sc_recon_ch);
#else
- callout_init(&sc->sc_recon_ch, 0);
+ callout_init(&sc->sc_recon_ch, 0);
#endif
- }
if_printf(ifp, "link addr 0x%02x (%d)\n", linkaddress, linkaddress);
return 0;
OpenPOWER on IntegriCloud