From patchwork Wed Dec 20 04:17:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 18346 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp2408915dyi; Tue, 19 Dec 2023 20:18:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IH1dC5bG8U7UkGG/L1c+xHhTGJv+J8OE2gBxLJ+K9RKLPb3gkEbtNmuzGRQlvclu66nIkC3 X-Received: by 2002:a05:622a:1352:b0:425:85b7:a784 with SMTP id w18-20020a05622a135200b0042585b7a784mr28747804qtk.53.1703045918025; Tue, 19 Dec 2023 20:18:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703045918; cv=none; d=google.com; s=arc-20160816; b=ZJ669fIl1T8I0q/RiY5PG4Z8spkqfwf7ZZgwG3sC+xuGwW1KAi71Q2lyOHnqwk/7cZ B3lKE9OLJR/7ir+ngmHGjom2MkNUPGSw3ETxWPgMXwjGqckSAHhugrDui8QAC4UnXrb2 I13U/RCIGQDGTfElwrrz1q9XEQx2snaHT3hpNZQnHAJXviCwHrRY48mtiVuF48K4vebd 2jGFQrrXWk+f72qhzDq+fic9VqFOWwfqnKvIcvtbfrVQnnAYhfWxAziZH0rs4b8QI36b aB+efYZfgCzUjrD+A5rFPgm9MXj+HwM5t+HXAEJzDcVC9idqfoyRtWP7T6icOKw55M2w +o+A== ARC-Message-Signature: i=1; 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:message-id:date:subject:cc:to :from:feedback-id:dkim-signature:dkim-signature; bh=XR6dDe9SdLViul/VkLKU8KFtzdmbcDDwaOcUEYOSNO8=; fh=29+NP+Avo3KW5WAFiPrv+jdOjQZBDMQJMXZlHI+I9m4=; b=RDEBnwSaYr67ECrPjz/EFQjyqjWU9fv39ppBlKjONvYvIqeNJqzMvOZOnOOKn/6d/u WOMZrTd4YWEMQpt/a1jWJsr2P3l34Qru1cvstV6FXhSyUFhsSGkIANoGn38XBg4YjvC5 Ln+3gxpk3XJCxU8hjuF5d+x5arkH3N7WNlE4u6CUErZUXDwuVWjR3mZaGwpfqfUzsAsT PSIVSDe1SBK00RyQZlyIjQy3mjKQIiX+MrkerdHauZXSwe78C5OJ1pUoHPKvNd3AeY24 wk7vEkDOnG9nl8vfF2jtK0vCbBdLulC6B01A/Nf/CWc3hZjs7KX7cHmVzuV1y/XW8xNY 6Vnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sakamocchi.jp header.s=fm2 header.b=tHtRqaZ9; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=DOe8Cv2u; spf=pass (google.com: domain of linux-kernel+bounces-6352-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6352-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sakamocchi.jp Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id w17-20020ac857d1000000b004278c22b8fdsi48027qta.784.2023.12.19.20.18.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 20:18:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6352-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@sakamocchi.jp header.s=fm2 header.b=tHtRqaZ9; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=DOe8Cv2u; spf=pass (google.com: domain of linux-kernel+bounces-6352-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6352-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B8B8E1C252C4 for ; Wed, 20 Dec 2023 04:18:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9E54C101CB; Wed, 20 Dec 2023 04:18:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="tHtRqaZ9"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="DOe8Cv2u" X-Original-To: linux-kernel@vger.kernel.org Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) (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 DB8DA1D699 for ; Wed, 20 Dec 2023 04:18:13 +0000 (UTC) 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 compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 9304E3200A48; Tue, 19 Dec 2023 23:18:12 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 19 Dec 2023 23:18:12 -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:message-id:mime-version:reply-to:subject :subject:to:to; s=fm2; t=1703045892; x=1703132292; bh=XR6dDe9SdL Viul/VkLKU8KFtzdmbcDDwaOcUEYOSNO8=; b=tHtRqaZ99J5AIwISQrc7f9TcXj 7OrcfI3GJKy/hzIUbQ2a0hJqBgJ+bofWvUuhnhI9TdSTfawP8Vlsq2h/3DeL+Xu8 /52E3BJ6aPk0lFwqArm1hu/8NPklYoNt4ZnxDvuqrfYzlA+akQ1Vrdubwke1e56R R6YDTypOh7WFGNU2QwXDqD2uyCo323WqdOlGYT6GV89TE3pT1RwuqCQDApvzxG4i OU7b5+hgJbyMPFdSNW/zoyKfVNWw66wZjpDVaRUWZUliG/tCDIs9JhjYkpLAOQi6 M1964CdmjlukOk4mlM7mNRnE4TSt+TpIxGbbz0+ZGQzoxhdN7xXDTG+cGqqg== 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:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1703045892; x=1703132292; bh=XR6dDe9SdLViul/VkLKU8KFtzdmb cDDwaOcUEYOSNO8=; b=DOe8Cv2ulwMcqqbBx0m4EgDw2T5pSJFbYNQeF/T/Awi2 CdpxfWY4MgIOzNNXVOqThrXYg2Q9Kug8kh3uYY/8jtmOIuEJsVG7T+hxeSno3BT+ gW7PMJ8ghcNbh98PyRZLSW4B2bPSk9kbwQc3wUBg7D9sknrWZgnaORbkQrDGEY28 MsV+2b9t7VeAL2UP/fiQKMk1ESxpOrk6laBhB6jHfeiH/3T6eKPR3UOwIUNP0V10 Jyrj3jGfg9rFHufH0n2XMyQtFTnTg7X9PFLLHKzxmIKTkTbN8xUZvqa3vXy6cb9b r5eY2UlcUwBmDvcwDTYFn9aqtrrNjhmo8x3KAaMtjA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdduuddgieekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgoufhushhpvggtthffohhmrghinhculdegledmne cujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomhepvfgrkhgrshhh ihcuufgrkhgrmhhothhouceoohdqthgrkhgrshhhihesshgrkhgrmhhotggthhhirdhjph eqnecuggftrfgrthhtvghrnhepuddvleetteefledttefhvddtteelkedtgffguddvudev teeuhedvveejleetgedvnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghdprghrtghhih hvvgdrohhrghdpudefleegthgrrdhorhhgpdhsohhurhgtvghfohhrghgvrdhnvghtnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepohdqthgrkh grshhhihesshgrkhgrmhhotggthhhirdhjph X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 19 Dec 2023 23:18:09 -0500 (EST) From: Takashi Sakamoto To: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Cc: adamg@pobox.com Subject: [PATCH 0/8] firewire: core: support legacy layout of configuration ROM for AV/C device Date: Wed, 20 Dec 2023 13:17:58 +0900 Message-Id: <20231220041806.39816-1-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.39.2 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: 1785773076510492968 X-GMAIL-MSGID: 1785773076510492968 Hi, This series of change is to update my previous post for RFC[1], and for merge. Current core function of Linux FireWire subsystem has support for legacy layout of configuration ROM, described in annex of 1394TA document[2]. However, in a point of device attributes (e.g. nodes in sysfs), there are differences between devices with the legacy and standard layout of configuration ROM. The differences bring some inconveniences to users[3]. The series includes changes to solve them. The series includes changes relevant to driver matching procedure and notification to user space, thus could easily bring functional regression. For safe, the series includes some KUnit applications to test the change. However, backward incompatibility is inevitable due to change of modalias for device corresponding to unit. As long as I investigated, any unit drivers in kernel are not affected by the change. Additionally, less applications in user space are not as well. I think we can be optimistic to the regression. Changes from RFC: * rename file and KUnit tests so that they are related to device attributes * fix traverse failure when detecting textual descriptor * remove redundant indication for CSR key type [1] [RFC PATCH 0/8] firewire: core: support legacy layout of configuration ROM for AV/C device https://lore.kernel.org/lkml/20231217103012.41273-1-o-takashi@sakamocchi.jp/ [2] Configuration ROM for AV/C Devices 1.0 (December 12, 2000, 1394 Trading Association, TA Document 1999027) https://web.archive.org/web/20210216003030/http://1394ta.org/wp-content/uploads/2015/07/1999027.pdf [3] [PATCH] Fix missing sysfs vendor/model entries for some devices https://sourceforge.net/p/linux1394/mailman/message/55802731/ Takashi Sakamoto (8): firewire: core: adds constant qualifier for local helper functions firewire: core: replace magic number with macro firewire: test: add KUnit test for device attributes firewire: test: add test of device attributes for simple AV/C device firewire: test: add test of device attributes for legacy AV/C device firewire: core: detect numeric model identifier for legacy layout of configuration ROM firewire: core: detect model name for legacy layout of configuration ROM firewire: core: change modalias of unit device with backward incompatibility drivers/firewire/.kunitconfig | 1 + drivers/firewire/Kconfig | 16 ++ drivers/firewire/core-device.c | 127 +++++++++--- drivers/firewire/device-attribute-test.c | 251 +++++++++++++++++++++++ 4 files changed, 368 insertions(+), 27 deletions(-) create mode 100644 drivers/firewire/device-attribute-test.c