Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F152723394
D55728.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D55728.diff
View Options
diff --git a/sys/dev/rge/if_rge.c b/sys/dev/rge/if_rge.c
--- a/sys/dev/rge/if_rge.c
+++ b/sys/dev/rge/if_rge.c
@@ -959,29 +959,24 @@
case SIOCSIFFLAGS:
RGE_LOCK(sc);
if ((if_getflags(ifp) & IFF_UP) != 0) {
- if ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) == 0) {
- /*
- * TODO: handle promisc/iffmulti changing
- * without reprogramming everything.
- */
+ if ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) != 0) {
+ if (((if_getflags(ifp) ^ sc->rge_if_flags)
+ & (IFF_PROMISC | IFF_ALLMULTI)) != 0)
+ rge_iff_locked(sc);
+ } else
rge_init_locked(sc);
- } else {
- /* Reinit promisc/multi just in case */
- rge_iff_locked(sc);
- }
} else {
- if ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) != 0) {
+ if ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) != 0)
rge_stop_locked(sc);
- }
}
+ sc->rge_if_flags = if_getflags(ifp);
RGE_UNLOCK(sc);
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
RGE_LOCK(sc);
- if ((if_getflags(ifp) & IFF_DRV_RUNNING) != 0) {
+ if ((if_getflags(ifp) & IFF_DRV_RUNNING) != 0)
rge_iff_locked(sc);
- }
RGE_UNLOCK(sc);
break;
case SIOCGIFMEDIA:
diff --git a/sys/dev/rge/if_rgevar.h b/sys/dev/rge/if_rgevar.h
--- a/sys/dev/rge/if_rgevar.h
+++ b/sys/dev/rge/if_rgevar.h
@@ -200,6 +200,8 @@
#define RGE_IMTYPE_SIM 1
int sc_watchdog;
+ int rge_if_flags;
+
uint32_t sc_debug;
struct rge_drv_stats sc_drv_stats;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 17, 5:21 PM (6 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31671545
Default Alt Text
D55728.diff (1 KB)
Attached To
Mode
D55728: rge: handle interface flags changes
Attached
Detach File
Event Timeline
Log In to Comment