]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r329295:
authorrpokala <rpokala@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 22 Feb 2018 19:40:03 +0000 (19:40 +0000)
committerrpokala <rpokala@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 22 Feb 2018 19:40:03 +0000 (19:40 +0000)
commit478988d0eea5ff4847a23108ed0f23688b8fddb0
tree826474f6bd423f4e613434e29c82eeea9bcaa5b1
parent365e0d9ee636788a1bd6608ec49e8c85f60258bf
MFC r329295:

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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@329834 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/mxge/if_mxge.c