From patchwork Fri Dec 28 15:15:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniele Palmas X-Patchwork-Id: 10744495 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D7E6591E for ; Fri, 28 Dec 2018 15:16:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C9B0428BA6 for ; Fri, 28 Dec 2018 15:16:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD81D28BAA; Fri, 28 Dec 2018 15:16:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7521D28BA6 for ; Fri, 28 Dec 2018 15:16:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731418AbeL1PQC (ORCPT ); Fri, 28 Dec 2018 10:16:02 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:37507 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727178AbeL1PQC (ORCPT ); Fri, 28 Dec 2018 10:16:02 -0500 Received: by mail-wr1-f68.google.com with SMTP id s12so21159416wrt.4 for ; Fri, 28 Dec 2018 07:16:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=aLgR1ekLQRP70gGlZo2bSUl2+JhO9kmOmmFXQ4iZW98=; b=ANf9LTbP75T7jGvv2KMt53cRu+bchPdPr5rTPq97Wo308okVto8r6a2Jj+i7YMdLRH RHHLiDLRwCSZ8yWI5bJj94QpL3GshHBYujYvw5dkmyIG/2LW24UDKfGhhZL3tZYhV/Yg myLUe35/lo9Z4qTN6PyI0nMD4dAZRgJPRuMxgbeC6ygj1CTywIWmMk/AxPOuX6mSKDMO odjc73h46ZbW8p6X/ZMCmncSSkxC/QMZ5fpDNX9ALRIDzh7E1tjKi7GhTyxa3SdP5HJU 9a5X8qeqI/gZdwMr3Ey0BPowAYjJ4c/08VZKwYdkxT7scBdKAyEVZzQV4eOS7VhXRBHq s7Kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=aLgR1ekLQRP70gGlZo2bSUl2+JhO9kmOmmFXQ4iZW98=; b=sVXjyrR47JR8tw/haol/sGu3805HvdgfXzjCyaG+512mooArVr3IMsrqmJy1iLoFtC WP06YliEfxZky0ZE/T8njkLXxzZXdExvRyY6iZLEG5utGVesSsSZHDm9PEtdephg/mre M63OCxjzV1rvjgsT3DEsV2OgAvV522DG2PAKRwKPJx1DKTGap9wmCvwADsxh6Ve7l010 uRlo0dYGHKHQejPvSNzrh0adche8xacnuOOjnzxPLerFKLEIuuAJgkjFmzhXJkIS34Gr ZFk+xI7SayCktaQ8mGoYL19GawjQCCFmmuddAWk+JUafWy8OXozZGMBoVq2K/97Zk1NF rIhg== X-Gm-Message-State: AJcUukeiQ5bg/4apjc9zY7FRd2NLMhwJZStPtvN5uhjDCM67/NgZnSKc ExLOqlrC6pUfaaC1tEbGXdY= X-Google-Smtp-Source: ALg8bN4YMVTC992JmpghJLRkMUsLQMbduC2HrqCMHnSO+GibtLysq2se0LLf+BY4coVXF4ohD6Cojw== X-Received: by 2002:adf:84e4:: with SMTP id 91mr25187940wrg.237.1546010159994; Fri, 28 Dec 2018 07:15:59 -0800 (PST) Received: from L2122.tmt.telital.com (static-82-85-31-68.clienti.tiscali.it. [82.85.31.68]) by smtp.gmail.com with ESMTPSA id 10sm31440196wmy.40.2018.12.28.07.15.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Dec 2018 07:15:59 -0800 (PST) From: Daniele Palmas To: Johan Hovold , Oliver Neukum Cc: linux-usb@vger.kernel.org, Daniele Palmas Subject: [PATCH 1/1] usb: cdc-acm: send ZLP for Telit 3G Intel based modems Date: Fri, 28 Dec 2018 16:15:41 +0100 Message-Id: <1546010141-5875-1-git-send-email-dnlplm@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Telit 3G Intel based modems require zero packet to be sent if out data size is equal to the endpoint max packet size. Signed-off-by: Daniele Palmas --- drivers/usb/class/cdc-acm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 1b68fed..195fb83 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -1855,6 +1855,13 @@ static const struct usb_device_id acm_ids[] = { .driver_info = IGNORE_DEVICE, }, + { USB_DEVICE(0x1bc7, 0x0021), /* Telit 3G ACM only composition */ + .driver_info = SEND_ZERO_PACKET, + }, + { USB_DEVICE(0x1bc7, 0x0023), /* Telit 3G ACM + ECM composition */ + .driver_info = SEND_ZERO_PACKET, + }, + /* control interfaces without any protocol set */ { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM, USB_CDC_PROTO_NONE) },