From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 89D88299927 for ; Wed, 1 Jul 2026 06:01:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782885704; cv=none; b=TkouvG+J9HaZ+l8w5gmfL6hBKWOLX+kA3z+VjEVU5MZ4sZHQkAzU7015AVfNN1+Gbuj4kIeamcSfWZ9oQfDL7Ff2MsigeB/qlKtJOmxScEiVW6eNffwJ/SryX+GoSUTx1R1+p2iTnC6lvuFf0XWmZZDckK03pAscP9t5auz6siA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782885704; c=relaxed/simple; bh=3oeMZ6NNs7vMLHM4WilaG0v2t2tRVpTyTnDkKivbB1Y=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=N/H3DNjF2cJ8jZ6w16RANSBWK4Tr+BCrr5WJULWcqJBX9HLPcQ8oXQrrUVo222EehtHaK1QIaZHMqS9s3KgJQIgnFTZtVdv02BrP3DE+bCHY7GQiXA9nZKf6TE41nIcmD8mDS4H5WUyQJaF646XCx62IIMCyxtKPuU57O1xjN9k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=ncwGvlJ4; arc=none smtp.client-ip=209.85.214.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="ncwGvlJ4" Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-2c7c61b5292so2716075ad.0 for ; Tue, 30 Jun 2026 23:01:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1782885703; x=1783490503; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=0e78plCJzUw9mtQf3K/88IdWkJoFUVq9utFQfqU+ZPU=; b=ncwGvlJ4QsRK5EAgceWLUvy729YJdw+AmLcRkMs4uD4/GX9diEn+0swkXDr6CRakHX aaqiz2Ane9G/JXuoNaSKsTwUdkOYj/4VKbJ/ueCwlbaRTL693RA06aOw5uvgG0LFnzap Ok1bbqkHGhfa4zhALlBJh7VtrugBq/1tZDINU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782885703; x=1783490503; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0e78plCJzUw9mtQf3K/88IdWkJoFUVq9utFQfqU+ZPU=; b=s6EJDqatnnQ7hdHmxYbteu5chJ2X2yRNLPOo4FQnW9Toegcy9eW/BtPWkajIB2gqwT +VTDP76klVH1QqQM7/yFUJB4leuTyHyffMaJTz+MQP8B1hk1hJ8+0qkuMmRH5rk2+QSE /3RzHZrgGN6V8Il7SHWm64KtFUgyMICSintZJCPBANYBPMRDosmCVcq9o/XVY/7946ZJ Acr4kbbXtLg9qbY/TNAXhmZDHSBXEHp5r1eDDuSl5991gbMhIWRbejAE6Up3Qc9Wj+IZ 1Y4dbK5JhuV+NG2bYWkquFNAE/3xpyqK9e0NC1cX95nWOMkInr6YylJx8cVawcmomdE0 Vb+g== X-Forwarded-Encrypted: i=1; AHgh+Rp/Y0ydPofk7gEOUnLUr3cBdGNz1SdxjjTOTsR7ZJfmatrboWYs5piClk52xP+xJHHGaOC3hXwpxa4Esjs=@vger.kernel.org X-Gm-Message-State: AOJu0YxgSUtvzBKyx1+tUuBYdi+4bLYpg4bv/m9L767h7OsYmPZu0JRV Mjtzldo2ad17LpCxe6Er3O70hKTL4Sq7FVlGNM+vzVsQS+nuVcxZW8xep7HoXqwTBQ== X-Gm-Gg: AfdE7cmXx2RVytjVS6t7g4BnLBTnCxnqOK4cusBbV7lKTZDkFdRq8g9oFhMihf9oaLY dgC1d1TBUXtG85JQVFtuIxA90D95ZK/rqNisoSMFJnEDQuqm1lRc/P+TTBhGOSqgh2luPNFbrjF mnHAeBQAuYed6NPJq+OT5XEIo0Nmh07vRdRF0zL8YXnPBVG3c6JxMwNl5L9IW4cyD/LQNsVlHmg qodyOggaMK/fhLnBArlHBdc3Nmv+DvP2duaySmGhKhwVxwpFzjqYFsOcGzN6uSTIdJf69sQ3Pwk BhYlZ7Cmao35BlM1OXFxtrd0gEWzxk+UUHwQQCnDeGVNjvhP/y+9hRezU9fCjbXK1TjWM9wtV0s mYf3l+J20us7XeIpnJ5RXnbdZ+HXtqsMuwYqw5EWkj6CGgPWeCwZIcPfZUUvjhIPrwD/0pAOR+N k01z53kkOy27G0cqsofcbEnyKpHQRNAl53dGStia8hXg1u58fRLoNa X-Received: by 2002:a17:902:ccca:b0:2c8:1c05:16bb with SMTP id d9443c01a7336-2ca7e86b86bmr3693685ad.24.1782885702562; Tue, 30 Jun 2026 23:01:42 -0700 (PDT) Received: from google.com ([2a00:79e0:2031:6:faee:2436:3347:c0a2]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2ca37a70c42sm26149575ad.11.2026.06.30.23.01.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jun 2026 23:01:41 -0700 (PDT) Date: Wed, 1 Jul 2026 15:01:37 +0900 From: Sergey Senozhatsky To: Greg KH Cc: Oliver Neukum , Alan Stern , linux-usb@vger.kernel.org, linux-scsi@vger.kernel.org, usb-storage@lists.one-eyed-alien.net, linux-kernel@vger.kernel.org, Tomasz Figa , Sergey Senozhatsky Subject: Re: [RFC PATCH] usb: storage: uas: limit consecutive device resets in error handling Message-ID: References: <20260701040335.810297-1-senozhatsky@chromium.org> <2026070157-stench-shabby-2519@gregkh> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On (26/07/01 14:57), Sergey Senozhatsky wrote: > On (26/07/01 07:38), Greg KH wrote: > > > +static int uas_reset_limit = 3; > > This obviously wanted to be 0 by default (just a side note). > > > > +module_param_named(reset_limit, uas_reset_limit, int, 0644); > > > +MODULE_PARM_DESC(reset_limit, "Maximum number of consecutive device resets during error handling before failing"); > > > > This is not the 1990's, we do not add module parameters for issues that > > should be properly solved either automatically, or on a per-device > > basis. > > > > There's no way that ChromeOs wants to attempt to track this module > > parameter as a bootline config option, right? > > Can you please elaborate on "properly solved either automatically, > or on a per-device basis". I don't know how to break that endless > reset loop otherwise. I'm open to any suggestions, the patch is RFC > for a reason. I can imagine uas_reset_limit being auto-calculated based on SCSI timeout (30 seconds) and HUNG_TASK_TIMEOUT (if set). Will that work? I don't know if all those timeouts can be clearly exposed to the UAS driver (or should they be in the first place).