diff options
author | Ravi Pokala <rpokala@FreeBSD.org> | 2018-02-15 03:22:04 +0000 |
---|---|---|
committer | Ravi Pokala <rpokala@FreeBSD.org> | 2018-02-15 03:22:04 +0000 |
commit | c756fb6ebbdac854916fb08524d68d871f1f888c (patch) | |
tree | 323ee0fd510cfd35365dda45d5ae50c70034f16c /sys/dev/mxge/if_mxge.c | |
parent | a07d59d1daafdaae0d1b1ad1f977f9eda92dc83b (diff) | |
download | src-c756fb6ebbdac854916fb08524d68d871f1f888c.tar.gz src-c756fb6ebbdac854916fb08524d68d871f1f888c.zip |
mxge(4) should pass unhandled ioctls to ether_ioctl()
Panasas discovered that ioctl(SIOCGLAGGPORT) returns ENOTTY for mxge(4) when
the NIC is not a member of a lagg. This came as a surprise, because the
SIOCGLAGGPORT handler in if_lagg.c only returns ENOENT (if run against the
laggX interface, rather than a physical port) or EINVAL (if run against a
non-member physical port). This behavior was not seen with other drivers,
such as bge(4), igb(4), and cxl(4). When I compared their respective ioctl
handlers, I found that they all called ether_ioctl() for the default (i.e.
unhandled) case; by contrast, mxge(4) only calls ether_ioctl() for two
specific cases, and returns ENOTTY for the default case.
Remove the two cases which explicitly call ether_ioctl(), and let the
default case call it instead. This matches what the vast majority of the NIC
drivers do.
Reviewed by: kmacy
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D14381
Notes
Notes:
svn path=/head/; revision=329295
Diffstat (limited to 'sys/dev/mxge/if_mxge.c')
-rw-r--r-- | sys/dev/mxge/if_mxge.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/dev/mxge/if_mxge.c b/sys/dev/mxge/if_mxge.c index edd5ff3a972f..70a8ce2d6ce1 100644 --- a/sys/dev/mxge/if_mxge.c +++ b/sys/dev/mxge/if_mxge.c @@ -4162,11 +4162,6 @@ mxge_ioctl(struct ifnet *ifp, u_long command, caddr_t data) err = 0; switch (command) { - case SIOCSIFADDR: - case SIOCGIFADDR: - err = ether_ioctl(ifp, command, data); - break; - case SIOCSIFMTU: err = mxge_change_mtu(sc, ifr->ifr_mtu); break; @@ -4290,7 +4285,8 @@ mxge_ioctl(struct ifnet *ifp, u_long command, caddr_t data) break; default: - err = ENOTTY; + err = ether_ioctl(ifp, command, data); + break; } return err; } |