PERFORCE change 134816 for review
Kip Macy
kmacy at FreeBSD.org
Mon Feb 4 21:03:29 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=134816
Change 134816 by kmacy at kmacy:storage:toehead on 2008/02/05 05:02:47
allow users to get link status without bringing the interface up
Affected files ...
.. //depot/projects/toehead/sys/dev/cxgb/cxgb_main.c#5 edit
Differences ...
==== //depot/projects/toehead/sys/dev/cxgb/cxgb_main.c#5 (text+ko) ====
@@ -1119,9 +1119,6 @@
struct port_info *pi = &adapter->port[port_id];
struct cmac *mac = &adapter->port[port_id].mac;
- if ((pi->ifp->if_flags & IFF_UP) == 0)
- return;
-
if (link_status) {
t3_mac_enable(mac, MAC_DIRECTION_RX);
if_link_state_change(pi->ifp, LINK_STATE_UP);
@@ -1806,6 +1803,12 @@
break;
case SIOCSIFMEDIA:
case SIOCGIFMEDIA:
+ /*
+ * This is a convenient place to check the link status when
+ * no interfaces are up and thus the callout is not running
+ */
+ if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
+ cxgb_tick_handler(p->adapter, 0);
error = ifmedia_ioctl(ifp, ifr, &p->media, command);
break;
case SIOCSIFCAP:
More information about the p4-projects
mailing list