netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Łukasz Spintzyk" <lukasz.spintzyk@synaptics.com>
To: netdev@vger.kernel.org
Cc: oliver@neukum.org, ppd-posix@synaptics.com
Subject: [PATCH 1/2] net/cdc_ncm: Enable ZLP for DisplayLink ethernet devices
Date: Mon, 13 Jun 2022 10:02:34 +0200	[thread overview]
Message-ID: <20220613080235.15724-2-lukasz.spintzyk@synaptics.com> (raw)
In-Reply-To: <20220613080235.15724-1-lukasz.spintzyk@synaptics.com>

From: Dominik Czerwik <dominik.czerwik@synaptics.com>

This improves performance and stability of
DL-3xxx/DL-5xxx/DL-6xxx device series.

Signed-off-by: Dominik Czerwik <dominik.czerwik@synaptics.com>
Signed-off-by: Łukasz Spintzyk <lukasz.spintzyk@synaptics.com>
---
 drivers/net/usb/cdc_ncm.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index d55f59ce4a31..4594bf2982ee 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -2,6 +2,7 @@
  * cdc_ncm.c
  *
  * Copyright (C) ST-Ericsson 2010-2012
+ * Copyright (C) 2022 Synaptics Incorporated. All rights reserved.
  * Contact: Alexey Orishko <alexey.orishko@stericsson.com>
  * Original author: Hans Petter Selasky <hans.petter.selasky@stericsson.com>
  *
@@ -1904,6 +1905,19 @@ static const struct driver_info cdc_ncm_info = {
 	.set_rx_mode = usbnet_cdc_update_filter,
 };
 
+/* Same as cdc_ncm_info, but with FLAG_SEND_ZLP  */
+static const struct driver_info cdc_ncm_zlp_info = {
+	.description = "CDC NCM (SEND ZLP)",
+	.flags = FLAG_POINTTOPOINT | FLAG_NO_SETINT | FLAG_MULTI_PACKET
+			| FLAG_LINK_INTR | FLAG_ETHER | FLAG_SEND_ZLP,
+	.bind = cdc_ncm_bind,
+	.unbind = cdc_ncm_unbind,
+	.manage_power = usbnet_manage_power,
+	.status = cdc_ncm_status,
+	.rx_fixup = cdc_ncm_rx_fixup,
+	.tx_fixup = cdc_ncm_tx_fixup,
+};
+
 /* Same as cdc_ncm_info, but with FLAG_WWAN */
 static const struct driver_info wwan_info = {
 	.description = "Mobile Broadband Network Device",
@@ -2010,6 +2024,16 @@ static const struct usb_device_id cdc_devs[] = {
 	  .driver_info = (unsigned long)&wwan_info,
 	},
 
+	/* DisplayLink docking stations */
+	{ .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
+		| USB_DEVICE_ID_MATCH_VENDOR,
+	  .idVendor = 0x17e9,
+	  .bInterfaceClass = USB_CLASS_COMM,
+	  .bInterfaceSubClass = USB_CDC_SUBCLASS_NCM,
+	  .bInterfaceProtocol = USB_CDC_PROTO_NONE,
+	  .driver_info = (unsigned long)&cdc_ncm_zlp_info,
+	},
+
 	/* Generic CDC-NCM devices */
 	{ USB_INTERFACE_INFO(USB_CLASS_COMM,
 		USB_CDC_SUBCLASS_NCM, USB_CDC_PROTO_NONE),
-- 
2.36.1


  reply	other threads:[~2022-06-13  8:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13  8:02 [PATCH 0/2] DisplayLink USB-ethernet improvements Łukasz Spintzyk
2022-06-13  8:02 ` Łukasz Spintzyk [this message]
2022-06-13  8:02 ` [PATCH 2/2] net/cdc_ncm: Add ntb_max_rx,ntb_max_tx cdc_ncm module parameters Łukasz Spintzyk
2022-06-13 14:54   ` Oliver Neukum
2022-06-14  5:47     ` Lukasz Spintzyk
2022-06-14 10:24     ` Lukasz Spintzyk
2022-06-20  7:03       ` Lukasz Spintzyk
2022-06-24  8:56       ` Lukasz Spintzyk
  -- strict thread matches above, loose matches on Subject: below --
2022-07-04  7:04 [PATCH 0/2] DisplayLink USB-ethernet improvements Łukasz Spintzyk
2022-07-04  7:04 ` [PATCH 1/2] net/cdc_ncm: Enable ZLP for DisplayLink ethernet devices Łukasz Spintzyk
2022-07-04  7:25   ` Greg KH
2022-07-08  7:42     ` Lukasz Spintzyk

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=20220613080235.15724-2-lukasz.spintzyk@synaptics.com \
    --to=lukasz.spintzyk@synaptics.com \
    --cc=netdev@vger.kernel.org \
    --cc=oliver@neukum.org \
    --cc=ppd-posix@synaptics.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;
as well as URLs for NNTP newsgroup(s).