diff options
author | np <np@FreeBSD.org> | 2009-06-22 21:42:57 +0000 |
---|---|---|
committer | np <np@FreeBSD.org> | 2009-06-22 21:42:57 +0000 |
commit | a7cd46d35bbfe8ceabd7a9ed915c1cf409482d76 (patch) | |
tree | df16cb87670e88d16eeaf8e6825c10aaa7c69653 /sys/dev | |
parent | f9dfbad808b360c76d6758d52b8cdd230ed209e1 (diff) | |
download | FreeBSD-src-a7cd46d35bbfe8ceabd7a9ed915c1cf409482d76.zip FreeBSD-src-a7cd46d35bbfe8ceabd7a9ed915c1cf409482d76.tar.gz |
Fix cxgb's ifmedia ioctl handling. Also fixed a comment.
Reviewed by: kmacy
Approved by: gnn (mentor)
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/cxgb/cxgb_main.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/dev/cxgb/cxgb_main.c b/sys/dev/cxgb/cxgb_main.c index 49582e7..0ea04c5 100644 --- a/sys/dev/cxgb/cxgb_main.c +++ b/sys/dev/cxgb/cxgb_main.c @@ -2178,8 +2178,7 @@ cxgb_ioctl(struct ifnet *ifp, unsigned long command, caddr_t data) /* * 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 long command, caddr_t data) /* 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); |