From patchwork Wed Sep 2 11:03:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Sung X-Patchwork-Id: 297762 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79710C433E2 for ; Wed, 2 Sep 2020 11:03:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 548E42083B for ; Wed, 2 Sep 2020 11:03:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726285AbgIBLDI (ORCPT ); Wed, 2 Sep 2020 07:03:08 -0400 Received: from aclms1.advantech.com.tw ([61.58.41.199]:42462 "EHLO ACLMS1.advantech.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726226AbgIBLDE (ORCPT ); Wed, 2 Sep 2020 07:03:04 -0400 Received: from taipei09.ADVANTECH.CORP (unverified [172.20.0.236]) by ACLMS1.advantech.com.tw (Clearswift SMTPRS 5.6.0) with ESMTP id ; Wed, 2 Sep 2020 19:03:01 +0800 Received: from localhost (172.16.12.96) by taipei09.ADVANTECH.CORP (172.20.0.236) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 2 Sep 2020 19:03:01 +0800 From: William Sung To: Johan Hovold , Greg Kroah-Hartman , , , AceLan Kao , Campion Kang , William Sung Subject: [PATCH v2] usb: serial: option: Fix the lackage for Quectel EG95 LTE modem support Date: Wed, 2 Sep 2020 19:03:01 +0800 Message-ID: <20200902110301.21936-1-william.sung@advantech.com.tw> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [172.16.12.96] X-ClientProxiedBy: ACLDAG.ADVANTECH.CORP (172.20.2.88) To taipei09.ADVANTECH.CORP (172.20.0.236) X-StopIT: No Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org * Add reset-resume callback for resetting USB devices after MCU exits from suspend/sleep mode. * Add zero packet support Fixes: da6902e5b6db ("USB: serial: option: add Quectel EG95 LTE modem" Signed-off-by: William Sung --- v2: * Add ZLP support * Remove redundant code for reserving interface number 4 drivers/usb/serial/option.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 89b3192af326..ba4dc67dab2f 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -1099,7 +1099,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC25), .driver_info = RSVD(4) }, { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG95), - .driver_info = RSVD(4) }, + .driver_info = RSVD(4) | ZLP }, { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96), .driver_info = RSVD(4) }, { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0xff, 0xff), @@ -2069,6 +2069,7 @@ static struct usb_serial_driver option_1port_device = { #ifdef CONFIG_PM .suspend = usb_wwan_suspend, .resume = usb_wwan_resume, + .reset_resume = usb_wwan_resume, #endif };