From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) (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 63FE828505E for ; Wed, 12 Aug 2026 03:23:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786505034; cv=none; b=YUC3BrPglHjFb+S8EqbIMCbCV89SbLvltI98XBeddtyFp8RiXn2hYW2bqYEzErcZfbd8JY78EBdt/SVGAUUinEegU3l415rUEHdriwrj8bPGi3JkItHgzk5y48EdHMAOoTFUEv17hkrNzEx4DTH1JNECJQQlG+vjXOJFZITTLqY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786505034; c=relaxed/simple; bh=jJt2AFckn43QHm2t2vWTamw5hlChS05jKFsFZOMI8DU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=u0U0Iggrf7jERMWSY2L7jOSr95ETnufZLaKfYINZiVyFmlSXK80OBmVDaIchcnaZovCLiq6tx0vKY9Fka64qZDqFoQJhLUHPlNNPG6AOFxNFekdvhHngKcvRZnsuy6fuKMQS7MEL6BzbsOFlojdPtHJp/VKT1q+lndvS9l0+Cy4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=bTdf7f6Q; arc=none smtp.client-ip=209.85.215.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bTdf7f6Q" Received: by mail-pg1-f178.google.com with SMTP id 41be03b00d2f7-c9d1fff21edso354357a12.1 for ; Tue, 11 Aug 2026 20:23:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786505032; x=1787109832; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from:references :cc:to:subject:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to:content-type; bh=hooElFR/UaAU2c03fOW+qzzmNPOvItQogFD/Qzn5hWs=; b=bTdf7f6QjK5d2O1Bar9BA+lm7wESSITUVMUrFVTRo04P3lDJ6SgjE+g+e0Y05qWuS7 1iiBPp+e5z0+CH/WwssYI9yHdoIuMhdM75cIrbTSF2Nis36IjDfPmxq/FGA8Uuhd54bf RGhRtXEXBQrIasJN/xRq4YmrD88Lj1p8EV2Fe3p/jgmPLkjZ9sh69mtgauJOWygKKQtr bdJWui2/I9D8w/dc5TIxguAOAjeicIf2Iz27yD1iQkjavZM+3RBkL75MqB3qWKjpfQHb cGpLPJTK15TPxuapH7JH2eFzqLAeiqtM4NvWd2xpavVTDe3Em8LN7nlet5dzyd6beXqi glsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786505032; x=1787109832; h=content-transfer-encoding:content-type:in-reply-to:from:references :cc:to:subject:user-agent:mime-version:date:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=hooElFR/UaAU2c03fOW+qzzmNPOvItQogFD/Qzn5hWs=; b=Y8xTbdytYVlDvngMGhML29yxMu9THkQk+PQD27RB9fkTEXFtbOPXOEiwdfeWTLtHTc rBNEcKglTu3PPiZDt9DLDyM10qoqbXJltp+H+u/Aw9WiRKFrugtEOsYmJIJNg/3+TT// t1zIYMuK/MMoj9SIYyYZeJvAqjMQPEOTVnBpJSZCMNe5Exx0g2Bch988c3vGgAjOLic1 FuiV3DPzwNWvULmjISp14F26R2vBT5cQ2SsxVOAKM+D4FqRImqrF0606hEMLfWdUFMW9 J+u77zk9YYX+QPYbzIEdPDVh31IcimsSVlun1lsm5FLudFmDyI6xVqwN5L+GxXRDH32M jQGA== X-Forwarded-Encrypted: i=1; AHgh+RraYrh2LTrgY3IMctyw0gghzpY1Hcg5n7rgiywAxDWqNooW7nO3x6HKTA/KP0K8ARHOobd+ZAtZuN24zeY=@vger.kernel.org X-Gm-Message-State: AOJu0YxmHm7NtHl7rD8e5Qg3RL1MSWBMst2+BFyTFKdGOtVA0lIBu9Hc Rg44x5T3IjASqx+s8LD5T56NebFdUE8xFnx3zwVibxe//qHBqkUYh7jC X-Gm-Gg: AR+sD11mHZHndO1QcS+fMbSulL/djcF51SgEKaI09DLx+GOUIClFMMpYaxmhiJZR+nR f/5+/dEwZD4Tumn3m9rurFv4bPAPZJQtRbQUJ0EakXNrM6lnge88+D9AvEUMARieW8KwGn6M7CY tOD5vlhxMHwwXk7tDBShlRKT63dZ3Sf75WUJ7C0Y58MREDWNgEu1CAJvApRZzsSmF6cOAXGmy/e 09QsPaOOTxsHMFbup7otDVxDNc0OqciIjLhiXzDMH/nHnULbd5YpjloZmvaUNXUDsDcVoXUTYoV E/l/B443otJLgBVnmtcmuSbTpx4EEzskkXOt8a0YCUYZ6xVvwRQYUSXp8Reu/MiObX/T2rMO43x OXyyzuvJaxerkUESmu8y3rKfL+pCPAyI6a2u5J/eDzcSlVy9KR81AwAZynI6sUsdEx3hvtO3OxU sYhIeGydS3Z4JrWQ7SCvwynVzMcaUPCPbCqYKulAplyq8SlIhu2lrD9hI4jtPLPflcSCaFVlz6D tJE7feCcyPsPQ== X-Received: by 2002:a05:6a21:4685:b0:3c3:a024:1360 with SMTP id adf61e73a8af0-3cc3f7393f4mr1884991637.28.1786505032199; Tue, 11 Aug 2026 20:23:52 -0700 (PDT) Received: from [100.82.105.140] ([63.216.146.178]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-14124542f10sm4520653c88.11.2026.08.11.20.23.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Aug 2026 20:23:51 -0700 (PDT) Message-ID: <52fad18e-9938-4cba-8145-aa88acb7e4b1@gmail.com> Date: Wed, 12 Aug 2026 11:23:47 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4] nvme: reduce firmware activation poll interval To: Keith Busch Cc: axboe@kernel.dk, hch@lst.de, sagi@grimberg.me, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Guzebing References: <20260728121735.1627370-1-guzebing1612@gmail.com> From: guzebing In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 8/12/26 12:46 AM, Keith Busch wrote: > On Tue, Jul 28, 2026 at 08:17:35PM +0800, guzebing wrote: >> +static int nvme_wait_ready(struct nvme_ctrl *ctrl, u32 mask, u32 val, >> + u32 timeout, const char *op) >> +{ >> + unsigned long timeout_jiffies = jiffies + timeout * HZ; >> + u32 csts; >> + int ret; >> + >> + ret = nvme_wait_csts(ctrl, mask, val, timeout_jiffies, false, &csts); >> + if (ret != -ETIMEDOUT) >> + return ret; >> + >> + dev_err(ctrl->device, >> + "Device not ready; aborting %s, CSTS=0x%x\n", op, csts); >> + return -ENODEV; > > Actually, I'm to back this out for a moment to think about this. I like > that you've changed the error to ETIMEDOUT for that condition, but I'm > not sure we need to convert it to ENODEV. None of the callers seem to > care about the specific error, and the user visible side effect of the > condition is more informative than ENODEV. > > So if we can get rid of that legacy behavior, then this simplifies even > more. Thoughts? When restructuring the polling loop, I tried to preserve the existing behavior and return values as much as possible. Converting -ETIMEDOUT to -ENODEV was part of that effort. However, I agree that -ETIMEDOUT more accurately describes the actual failure. I checked the callers and confirmed that they do not distinguish between -ENODEV and -ETIMEDOUT, so propagating -ETIMEDOUT directly makes sense to me. Please feel free to fold this change in, or let me know if you would prefer a v5. Thanks, Guzebing