Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3732369rwb; Tue, 8 Nov 2022 07:49:50 -0800 (PST) X-Google-Smtp-Source: AMsMyM5ya/mjnkW7Hi0Rq2//ukjl84pRh67IsjEPXhyPriS/CfhhKXbXPrF7s2zux8zw/VR1JJDW X-Received: by 2002:a17:907:a02:b0:7ac:9a51:3403 with SMTP id bb2-20020a1709070a0200b007ac9a513403mr54525149ejc.220.1667922590338; Tue, 08 Nov 2022 07:49:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667922590; cv=none; d=google.com; s=arc-20160816; b=uRehXJlJA6D0ZY6tprgxIodvHNJY4NyCfNq9xvsFlKQmCPsaucPndQ5Wsq0Fp8mitR Excz9xFYtf9GzGyhZeejAeUHgVnPakm48f16iQuut2wLOEH2Bi8HL5KomMxmKzNE3qF8 kPXnxy5MlkPDZ74t/Ow/AKFrKnVd0oaZjvKi0Qi2wx7wsEqAhk1b7kwVrRVXZYIj3k1C FwBJHLS87zAE/PgSkavK7ZpMBjx7uhhqLL+7Gj0V1u+Lgvx7okuns0bnueX6BEbGAaUs RO401aLhBwdjUaET/d0d4Vpj+/CChUSgJjrgQX2d8f6QqVjEnUR8iAS4Ikg+3BPTmfpa yLMw== 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=ESnrg6q61peR/D4j0IizPBSHgchGz4TciaLQt+ZJ6SI=; b=tNb5prZO2dCD8W0nqt4uOk+LDe9LUgl4pFZOEdZIBdp1GBKdf/V9DQHz2cAczVngdi eBhWpOaW9fokhJotXWtNZbRuXfGTqdwkCl22ZflE3g3ehr6Ry24u5V18E35vL8kqS9iI asPeE6wRYOAbkEtY8aILtpscfbliwglcatqcJBR5LB/RNQlSF6KFnGKELJ7W/eQ8Fo1w iul3RxABGIRsrdNBxI9axDG2/41EaXGrmW3n9X7zSXrsWRJAxOHFYb44j3YE+QrJX9RW SS8w8Cqa9gOfohuJcVQNUOUsk2/yGacO6frjSrv1KA4Jvjbc6UVIJWy/IZZM3eu8mjun ugOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=q7JzbPHH; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb36-20020a1709071ca400b007ade0bd0306si13350804ejc.227.2022.11.08.07.49.26; Tue, 08 Nov 2022 07:49:50 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=q7JzbPHH; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233737AbiKHPqm (ORCPT + 92 others); Tue, 8 Nov 2022 10:46:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231787AbiKHPql (ORCPT ); Tue, 8 Nov 2022 10:46:41 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 776085C74E; Tue, 8 Nov 2022 07:46:40 -0800 (PST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 10C97615F0; Tue, 8 Nov 2022 15:46:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E03AC433D6; Tue, 8 Nov 2022 15:46:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1667922399; bh=j94Kohmh15MKz9lwMvrlIvKWFYBll4GPXGwEB1XBuW8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=q7JzbPHHSkCyXSWhKqlGPbaZeOVjLckME6v52kNoeGkQnduDNLmokEphEGUHUKDmn dYJFQHJC4j80+D+XW+CR5mm5JHsne/WZMNaftjWBCHHmzYC+H2FC4wd/hvkk1m1GgU BaRhU/+ZYfbfXOeGYsCZke/vQ+gN/i1wTmtYwXJE= Date: Tue, 8 Nov 2022 16:46:35 +0100 From: Greg KH To: Ray Chi Cc: stern@rowland.harvard.edu, 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=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 > --- Much nicer, thanks for sticking with this! I'll go queue it up now greg k-h