Netdev List
 help / color / mirror / Atom feed
From: "Bjørn Mork" <bjorn@mork.no>
To: netdev@vger.kernel.org
Cc: linux-usb@vger.kernel.org, "Greg Suarez" <gsuarez@smithmicro.com>,
	"Alexey Orishko" <alexey.orishko@stericsson.com>,
	"Oliver Neukum" <oneukum@suse.de>, "Bjørn Mork" <bjorn@mork.no>
Subject: [PATCH net 2/3] net: cdc_mbim: send ZLP after max sized NTBs
Date: Mon, 21 Jan 2013 16:50:39 +0100	[thread overview]
Message-ID: <1358783440-11459-3-git-send-email-bjorn@mork.no> (raw)
In-Reply-To: <1358783440-11459-1-git-send-email-bjorn@mork.no>

We normally avoid sending ZLPs by padding NTBs with a zero byte
if the NTB is shorter than dwNtbOutMaxSize, resulting in a short
USB packet instead of a ZLP.  But in the case where the NTB length
is exactly dwNtbOutMaxSize and this is an exact multiplum of
wMaxPacketSize, then we must send a ZLP.

This fixes an issue seen on a Sierra Wireless MC7710 device
where the transmission would fail whenever we ended up padding
the NTBs to max size.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
---
 drivers/net/usb/cdc_mbim.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/usb/cdc_mbim.c b/drivers/net/usb/cdc_mbim.c
index 42f51c7..3a5673a 100644
--- a/drivers/net/usb/cdc_mbim.c
+++ b/drivers/net/usb/cdc_mbim.c
@@ -366,7 +366,7 @@ err:
 
 static const struct driver_info cdc_mbim_info = {
 	.description = "CDC MBIM",
-	.flags = FLAG_NO_SETINT | FLAG_MULTI_PACKET | FLAG_WWAN,
+	.flags = FLAG_NO_SETINT | FLAG_MULTI_PACKET | FLAG_WWAN | FLAG_SEND_ZLP,
 	.bind = cdc_mbim_bind,
 	.unbind = cdc_mbim_unbind,
 	.manage_power = cdc_mbim_manage_power,
-- 
1.7.10.4

  parent reply	other threads:[~2013-01-21 15:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-21 15:50 [PATCH net 0/3] cdc_ncm and cdc_mbim fixes for 3.8 Bjørn Mork
2013-01-21 15:50 ` [PATCH net 1/3] net: cdc_ncm: workaround for missing CDC Union Bjørn Mork
2013-01-21 15:50 ` Bjørn Mork [this message]
     [not found]   ` <1358783440-11459-3-git-send-email-bjorn-yOkvZcmFvRU@public.gmane.org>
2013-01-21 16:31     ` [PATCH net 2/3] net: cdc_mbim: send ZLP after max sized NTBs Alexey ORISHKO
2013-01-21 22:36       ` Bjørn Mork
     [not found]       ` <2AC7D4AD8BA1C640B4C60C61C8E520154A8EE17D57-8ZTw5gFVCTjVH5byLeRTJxkTb7+GphCuwzqs5ZKRSiY@public.gmane.org>
2013-01-22  9:54         ` Bjørn Mork
2013-01-22 15:51           ` Alexey ORISHKO
2013-01-21 16:56     ` Yauheni Kaliuta
     [not found]       ` <87wqv64gr9.fsf-jZyLUQyd5ymekGDzARDqUg@public.gmane.org>
2013-01-21 22:01         ` Bjørn Mork
2013-01-22 17:16           ` Yauheni Kaliuta
     [not found] ` <1358783440-11459-1-git-send-email-bjorn-yOkvZcmFvRU@public.gmane.org>
2013-01-21 15:50   ` [PATCH net 3/3] net: cdc_ncm: fix error path for single interface probing Bjørn Mork
2013-01-22  8:58     ` Oliver Neukum
2013-01-22 10:32       ` Bjørn Mork
2013-01-21 19:22 ` [PATCH net 0/3] cdc_ncm and cdc_mbim fixes for 3.8 David Miller
2013-01-21 19:42   ` Alexey ORISHKO
2013-01-21 20:16     ` Bjørn Mork
2013-01-21 20:34       ` Alexey Orishko
2013-01-21 22:12         ` Bjørn Mork

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=1358783440-11459-3-git-send-email-bjorn@mork.no \
    --to=bjorn@mork.no \
    --cc=alexey.orishko@stericsson.com \
    --cc=gsuarez@smithmicro.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oneukum@suse.de \
    /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