From patchwork Thu Dec 14 18:55:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Bj=C3=B8rn_Mork?= X-Patchwork-Id: 848747 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=mork.no header.i=@mork.no header.b="XL9nLhy+"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yyN7L6vB9z9s7B for ; Fri, 15 Dec 2017 05:55:58 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754162AbdLNSz4 (ORCPT ); Thu, 14 Dec 2017 13:55:56 -0500 Received: from canardo.mork.no ([148.122.252.1]:49175 "EHLO canardo.mork.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753811AbdLNSzz (ORCPT ); Thu, 14 Dec 2017 13:55:55 -0500 Received: from miraculix.mork.no (miraculix.mork.no [IPv6:2001:4641:0:2:7627:374e:db74:e353]) (authenticated bits=0) by canardo.mork.no (8.15.2/8.15.2) with ESMTPSA id vBEItrXU020061 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 14 Dec 2017 19:55:53 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=b; t=1513277753; bh=i1La8Zn+PAAQ54fjom0bqUo/yGXKj8lWtNQwZLerh+w=; h=From:To:Cc:Subject:Date:Message-Id:From; b=XL9nLhy+hvO89qBIGlQH0OL6veqiT2jTC5zd40pIdd4ETS2ZTRgVdRzQp/SKqBubP SLnGi1mFIBBQBWDXRLwVrUdY3G8B5oLSnvOf7gBrEsESBA6EXkHU24u9w7KoOD9leh fJAcD78w/LdBvvOQWG9Q4mTqEWUFgZKVjmb30ehI= Received: from bjorn by miraculix.mork.no with local (Exim 4.89) (envelope-from ) id 1ePYfh-00047E-HT; Thu, 14 Dec 2017 19:55:53 +0100 From: =?utf-8?q?Bj=C3=B8rn_Mork?= To: netdev@vger.kernel.org Cc: linux-usb@vger.kernel.org, =?utf-8?q?Bj=C3=B8rn_Mork?= Subject: [PATCH net-next] qmi_wwan: set FLAG_SEND_ZLP to avoid network initiated disconnect Date: Thu, 14 Dec 2017 19:55:50 +0100 Message-Id: <20171214185550.15779-1-bjorn@mork.no> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at canardo X-Virus-Status: Clean Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org It has been reported that the dummy byte we add to avoid ZLPs can be forwarded by the modem to the PGW/GGSN, and that some operators will drop the connection if this happens. In theory, QMI devices are based on CDC ECM and should as such both support ZLPs and silently ignore the dummy byte. The latter assumption failed. Let's test out the first. Signed-off-by: Bjørn Mork --- I am a bit worried about the effect of this change on all the devices I can't test myself. But trying it is the only way we can ever find out.... drivers/net/usb/qmi_wwan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index 304ec6555cd8..1ed00519f29e 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c @@ -826,7 +826,7 @@ static int qmi_wwan_resume(struct usb_interface *intf) static const struct driver_info qmi_wwan_info = { .description = "WWAN/QMI device", - .flags = FLAG_WWAN, + .flags = FLAG_WWAN | FLAG_SEND_ZLP, .bind = qmi_wwan_bind, .unbind = qmi_wwan_unbind, .manage_power = qmi_wwan_manage_power, @@ -835,7 +835,7 @@ static const struct driver_info qmi_wwan_info = { static const struct driver_info qmi_wwan_info_quirk_dtr = { .description = "WWAN/QMI device", - .flags = FLAG_WWAN, + .flags = FLAG_WWAN | FLAG_SEND_ZLP, .bind = qmi_wwan_bind, .unbind = qmi_wwan_unbind, .manage_power = qmi_wwan_manage_power,