From patchwork Tue Jan 30 10:04:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 193954 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1114100dyb; Tue, 30 Jan 2024 02:10:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IEm5UXKC1acnPM11wawEwO7rdGU/e8ADMm4pb5i0s6WVLpYmNd+bceKnlmkIJdO+zQeNo6w X-Received: by 2002:a9d:481a:0:b0:6e0:f0b6:57d2 with SMTP id c26-20020a9d481a000000b006e0f0b657d2mr6733045otf.21.1706609408756; Tue, 30 Jan 2024 02:10:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706609408; cv=pass; d=google.com; s=arc-20160816; b=aiW5XZKf2U7nmHGxxrf1urtD9H5+PWdl1YATvLsZ4fZLchO7G5QR08MGJQpRPwhNIF cr+pmRH+eeTIVxwTVL4Sa15W6cjd+Loz+/DRSYt9hwEHMOYUh6P2BVDA+HoKmxy0vxd/ 8dgz+BvJLhjHgF0wKohyJkFLu7ACwqGImmFekz8D805lXePbINp2j0NM/Evg/WMzWoaj NNH50Y8jr5YM2BeYy99bAQiWRWPtX5MN8nNCIdsbQcLuFVZPAR1lozNVqn/S/gx5iydq poG979Mn/CPsqCJKxF5h9YQl2Njt+gADLwYEzwpwZOZcMm7PXYlkxI+QGjaAUnPYjPen P8rg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:feedback-id:dkim-signature:dkim-signature; bh=MOp/NPYsM+2ldtCEODCGojul6SWgm505LlBTScMMddk=; fh=Pulw12R0vn3IOP2BoBgHY20EOmwo7P0GyQbaF25Zmz8=; b=GvY1fF3PABdVkjZ+YbkVUlRBeKTp70oQhfPMtCgdEpo84qYBsqRrNL8DuWxYEF49WV DM5ko0FmIcKFQioD+5ufLYGldNwYf2xgyZSgcBD8ZYNh3JsuhrViojyjJKNHbc8gH05e XQGljgLknZXeuMLQBw2bc7gsRR2YegEYUNJdhLtDvjriqWTNRaRpDHHABQdceL0v7cIk PZ74J3SwBFsFu2sZiedNsCCmRMLx6HuxXbK0P0g6irTsM78TbvX5Y6aYxODJLFlihpOK ypknT3VIgOVoXVJxTAcaxp0K99o6+nmGoF7VvUzr9YYTgxYGC03zLxDci1KY7d0qksuJ msIA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sakamocchi.jp header.s=fm3 header.b=BlnoyXUn; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="a2I/+iWE"; arc=pass (i=1 spf=pass spfdomain=sakamocchi.jp dkim=pass dkdomain=sakamocchi.jp dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=sakamocchi.jp); spf=pass (google.com: domain of linux-kernel+bounces-44349-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44349-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sakamocchi.jp Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id m23-20020a6562d7000000b005d8b2b49e8bsi5584774pgv.662.2024.01.30.02.10.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 02:10:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44349-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@sakamocchi.jp header.s=fm3 header.b=BlnoyXUn; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="a2I/+iWE"; arc=pass (i=1 spf=pass spfdomain=sakamocchi.jp dkim=pass dkdomain=sakamocchi.jp dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=sakamocchi.jp); spf=pass (google.com: domain of linux-kernel+bounces-44349-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44349-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sakamocchi.jp Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3B7A128F540 for ; Tue, 30 Jan 2024 10:06:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3A32967E78; Tue, 30 Jan 2024 10:04:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="BlnoyXUn"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="a2I/+iWE" Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9A9B760869; Tue, 30 Jan 2024 10:04:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706609061; cv=none; b=goSrOvHZK3xvTqPQhlE2zoA96pPBp4s9RrOC0i88y+U4n7zugGrAPZfhZAM9A8O7e1uzHXjnAI8+EAwKOR0WpZhI9S3fwDdHW9vQHZS3NIIXWiIgrvHxZszbMxd+x9M+L38ZxrokpKOn1+P625tManLLUZJlPmRBQEcM2gMrJzs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706609061; c=relaxed/simple; bh=m/LkcmZBG8maNXM0EK5iOQtsBNk2ELexmrMHxsIeoBc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=c8FCY811SD390Cm9haVbAwzdjwR5hFS8kYRFu3DhCjXFrkx1kLnK6PASnxJGiOEN1Hf9igP0QvDVgL6h8ufw/BGMwRAgwU68FmorgzLhhpd46PfunUiesK3oZEshMlqMio10/JgbA1ssDlCq9Gz0L9rMnM/8u32l0L94rCSX57c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp; spf=pass smtp.mailfrom=sakamocchi.jp; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b=BlnoyXUn; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=a2I/+iWE; arc=none smtp.client-ip=64.147.123.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sakamocchi.jp Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.west.internal (Postfix) with ESMTP id 4DA973200B44; Tue, 30 Jan 2024 05:04:18 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Tue, 30 Jan 2024 05:04:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1706609057; x= 1706695457; bh=MOp/NPYsM+2ldtCEODCGojul6SWgm505LlBTScMMddk=; b=B lnoyXUnB1EVXKFwwzZevYYGTDkRAco1bAjBdrpyuGemnCRCYTRCwHbfhmqU+LN0p kU8BFlr/4CAVwhk5BEpFoJP9r9J7Acv5Nv3lN+M5PLlEIINmbD84eW85WJ7cs5Eu NFV3AsMI/+4+fDCXQzUcYCfaaIfyBpESpFddWoqZeu3n+TTr88J/bU+ZcVC99Qir p0lQGv11XW79m71IHlHndONB4Uww1XA2QoAuDdHpnx+3JE8CBsPWU6oGFooSNk6Y 1VIGhJz3ZFklghDBsBKcxXdaQX9j/8HaMBkBZyYHsHj2lV07jL8kKcqCmVwReDgD 9snneCvz1OR2i/+/dOAyQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1706609057; x= 1706695457; bh=MOp/NPYsM+2ldtCEODCGojul6SWgm505LlBTScMMddk=; b=a 2I/+iWEmMJuG4igywhCqlfSw0tG9cJs00z5KuHQhakW8JFmw0kEzkWa/kcnYi5+r WDqCbwIDgWB+QPG5z4cscv8yHNy/UFUmPp5js5vW7SAjUN8C+M2wiiPNCN0JrS6c cHzePfquNR408yCW4riQxwmQakoGeC9ywDvaxcnLbTgIddYPRq0NhijaZxp5PckL UVIJWARcPQJUm8bytlTEXFpvG6wmcgFs7omwR+mn8+xMcc2wDE5fTHb59g0RNS9o tzEyw6xdzO09LkxYpipb4UDR8ijpxNxhUgasUTz0VqQgEXAzKvFeTyihOIhErWMN iJWmJb5BAeOXZfgLNPdHQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfedtiedgudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefvrghkrghshhhiucfurghkrghmohhtohcuoehoqdhtrghk rghshhhisehsrghkrghmohgttghhihdrjhhpqeenucggtffrrghtthgvrhhnpedvjefgje euvdfguddukeelveetgfdtvefhtdfffeeigfevueetffeivdffkedvtdenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehoqdhtrghkrghshhhise hsrghkrghmohgttghhihdrjhhp X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 30 Jan 2024 05:04:16 -0500 (EST) From: Takashi Sakamoto To: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Cc: adamg@pobox.com, stable@vger.kernel.org Subject: [PATCH 1/2] firewire: core: correct documentation of fw_csr_string() kernel API Date: Tue, 30 Jan 2024 19:04:08 +0900 Message-Id: <20240130100409.30128-2-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240130100409.30128-1-o-takashi@sakamocchi.jp> References: <20240130100409.30128-1-o-takashi@sakamocchi.jp> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789509667419317090 X-GMAIL-MSGID: 1789509667419317090 Against its current description, the kernel API can accepts all types of directory entries. This commit corrects the documentation. Cc: stable@vger.kernel.org Fixes: 3c2c58cb33b3 ("firewire: core: fw_csr_string addendum") Signed-off-by: Takashi Sakamoto --- drivers/firewire/core-device.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c index 0547253d16fe..e4cb5106fb7d 100644 --- a/drivers/firewire/core-device.c +++ b/drivers/firewire/core-device.c @@ -118,10 +118,9 @@ static int textual_leaf_to_string(const u32 *block, char *buf, size_t size) * @buf: where to put the string * @size: size of @buf, in bytes * - * The string is taken from a minimal ASCII text descriptor leaf after - * the immediate entry with @key. The string is zero-terminated. - * An overlong string is silently truncated such that it and the - * zero byte fit into @size. + * The string is taken from a minimal ASCII text descriptor leaf just after the entry with the + * @key. The string is zero-terminated. An overlong string is silently truncated such that it + * and the zero byte fit into @size. * * Returns strlen(buf) or a negative error code. */ From patchwork Tue Jan 30 10:04:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 193953 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1113090dyb; Tue, 30 Jan 2024 02:07:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IGGZVfh7xhV0kK99jdjpgkQYNf1McK2uz17MVK6xVDwFU89HLrWgKmCl9yPp7zgOHZgSRRA X-Received: by 2002:aa7:d052:0:b0:55f:3cb:9cfa with SMTP id n18-20020aa7d052000000b0055f03cb9cfamr3213855edo.30.1706609267580; Tue, 30 Jan 2024 02:07:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706609267; cv=pass; d=google.com; s=arc-20160816; b=t/F+EKGLZkUCIXdaLvEv3LhJO3U/+wR2ImpFWOzk1kHuPz//ugtooBGbKLrY79pU1x Qmg18z/qHvyprNO0QuPV7VZWlrI7NWr9pQ9/w/8DaTZXyNMrBj1PjtSiUb9vGigCVzX5 vKTGWsZt/iukZ00SXoyzC2xZDfZVkgOiaKsbm+BrBhCcKcDl5qj2OBawJkK0tJLZpb3s WIfXVP8oD7M6kjmiK2BMIuIW7SQYYoo0JzZTKlrx4Yr7UcVnE08rvPfDYFpZjPHaEy7u T3ouX8p6nv/UbhyxSK++S9MYo0KNvYuUVMpDBqEuSzkM5GUlvLs/71ciABhXH4Q3nHRQ emyg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:feedback-id:dkim-signature:dkim-signature; bh=I+csVATMzSI1F8H1aPvtNTgAoo14qkkNUYONssdVe64=; fh=29+NP+Avo3KW5WAFiPrv+jdOjQZBDMQJMXZlHI+I9m4=; b=EcxN4gQ7CIVJKyWTLdckM7Vzj9Ru9MY1QOQUbNRjlDfz4KfC0zu8eNw+5LEn7j8w8F cL3iEiwxEOCTKyEiU0xdVI+DAq8fCLThNDz+9UlUYBqwi4voSxVSvTqCnXDblgcDGdPQ da7XK8eJtzJlN4HCr9+UU2iMLtKy8hTIydlfbHR1rzd7WvFm/9pbUbqCfE6aU+wxMM/j uzIKqjq3iTCEX9rKiZ68pviLdJp7urxM7ALN9Ha1i0HNBlNMLqJTZP1I/TFqQeT/gJET /d4cfOqm3LbK0z9fBEHhaqiEVBgjMxp6MADe2WU7kiCWDfjnQbK954ne09G9f9V4pqT0 IFJQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sakamocchi.jp header.s=fm3 header.b="NxRYIy/x"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=Ngr+Tur7; arc=pass (i=1 spf=pass spfdomain=sakamocchi.jp dkim=pass dkdomain=sakamocchi.jp dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=sakamocchi.jp); spf=pass (google.com: domain of linux-kernel+bounces-44350-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44350-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sakamocchi.jp Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id n2-20020a056402434200b0055ed802c22bsi2687727edc.528.2024.01.30.02.07.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 02:07:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44350-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@sakamocchi.jp header.s=fm3 header.b="NxRYIy/x"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=Ngr+Tur7; arc=pass (i=1 spf=pass spfdomain=sakamocchi.jp dkim=pass dkdomain=sakamocchi.jp dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=sakamocchi.jp); spf=pass (google.com: domain of linux-kernel+bounces-44350-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44350-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sakamocchi.jp Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 271AB1F24149 for ; Tue, 30 Jan 2024 10:06:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 56E0767E89; Tue, 30 Jan 2024 10:04:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="NxRYIy/x"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Ngr+Tur7" Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6065460B9F for ; Tue, 30 Jan 2024 10:04:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.123.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706609064; cv=none; b=a7fA2uRjSHXHh0sHuF8bATXVNfkTfeB88fB4RJZ6IWwIrB5+96xeJipzV0i7FafE0NVSd4kqTnydBh1YOyHUFpz4yOhc+l/XRBVEa5FAMOuhLqAERp7pP07ofsjdxJvFUxbiJQWkh8FnV4oYLiySHD6XkNX/ylS5EbihDO5I2to= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706609064; c=relaxed/simple; bh=FfkYryqAmG6xE6UW8GUeT6E10tnJ8xZna0vF8DOBDBo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=I/WsQXQ/HV+MKUNKw1kMmClFS1QPaXcMAoCaszTbfNwIBuCso7OwnANdQ+HxZcjSuwL7iwbMbADV3v9oyxNAiXfO3dS5sMU8YiCH4M7Udt6fKlE1Ra+J3DLxIRYB1Q3lEKEI4T48f/nlfUVEdN8D1UICzvFcv3GgCUwzNgFmj3c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp; spf=pass smtp.mailfrom=sakamocchi.jp; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b=NxRYIy/x; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Ngr+Tur7; arc=none smtp.client-ip=64.147.123.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sakamocchi.jp Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 2C3C93200B4D; Tue, 30 Jan 2024 05:04:21 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 30 Jan 2024 05:04:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1706609060; x= 1706695460; bh=I+csVATMzSI1F8H1aPvtNTgAoo14qkkNUYONssdVe64=; b=N xRYIy/xZfHsyrINy6VgUN+snFexBvSAXBge0HXOtuCdkict2BkEi2tPFfD0wwSQT hgapcf0R3KbxMo40D7/AoPnPh3r+pfN4hwjO0c/mdc/P6YhwhfmtCMfizF/c8WpQ f5OMQ7zAvkAXf7Tg2iByjnvxPA3HJIgXkpC1vSg4lutbTkmRsSNacBW+Is6guvqN ObijbQK3Pb/ZDToYdlYg0sba38KHLFrOkttx6ZJRP2w33yf0lql7u1TjeIYFR9Qx jFth5hrhS/BSOU73jlTyJ1yCekQUxzD+bnnNeQfJzSoKYB1ZpUgeEVFkrMmFsW33 sBAzm9EqxlCZXnIDR4XFA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1706609060; x= 1706695460; bh=I+csVATMzSI1F8H1aPvtNTgAoo14qkkNUYONssdVe64=; b=N gr+Tur7N1qun+HgmRQaInOhgmSAX9BseCsxsfCWM8wWYozm73voDnO0CiqPvTuGU BVsZVCx9X7IrTeG0sQCM8TQjm6mpRRVMY/l8LjFX9wGy6aodvvsqIZtYUKy4IMrY rSzGVmvl8ywsFUELFDTl9oZnGwIRFxbNFg0ZkU12vPp3m8dI4nituQlkudnlqoUW l0TJ7iqGResAr4RYgsoTCyiYjjHtnXwBCLlR80HWRSBoOoIANkhJKoWcja8TXw9M gLYf+K68yzeyMsqDqAx+jkZXqrnkLuMf1JBI3DLk5GCaCO8JiwThYU7lAO74+JNz j/TqlA653GgjB8R93ij9A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfedtiedgudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefvrghkrghshhhiucfurghkrghmohhtohcuoehoqdhtrghk rghshhhisehsrghkrghmohgttghhihdrjhhpqeenucggtffrrghtthgvrhhnpedvjefgje euvdfguddukeelveetgfdtvefhtdfffeeigfevueetffeivdffkedvtdenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehoqdhtrghkrghshhhise hsrghkrghmohgttghhihdrjhhp X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 30 Jan 2024 05:04:19 -0500 (EST) From: Takashi Sakamoto To: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Cc: adamg@pobox.com Subject: [PATCH 2/2] firewire: core: search descriptor leaf just after vendor directory entry in root directory Date: Tue, 30 Jan 2024 19:04:09 +0900 Message-Id: <20240130100409.30128-3-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240130100409.30128-1-o-takashi@sakamocchi.jp> References: <20240130100409.30128-1-o-takashi@sakamocchi.jp> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789509518993364901 X-GMAIL-MSGID: 1789509518993364901 It appears that Sony DVMC-DA1 has a quirk that the descriptor leaf entry locates just after the vendor directory entry in root directory. This is not conformant to the legacy layout of configuration ROM described in Configuration ROM for AV/C Devices 1.0 (1394 Trading Association, Dec 2000, TA Document 1999027). This commit changes current implementation to parse configuration ROM for device attributes so that the descriptor leaf entry can be detected for the vendor name. $ config-rom-pretty-printer < Sony-DVMC-DA1.img ROM header and bus information block ----------------------------------------------------------------- 1024 041ee7fb bus_info_length 4, crc_length 30, crc 59387 1028 31333934 bus_name "1394" 1032 e0644000 irmc 1, cmc 1, isc 1, bmc 0, cyc_clk_acc 100, max_rec 4 (32) 1036 08004603 company_id 080046 | 1040 0014193c device_id 12886219068 | EUI-64 576537731003586876 root directory ----------------------------------------------------------------- 1044 0006b681 directory_length 6, crc 46721 1048 03080046 vendor 1052 0c0083c0 node capabilities: per IEEE 1394 1056 8d00000a --> eui-64 leaf at 1096 1060 d1000003 --> unit directory at 1072 1064 c3000005 --> vendor directory at 1084 1068 8100000a --> descriptor leaf at 1108 unit directory at 1072 ----------------------------------------------------------------- 1072 0002cdbf directory_length 2, crc 52671 1076 1200a02d specifier id 1080 13010000 version vendor directory at 1084 ----------------------------------------------------------------- 1084 00020cfe directory_length 2, crc 3326 1088 17fa0000 model 1092 81000008 --> descriptor leaf at 1124 eui-64 leaf at 1096 ----------------------------------------------------------------- 1096 0002c66e leaf_length 2, crc 50798 1100 08004603 company_id 080046 | 1104 0014193c device_id 12886219068 | EUI-64 576537731003586876 descriptor leaf at 1108 ----------------------------------------------------------------- 1108 00039e26 leaf_length 3, crc 40486 1112 00000000 textual descriptor 1116 00000000 minimal ASCII 1120 536f6e79 "Sony" descriptor leaf at 1124 ----------------------------------------------------------------- 1124 0005001d leaf_length 5, crc 29 1128 00000000 textual descriptor 1132 00000000 minimal ASCII 1136 44564d43 "DVMC" 1140 2d444131 "-DA1" 1144 00000000 Suggested-by: Adam Goldman Signed-off-by: Takashi Sakamoto --- drivers/firewire/core-device.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c index e4cb5106fb7d..7d3346b3a2bf 100644 --- a/drivers/firewire/core-device.c +++ b/drivers/firewire/core-device.c @@ -367,8 +367,17 @@ static ssize_t show_text_leaf(struct device *dev, for (i = 0; i < ARRAY_SIZE(directories) && !!directories[i]; ++i) { int result = fw_csr_string(directories[i], attr->key, buf, bufsize); // Detected. - if (result >= 0) + if (result >= 0) { ret = result; + } else if (i == 0 && attr->key == CSR_VENDOR) { + // Sony DVMC-DA1 has configuration ROM such that the descriptor leaf entry + // in the root directory follows to the directory entry for vendor ID + // instead of the immediate value for vendor ID. + result = fw_csr_string(directories[i], CSR_DIRECTORY | attr->key, buf, + bufsize); + if (result >= 0) + ret = result; + } } if (ret >= 0) {