From 4b14416350eb49d0daf51637086fc0e34cbb3f11 Mon Sep 17 00:00:00 2001 From: Doug Ambrisko Date: Wed, 12 Jul 2006 23:13:09 +0000 Subject: [PATCH] Fix ifconfig up when the HW was down. If the driver isn't running then we need to call init otherwise just start the rx. Interestingly dhclient seemed to work but ifconfig didn't for me. Reviewed by: jhb --- sys/dev/bce/if_bce.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c index 45b6c14e112..da63eaf4385 100644 --- a/sys/dev/bce/if_bce.c +++ b/sys/dev/bce/if_bce.c @@ -4853,8 +4853,13 @@ bce_ioctl(struct ifnet *ifp, u_long command, caddr_t data) /* Check if the interface is up. */ if (ifp->if_flags & IFF_UP) { - /* Change the promiscuous/multicast flags as necessary. */ - bce_set_rx_mode(sc); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + /* Change the promiscuous/multicast flags as necessary. */ + bce_set_rx_mode(sc); + } else { + /* Start the HW */ + bce_init_locked(sc); + } } else { /* The interface is down. Check if the driver is running. */ if (ifp->if_drv_flags & IFF_DRV_RUNNING) {