diff options
author | kmacy <kmacy@FreeBSD.org> | 2008-03-20 05:35:02 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2008-03-20 05:35:02 +0000 |
commit | 8b4fc7299f2f63fdb3ed646bbed861ebd732ff61 (patch) | |
tree | 27d36d9b7bdb7ca52c4c4be431d6f3c5b0786226 /lib/libfetch/fetch.h | |
parent | 931fe00266bd83e9259e862caa11c5cc72be49dd (diff) | |
download | FreeBSD-src-8b4fc7299f2f63fdb3ed646bbed861ebd732ff61.zip FreeBSD-src-8b4fc7299f2f63fdb3ed646bbed861ebd732ff61.tar.gz |
Don't re-initialize the interface if it is already running.
This one line change makes the following code found in many ethernet device drivers
(at least em, igb, ixgbe, and cxgb) gratuitous
case SIOCSIFADDR:
if (ifa->ifa_addr->sa_family == AF_INET) {
/*
* XXX
* Since resetting hardware takes a very long time
* and results in link renegotiation we only
* initialize the hardware only when it is absolutely
* required.
*/
ifp->if_flags |= IFF_UP;
if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
EM_CORE_LOCK(adapter);
em_init_locked(adapter);
EM_CORE_UNLOCK(adapter);
}
arp_ifinit(ifp, ifa);
} else
error = ether_ioctl(ifp, command, data);
break;
Diffstat (limited to 'lib/libfetch/fetch.h')
0 files changed, 0 insertions, 0 deletions