From: Ben Dooks <ben.dooks@codethink.co.uk>
To: netdev@vger.kernel.org
Cc: oneukum@suse.com, davem@davemloft.net, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-kernel@lists.codethink.co.uk,
Ben Dooks <ben.dooks@codethink.co.uk>
Subject: [PATCH 2/8] usbnet: smsc95xx: add kconfig for turbo mode
Date: Fri, 12 Oct 2018 09:33:59 +0100 [thread overview]
Message-ID: <20181012083405.19246-3-ben.dooks@codethink.co.uk> (raw)
In-Reply-To: <20181012083405.19246-1-ben.dooks@codethink.co.uk>
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(-)
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");
--
2.19.1
next prev parent reply other threads:[~2018-10-12 8:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-12 8:33 SMSC95XX updates for packet alignment and turbo mode (V2) Ben Dooks
2018-10-12 8:33 ` [PATCH 1/8] usbnet: smsc95xx: fix rx packet alignment Ben Dooks
2018-10-12 8:33 ` Ben Dooks [this message]
2018-10-15 12:48 ` [PATCH 2/8] usbnet: smsc95xx: add kconfig for turbo mode Bjørn Mork
2018-10-12 8:34 ` [PATCH 3/8] usbnet: smsc95xx: simplify tx_fixup code Ben Dooks
2018-10-12 8:34 ` [PATCH 4/8] usbnet: smsc95xx: check for csum being in last four bytes Ben Dooks
2018-10-12 8:34 ` [PATCH 5/8] usbnet: smsc95xx: align tx-buffer to word Ben Dooks
2018-10-12 8:34 ` [PATCH 6/8] usbnet: smsc95xx: fix memcpy for accessing rx-data Ben Dooks
2018-10-12 8:48 ` Sergei Shtylyov
2018-10-12 8:34 ` [PATCH 7/8] usbnet: smsc95xx: add usbnet -> priv function Ben Dooks
2018-10-12 8:34 ` [PATCH 8/8] usbnet: smsc95xx: add rx_turbo attribute Ben Dooks
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181012083405.19246-3-ben.dooks@codethink.co.uk \
--to=ben.dooks@codethink.co.uk \
--cc=davem@davemloft.net \
--cc=linux-kernel@lists.codethink.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oneukum@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox