Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp810450pxb; Fri, 22 Apr 2022 11:38:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSTWdlMa0YDXnCTzPIFwXiXo8/0ZHIfIPdvEdvrBsixlCXQl9ilfuqYaIVx1OGTUHgnUOn X-Received: by 2002:a17:902:bb92:b0:153:4eae:c77e with SMTP id m18-20020a170902bb9200b001534eaec77emr5574087pls.93.1650652715294; Fri, 22 Apr 2022 11:38:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650652715; cv=none; d=google.com; s=arc-20160816; b=cRLG3ZKiqfR9LcyBM42Cj2suKdRI1jmt796Ss+5oSaKinC1HEZDiPxRczQHat9DbT4 Si2cZ1Loj7nFy+oUMiybUufBAvHekcQKb6iCxkAVFufTB4/kw9WDJ5ldY4S5WGGilrmZ dU1TW4uL90YQOHTDe4aebF+/0nGuCpOV3bVoSjJYP/cKN1pLPszlDiY5GyZmlorzcPwx 3ARueIhhBIE0aFjSqgY13u6FzJVUSWweQN04EMnWCtMCk4FyYXVElN2UXLRHHcc2ARUK xfdP+/cLhTjiP0+hHy/cwBqJ4maXH1f/MJ03AAlM9iS8UphQhJ/Q2tReL9X/3nzTnaqy 0tFg== 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:dkim-signature; bh=AkExnrOedRBuaMYAr0cc0T0Hgec+EHQ+HQQRxELpNBY=; b=xCyd0rgltR9fhrfIhvDBK881CmPm1ENljkahRIoG3FJHUSK2Mz/QU/EXOz1Oz3MurW xaZgvAvxp2rid/pvM8/I0Slg1lSMBRWF7g8WT323XdPZGopnPm331wOap4JfLs619j7x uS8jr+HIKRG1dAd+cz1PKQT5jo8mUyftmxQkTNPs6wQErvGrcRnO28+MDvt8n7+jAfWx 7xYKXsKA/kZYpACeJH2CdycJ4NSAx/TRqvIQ75u9NrHii1shTpyYIr+mrbExSxGkaBmZ xm4UgtMcRtuVIQc3yJDww2oq8c/UDTQ2HGicXvjK5NJK5KkOts+4roVsxDg/Boru7nf/ xJ3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=McKkPBDY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b6-20020a170902e94600b00158eabc46casi8816381pll.604.2022.04.22.11.38.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 11:38:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=McKkPBDY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3F04215CF51; Fri, 22 Apr 2022 11:07:49 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232224AbiDUQsc (ORCPT + 99 others); Thu, 21 Apr 2022 12:48:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231348AbiDUQsb (ORCPT ); Thu, 21 Apr 2022 12:48:31 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4494D286E0; Thu, 21 Apr 2022 09:45:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DEE29B8277F; Thu, 21 Apr 2022 16:45:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9B34C385A1; Thu, 21 Apr 2022 16:45:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650559538; bh=iJit4IZbsdLEoDo/5VF9pWmAB4FyRHiRZ/6OCKLI55U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=McKkPBDYwMTVmBlisTWJhJEh6+NmGKke8WENkF2FvuD8fqbTs5RkhwKHJRBVCeZbH LcbVuTLrtbb/4YQ6xGZg7HWboiCa32Mnrp7cmhjxDKrL3fqhuNT0qkViEAlu54bEox 2oqkt3x7eDcC+4lBg622olUQQyFCHthDRmB27obU= Date: Thu, 21 Apr 2022 18:45:35 +0200 From: Greg KH To: Hongyu Xie Cc: johan@kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Hongyu Xie , stable@vger.kernel.org, "sheng . huang" Subject: Re: [RESEND PATCH -next] USB: serial: pl2303: implement reset_resume member Message-ID: References: <20220419065408.2461091-1-xy521521@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220419065408.2461091-1-xy521521@gmail.com> X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 19, 2022 at 02:54:08PM +0800, Hongyu Xie wrote: > From: Hongyu Xie > > pl2303.c doesn't have reset_resume for hibernation. > So needs_binding will be set to 1 duiring hibernation. > usb_forced_unbind_intf will be called, and the port minor > will be released (x in ttyUSBx). Please use the full 72 columns that you are allowed in a changelog text. > It works fine if you have only one USB-to-serial device. > Assume you have 2 USB-to-serial device, nameing A and B. > A gets a smaller minor(ttyUSB0), B gets a bigger one. > And start to hibernate. When your PC is in hibernation, > unplug device A. Then wake up your PC by pressing the > power button. After waking up the whole system, device > B gets ttyUSB0. This will casuse a problem if you were > using those to ports(like opened two minicom process) > before hibernation. > So member reset_resume is needed in usb_serial_driver > pl2303_device. If you want persistent device naming, use the symlinks that udev creates for your for all your serial devices. Never rely on the number of a USB to serial device. > Codes in pl2303_reset_resume are borrowed from pl2303_open. > > As a matter of fact, all driver under drivers/usb/serial > has the same problem except ch341.c. > > Cc: stable@vger.kernel.org How does this meet the stable kernel rule requirements? It would be a new feature if it were accepted, right? thanks, greg k-h