mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-16 15:11:52 +00:00
Fix cxgb's ifmedia ioctl handling. Also fixed a comment.
Reviewed by: kmacy Approved by: gnn (mentor)
This commit is contained in:
parent
fa057b15bd
commit
16daf36814
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=194661
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user