Date: Mon, 22 Jun 2009 21:42:57 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r194661 - head/sys/dev/cxgb Message-ID: <200906222142.n5MLgvES053591@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906222142.n5MLgvES053591>