From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.171.202.116 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796415117; b=IAJeMi0PSbtPaRjgvxtQqa2Hss2pgy/2Hs4ScFctKgdtZdaeTJACYdMwvwaqp09+maIq NyQDFiTzc4FRCxHT8U7IjTjfFFkiYVa8rRQ1Y7KdXoTy+TyNNZuJ7HyVTS1JvLiwXd/qk oBYYZx6zEJLP1blqaRiLKWJL9lwjwpgax5IIW6wzBpsFs+YhpE7qWjPX3YjQA99c++7qB bEm9wvM+ivkNUcPeSRYZsjgW/tgsjjqCqmVPCSzZr0L5F+c9TNutNYwWh8yQWgKS43jWx n4NioQSUYpguqNTnpIgUNArR2joUa7Tqq6O9BnhQw0rGuYaU1xvsIm+W2ykYq/lKmfQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796415117; h=DMARC-Filter:Received:Received:Received:DKIM-Signature:Message-ID: Date:MIME-Version:User-Agent:Subject:To:Cc:References:From: Content-Language:In-Reply-To:Content-Type:Content-Transfer-Encoding: X-Last-TLS-Session-Version; bh=kOvMoOKu/Dso8as/p2eR+gGxowQUko1ScG1BciShOas=; b=QZRUz+Ue2ZPGSAEASUsNnjIA7a7++Ch04ioMhgS4t4ev4RVtIJs3dsoyu1Vz127JeQ1h N+Xvy1X0HSYNswLcOR+yZtnifgxU5c1l3NV61SDL0+nnFm7xwsH74fiIka8UYZES0VCIe WlBc2So1yVyrkO4wr4nIhoW8cF0VNowMjjOucl2Hw2zXsb9AAn+fBOpjo9SO4fBo311Cu exw95ewmmkdWZdSaro7/3pixXxPptw+bjx9u+7MXdWWmuvDnNxxPZ9JwFbtdEAk0jRu1U AOm9Wc8GooSVn7oZzn+Vv9/6ZGb6jUPp+7yeC5+DArpFz+er+s+TFtC7j9yUHJOUMNA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=tZcdxPga; arc=none smtp.remote-ip=185.171.202.116 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 93540606A32D for ; Fri, 4 Dec 2026 20:11:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 93540606A32D Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=tZcdxPga Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 22A3EC026DC; Fri, 4 Dec 2026 20:12:06 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id F2C40603C4; Fri, 4 Dec 2026 20:11:53 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 6F23611EA0773; Fri, 04 Dec 2026 21:11:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1796415109; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:content-language:in-reply-to:references; bh=kOvMoOKu/Dso8as/p2eR+gGxowQUko1ScG1BciShOas=; b=tZcdxPgaWE0tAMV1WJnTpoKfhv73JX3KNvIfyZwv5HfWRZ0mORW07KSVv3yXAmBAUORwIa y6t3vCwEjCthpVfPOa3nBgqcSU6uRIyOD1NpwSlADYqUDPI1JzWTSxffxnLsJxGakRvhi8 JD2xUszeiJJd2Fc4kTK0cynN0Xsk+ALX5HtoacjJ4GaJ+ssfDwajkFQK4oAZyUzTPgG6nN LW/ZBQxM421VkPdDAmLA7GkpyXj4OIYjC54oNAT5pqRtIstG9gn9dblUH/wcVlDixSnJWW FmlJ4oARarsSDF7KLzeIW9NkJgQqDJWtf5miRma8J+TJI59uvNbHQ5orr/txKg== Message-ID: Date: Fri, 4 Dec 2026 21:11:42 +0100 X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Betterbird (Linux) Subject: Re: [PATCH net] net: pse-pd: pd692x0: Return fw_upload_err codes from firmware upload ops To: Ian Rogers Cc: Oleksij Rempel , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Elkin Cruz References: <20261119171014.1534691-1-irogers@google.com> From: Kory Maincent Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 On 11/20/26 18:35, Ian Rogers wrote: > On Thu, Nov 19, 2026 at 9:26 AM Kory Maincent wrote: >> >> >> >> On 11/19/26 18:10, Ian Rogers wrote: >>> pd692x0_fw_reset() and pd692x0_fw_write() return negative errno values >>> from i2c_master_send() directly as enum fw_upload_err instead of >>> FW_UPLOAD_ERR_RW_ERROR, and pd692x0_fw_recv_resp() ignores negative >>> errors from its trailing i2c_master_recv(). When a negative errno is >>> propagated to the firmware upload core, fw_upload_error() rejects it >>> as >= FW_UPLOAD_ERR_MAX, logs an invalid error code message, and >>> reports "unknown-error" instead of "read-write-error" via sysfs. ... > > Sorry for the noisy diff and dense commit message - you are right that > pd692x0_fw_recv_resp() (where fw_msg_buf is zero-initialized) and > pd692x0_fw_write_line() didn't need touching, and all that type churn > buried the actual change. > > The only two lines that return a negative errno (-EIO) as an enum > fw_upload_err instead of FW_UPLOAD_ERR_RW_ERROR are: > 1. pd692x0_fw_reset(): 'return ret;' when sending "RST" fails > 2. pd692x0_fw_write(): 'return ret;' when sending 'P' fails (whereas > sending 'E' right above it already returns FW_UPLOAD_ERR_RW_ERROR) > > Would you welcome a minimal 2-line patch for net-next (without Fixes:) > just changing those two returns to FW_UPLOAD_ERR_RW_ERROR, or would > you prefer leaving it as-is? Yes I would accept it. Thanks. -- Köry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com