diff options
author | ambrisko <ambrisko@FreeBSD.org> | 2006-07-12 23:13:09 +0000 |
---|---|---|
committer | ambrisko <ambrisko@FreeBSD.org> | 2006-07-12 23:13:09 +0000 |
commit | d49c8aec47f9333c0b7fa3cb2790bbe28aa72e87 (patch) | |
tree | 1ea7f56e9ef2d9cd7bd3b070b1bee360ff68549a /sys/dev/bce | |
parent | df5fe093b16e23340080adbd217dbf424b9356fb (diff) | |
download | FreeBSD-src-d49c8aec47f9333c0b7fa3cb2790bbe28aa72e87.zip FreeBSD-src-d49c8aec47f9333c0b7fa3cb2790bbe28aa72e87.tar.gz |
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 <IP> didn't
for me.
Reviewed by: jhb
Diffstat (limited to 'sys/dev/bce')
-rw-r--r-- | sys/dev/bce/if_bce.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c index 45b6c14..da63eaf 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) { |