svn commit: r194661 - head/sys/dev/cxgb
Navdeep Parhar
np at FreeBSD.org
Mon Jun 22 21:42:58 UTC 2009
Author: np
Date: Mon Jun 22 21:42:57 2009
New Revision: 194661
URL: http://svn.freebsd.org/changeset/base/194661
Log:
Fix cxgb's ifmedia ioctl handling. Also fixed a comment.
Reviewed by: kmacy
Approved by: gnn (mentor)
Modified:
head/sys/dev/cxgb/cxgb_main.c
Modified: head/sys/dev/cxgb/cxgb_main.c
==============================================================================
--- head/sys/dev/cxgb/cxgb_main.c Mon Jun 22 21:19:24 2009 (r194660)
+++ head/sys/dev/cxgb/cxgb_main.c Mon Jun 22 21:42:57 2009 (r194661)
@@ -2178,8 +2178,7 @@ cxgb_ioctl(struct ifnet *ifp, unsigned l
/*
* We don't want to call anything outside the driver while inside a
* begin-op/end-op block. If it calls us back (eg. ether_ioctl may
- * call cxgb_init), which is cxgb_init), we may deadlock if the state is
- * already marked busy.
+ * call cxgb_init) we may deadlock if the state is already marked busy.
*
* XXX: this probably opens a small race window with kldunload...
*/
@@ -2187,13 +2186,10 @@ cxgb_ioctl(struct ifnet *ifp, unsigned l
/* The IS_DOOMED check is racy, we're clutching at straws here */
if (handle_unsynchronized && !IS_DOOMED(p)) {
- switch (command) {
- case SIOCSIFMEDIA:
- case SIOCGIFMEDIA:
+ if (command == SIOCSIFMEDIA || command == SIOCGIFMEDIA)
error = ifmedia_ioctl(ifp, ifr, &p->media, command);
- default:
+ else
error = ether_ioctl(ifp, command, data);
- }
}
return (error);
More information about the svn-src-all
mailing list