Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1997265rwb; Mon, 7 Nov 2022 08:03:34 -0800 (PST) X-Google-Smtp-Source: AMsMyM7qcq/DV/Sxz/BvhtuEvd5wrA614aEUtcC04K8+suSvBkCH0zIMQgcR8aIbxJjeoq0XPaNr X-Received: by 2002:a05:6a00:27a0:b0:56e:629a:c815 with SMTP id bd32-20020a056a0027a000b0056e629ac815mr22376086pfb.38.1667837013806; Mon, 07 Nov 2022 08:03:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667837013; cv=none; d=google.com; s=arc-20160816; b=SaFyWs37Sse8CQ4mq6s4SWWg88XPvUfdEFGzDj4fukBp0gGEXR/VLa+/1AAesAXH0W CfrReE4qUXpXkkI3NsSKGez6Q/vMy0TPjVg5h+waSPYfue5dAV2b/C9aPsS+wLdOBDnX 0nK17bDfpnbZQSA852TqtFyy80vmD0Z12Kfmvfr3tHdwuvF3CV694+iHyuBs8LPttRCu JhdeVhcQwYUZ1+s/x1X03VXQvATakKzMKXJK3vYRBkH/dqpF1qRKrdVfnoblF4W+lygP qN08uLfpoxmwCGgzHgrB+/RO6w5cd6S/EbLAOs6ZukXY4Xi7sZpHROW22/PcndunZkQa C/sg== 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=ZKh661fAkwss39ummT72dx2fuBiIR5yG8A7tLcqoApQ=; b=lEY2dh8/UhTyHJt8jKT8llOmNOUG2matu8kHJ0qQhtxLa7PvIvfQWavmU1YgTGRg1P /l73CkBiRlqvMzbh/RpAz8rHoKchuRoNTESWubaePSDt4JLbCfxp7fEbmj7nXmbTzkyM 8p89o17nSn/ul2H5Q4PCqnnU+MfVqY+2yHDuo6JB0adZbHfXS5fHX4n3R2BHkJKS+JGj p1BGxUfLOoCIQeIHolxCY9hP+5n6FpaZA4/88ES6SRyNzuBTcmIPrwTqrMnzBUryczAC t4JIUXMXYQd3RcCecCaEDV9oj+BHoC63zkEKDngLu7vFvzeeXyGAdT6HueyBYzHBfgWm 1GvA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d6-20020a63d646000000b00458085e9e70si10677203pgj.577.2022.11.07.08.03.17; Mon, 07 Nov 2022 08:03:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232471AbiKGPFP (ORCPT + 93 others); Mon, 7 Nov 2022 10:05:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232011AbiKGPFM (ORCPT ); Mon, 7 Nov 2022 10:05:12 -0500 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 49C07B49F for ; Mon, 7 Nov 2022 07:05:11 -0800 (PST) Received: (qmail 436479 invoked by uid 1000); 7 Nov 2022 10:05:09 -0500 Date: Mon, 7 Nov 2022 10:05:09 -0500 From: Alan Stern To: Ray Chi Cc: gregkh@linuxfoundation.org, m.grzeschik@pengutronix.de, albertccwang@google.com, pumahsu@google.com, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [Patch v5] usb: core: stop USB enumeration if too many retries Message-ID: References: <20221107072754.3336357-1-raychi@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221107072754.3336357-1-raychi@google.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_PASS,SPF_PASS autolearn=no 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 Mon, Nov 07, 2022 at 03:27:54PM +0800, Ray Chi wrote: > When a broken USB accessory connects to a USB host, usbcore might > keep doing enumeration retries. If the host has a watchdog mechanism, > the kernel panic will happen on the host. > > This patch provides an attribute early_stop to limit the numbers of retries > for each port of a hub. If a port was marked with early_stop attribute, > unsuccessful connection attempts will fail quickly. In addition, if an > early_stop port has failed to initialize, it will ignore all future > connection events until early_stop attribute is clear. > > Signed-off-by: Ray Chi > --- This looks good. Reviewed-by: Alan Stern Alan Stern