Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1005218pxk; Fri, 18 Sep 2020 00:53:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTweRxejo+F79ovyw1gNnvLZ76XGC0vKg5PtymW49ExtMPxW+uLz1b1w4ZkRqmtifh7Si+ X-Received: by 2002:a17:906:170e:: with SMTP id c14mr23173836eje.275.1600415631903; Fri, 18 Sep 2020 00:53:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600415631; cv=none; d=google.com; s=arc-20160816; b=pmMYOP0tF4NmAkVahUHcDY/zZpnx9yrlD/aEDL222ZtGEjtOcdNzJShX6tuuWjwndh b88yzZNCgym9wECnzmJylCXbFnjtqn39dhvRxb9noAq0NUmGta0ybRfWR2JM73rOrhQB Z9LNQgmtHC6+wwSEoc1CvdQLckU89GRqGZz9X9+POFJk7o4I7VOb8qvqgBFUJGJAW7BC zzCh5VYMtnKRkh2i5qX8bhi5iDowWIQ9gkpye9qtoPpzidWng2QXTPNmN1u8N2tHq11a lHtgU5HgHX8pwN028VNjrcvOJGw/+HWAYcPkkhM+cLTU+CG+YHCdrBdQgAQal22OXE+K IVBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=JIGXHwKfHfCJXixJmE7+Do7NXGtiGDBK+l84obZPw4Y=; b=L2dt+ZBYdYxySXPUlzluwF1UR/1kKukcLm0QxDmI+lF2owWcU6ANq4fdt9NyEOjZIC gPD/a/AthS7pxQtkyuc2U9nIufNwESyG0yUVmW0pvGFiqhhOAeNm269YpwYVdTzFq31L bRZlYvR+lK6Ijr1muTxsW01/f8WlS0a4mIVHkgZA2ILx+BVH2n12FPyCf4gUlA8yoZ/b w6mXcVbvDqDfCnVckqxCFTknjHDKY75h4rWos5DfwnPj9oVZsFEeP11iRTAD9Xksorab Ft4KbcjJXGpmyGYn6N04hqhR1KvBjSIQYp2T9Mpw3FXeXJh5Tdjr75IEGoggto+rJaCB m4KQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp16si712103ejc.523.2020.09.18.00.53.28; Fri, 18 Sep 2020 00:53:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726344AbgIRHwK (ORCPT + 99 others); Fri, 18 Sep 2020 03:52:10 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:38081 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726738AbgIRHwH (ORCPT ); Fri, 18 Sep 2020 03:52:07 -0400 Received: by mail-lf1-f65.google.com with SMTP id y11so5113882lfl.5; Fri, 18 Sep 2020 00:52:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=JIGXHwKfHfCJXixJmE7+Do7NXGtiGDBK+l84obZPw4Y=; b=c5Q7V1J7jpxMDo2CT62lRouTNkUBIb2I/cmDSPblrdmRy8TDTcpCALXYfkGd53XLzC 5/iw21xj0BNR230JRPWq2I1qFXgiiUo2L4PKeoKKqNqrrTaMYF+2OinREU+K2q/r3ZpF GjuJpihe/qKKo1V8Z4KEiVyMe7+Gg0raxXWyWg4bkbyl2HCE0SX8hqiZoVzMTFXNTxn2 1Tj68HZzPsahhpJDxqwMJZycR5gPo3mKVUdywXa7SvLI5gs9iK+hwnt4zhfePr2GjLXl i0wB04tfpNgpkFRFFB2Pvx/fub0O+M1xK/ObOoUzIzpicJk+ojt/45S4t8LKLAs8UoHo UGTw== X-Gm-Message-State: AOAM532Hp2LF0CmzYXbgrOo8a55tB83UYlNBwROr7txehJljPwUZQ0re qG91HqHzwAuG5U4SDZZtKb8= X-Received: by 2002:a05:6512:32b1:: with SMTP id q17mr11767958lfe.329.1600415525972; Fri, 18 Sep 2020 00:52:05 -0700 (PDT) Received: from xi.terra (c-beaee455.07-184-6d6c6d4.bbcust.telenor.se. [85.228.174.190]) by smtp.gmail.com with ESMTPSA id q11sm431542lfc.309.2020.09.18.00.52.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Sep 2020 00:52:05 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.93.0.4) (envelope-from ) id 1kJBBY-00076W-Sd; Fri, 18 Sep 2020 09:52:00 +0200 Date: Fri, 18 Sep 2020 09:52:00 +0200 From: Johan Hovold To: William Sung Cc: Johan Hovold , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Campion Kang Subject: Re: [PATCH 1/2] usb: serial: option: Fix the lackage for Quectel EG95 LTE modem support Message-ID: <20200918075200.GO24441@localhost> References: <20200901050022.3319-1-william.sung@advantech.com.tw> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200901050022.3319-1-william.sung@advantech.com.tw> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 01, 2020 at 01:00:21PM +0800, William Sung wrote: > * Add reset-resume callback for resetting USB devices after MCU exits > from suspend/sleep mode. Please split this in it's own patch and argue for why it's needed. > * Because Quectel EG95 uses USB interface 4 as a USB network device, so > return from option_startup() to prevent being used as a USB serial > device. > > Fixes: da6902e5b6db ("USB: serial: option: add Quectel EG95 LTE modem" > > Signed-off-by: William Sung > --- > drivers/usb/serial/option.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c > index 89b3192af326..9de8aec47e5e 100644 > --- a/drivers/usb/serial/option.c > +++ b/drivers/usb/serial/option.c > @@ -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 > }; > > @@ -2104,6 +2105,11 @@ static int option_probe(struct usb_serial *serial, > if (device_flags & NUMEP2 && iface_desc->bNumEndpoints != 2) > return -ENODEV; > > + /* Quectel EC25 & EC21 & EG91 & EG95 ... interface 4 can be used as USB network device */ > + if (serial->dev->descriptor.idVendor == cpu_to_le16(0x2c7c) && > + serial->interface->cur_altsetting->desc.bInterfaceNumber >= 4) > + return -ENODEV; And please use the normal mechanisms for blacklisting interfaces (e.g. the RSVD() macro). > + > /* Store the device flags so we can use them during attach. */ > usb_set_serial_data(serial, (void *)device_flags); Also make sure your patches have distinct and descriptive summaries (Subject lines). Johan