Message ID | 20181012083405.19246-3-ben.dooks@codethink.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/8] usbnet: smsc95xx: fix rx packet alignment | expand |
Ben Dooks <ben.dooks@codethink.co.uk> writes: > Add a configuration option for the default state of turbo mode > on the smsc95xx networking driver. Some systems it is better > to default this to off as it causes significant increases in > soft-irq load. So there is already a module option allowing you to change this, using e.g kernel command line or kmod config files. It's even writable, taking effect on the next netdev open, so you can change it at runtime without reloading the module. What good does this new build-time setting do, except causing confusion wrt driver defaults? Note also that the smsc95xx and smsc75xx drivers are pretty similar. Both have the same turbo_mode setting. If you change the defaults, then they should at least be kept in sync to cause as little confusion as possible.. Bjørn
diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig index 418b0904cecb..c3ebc43a6582 100644 --- a/drivers/net/usb/Kconfig +++ b/drivers/net/usb/Kconfig @@ -351,6 +351,19 @@ config USB_NET_SMSC95XX This option adds support for SMSC LAN95XX based USB 2.0 10/100 Ethernet adapters. +config USB_NET_SMSC95XX_TURBO + bool "Use turbo receive mode by default" + depends on USB_NET_SMSC95XX + default y + help + This options sets the default turbo mode settings for the + driver's receive path. These can also be altered by the + turbo_mode module parameter. + + There are some systems where the turbo mode causes higher + soft-irq load, thus making it useful to default the option + off for these. + config USB_NET_GL620A tristate "GeneSys GL620USB-A based cables" depends on USB_USBNET diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index 401ec9feb495..cb19aea139d3 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -78,7 +78,7 @@ struct smsc95xx_priv { struct usbnet *dev; }; -static bool turbo_mode = true; +static bool turbo_mode = IS_ENABLED(CONFIG_USB_NET_SMSC95XX_TURBO); module_param(turbo_mode, bool, 0644); MODULE_PARM_DESC(turbo_mode, "Enable multiple frames per Rx transaction");
Add a configuration option for the default state of turbo mode on the smsc95xx networking driver. Some systems it is better to default this to off as it causes significant increases in soft-irq load. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> --- drivers/net/usb/Kconfig | 13 +++++++++++++ drivers/net/usb/smsc95xx.c | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-)