Mon, Apr 11, 2016 at 10:09:57AM CEST, [email protected] wrote:
>This patch introduces trace-gathering facility via ioctl.
>This data is useful for debugging this module and firmware.
>
>Signed-off-by: Taku Izumi <[email protected]>
<snip>
>@@ -61,6 +62,7 @@ fjes_get_stats64(struct net_device *, struct
>rtnl_link_stats64 *);
> static int fjes_change_mtu(struct net_device *, int);
> static int fjes_vlan_rx_add_vid(struct net_device *, __be16 proto, u16);
> static int fjes_vlan_rx_kill_vid(struct net_device *, __be16 proto, u16);
>+static int fjes_ioctl(struct net_device *, struct ifreq *, int cmd);
> static void fjes_tx_retry(struct net_device *);
>
> static int fjes_acpi_add(struct acpi_device *);
>@@ -242,6 +244,7 @@ static const struct net_device_ops fjes_netdev_ops = {
> .ndo_tx_timeout = fjes_tx_retry,
> .ndo_vlan_rx_add_vid = fjes_vlan_rx_add_vid,
> .ndo_vlan_rx_kill_vid = fjes_vlan_rx_kill_vid,
>+ .ndo_do_ioctl = fjes_ioctl,
> };
<snip>
>+
>+static int fjes_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd)
>+{
>+ switch (cmd) {
>+ case FJES_IOCTL_TRACE_START:
>+ return fjes_ioctl_trace_start(netdev, rq);
>+ case FJES_IOCTL_TRACE_STOP:
>+ return fjes_ioctl_trace_stop(netdev, rq);
>+ case FJES_IOCTL_TRACE_GETCFG:
>+ return fjes_ioctl_trace_getcfg(netdev, rq);
>+ default:
>+ return -EOPNOTSUPP;
>+ }
>+}
This ioctl tracing patch looks scarry to me. I don't think you should
add any functionality to ioctl today.