From nobody Tue Feb 10 16:26:55 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 885D9C27C76 for ; Wed, 25 Jan 2023 12:03:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235549AbjAYMDV (ORCPT ); Wed, 25 Jan 2023 07:03:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235247AbjAYMDM (ORCPT ); Wed, 25 Jan 2023 07:03:12 -0500 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D95CB5689F for ; Wed, 25 Jan 2023 04:03:11 -0800 (PST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 50F5A5C01B0; Wed, 25 Jan 2023 07:03:11 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 25 Jan 2023 07:03:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1674648191; x= 1674734591; bh=vxkfReO71prrNWdj/ls9FxWUEiwc8tsI0fkpO1vRHYI=; b=g CcUsXMhP/iS0ZOgXVGbyoru3SKvETDxPDdO5Ehqp8ekpRZheA6+4TarNidxmBu0y vqpCRqBvfSOfCV5TNmKVutRDatHnzP0DjsCK2Pb79iilVJ8K9OTCfI10F7h42qw+ FMZqZVPJqkW1UNku6VtxOPXZMsYaci47IBfA4zS8Q8IJNx00aspL6/3qBOulcPtu BWb/zRjuvjttyt+05hugR9LU0c/RgPxp1BCIzcJU2b+3/UjuUC2smT69uWlSqPL7 ku5MYIoaoTX0UW4mPyhvdW6EwOPi0dfJpsLPiaOaz8twX4LN6h5qrqMRpLP4BXqV rCo8PYYfjRwpiKYPN4tAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1674648191; x=1674734591; bh=vxkfReO71prrN Wdj/ls9FxWUEiwc8tsI0fkpO1vRHYI=; b=mX6CP2QGKCJkbigXCYDQZXaVHQfZj AzXuA6i81ltjT2vf/dnG1WMPG2kGki7ljhKcGdpiuGe4TUox5LbV6eisuZVj3xvn NenozAQQkdAnZWDgPnIHQSqw3DiRdP79XMIrUbKY8enIL2UANxXfEWlJwZYlepsE FZL1Xh6/TkWiAB1GnPK9ANHHJrn7TLOSR06xkou/cm3kuwiGxEG0VMcPuVWy0aO1 gNlRcy9DIk9vptIStQ+5KhS35zhI5SfDzMkCHU7GhMcG2QhkxIwvH/wIFKL2jiWu m/D9jzeQuPGckLGzKezl4qSRVfOk3xzAZkPTC6d2vtEoNxiR5okZnQdFg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddvvddgfeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefvrghkrghshhhiucfurghkrghmohhtohcuoehoqdhtrghk rghshhhisehsrghkrghmohgttghhihdrjhhpqeenucggtffrrghtthgvrhhnpedvjefgje euvdfguddukeelveetgfdtvefhtdfffeeigfevueetffeivdffkedvtdenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehoqdhtrghkrghshhhise hsrghkrghmohgttghhihdrjhhp X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 25 Jan 2023 07:03:09 -0500 (EST) From: Takashi Sakamoto To: stefanr@s5r6.in-berlin.de Cc: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, tiwai@suse.de Subject: [PATCH 03/11] firewire: cdev: implement new event to notify request subaction with time stamp Date: Wed, 25 Jan 2023 21:02:53 +0900 Message-Id: <20230125120301.51585-4-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230125120301.51585-1-o-takashi@sakamocchi.jp> References: <20230125120301.51585-1-o-takashi@sakamocchi.jp> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" In 1394 OHCI, the trailer quadlet of descriptor in Asynchronous Receive (AR) request context has timeStamp field, in which the 1394 OHCI controller record the isochronous cycle when the packet arrived. Current implementation of 1394 OHCI controller driver stores the value of field to internal structure as time stamp, while the implementation of FireWire character device doesn't have a field for the time stamp, thus it is not available in user space. The time stamp is convenient to some kind of application in which data from several sources are compared in isochronous cycle unit. This commit implement the new event, fw_cdev_event_request3, with an additional field, tstamp. Signed-off-by: Takashi Sakamoto --- drivers/firewire/core-cdev.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c index 88c8b5fac5e5..5a9446d30447 100644 --- a/drivers/firewire/core-cdev.c +++ b/drivers/firewire/core-cdev.c @@ -178,6 +178,7 @@ struct inbound_transaction_event { union { struct fw_cdev_event_request request; struct fw_cdev_event_request2 request2; + struct fw_cdev_event_request3 with_tstamp; } req; }; =20 @@ -709,7 +710,7 @@ static void handle_request(struct fw_card *card, struct= fw_request *request, req->handle =3D r->resource.handle; req->closure =3D handler->closure; event_size0 =3D sizeof(*req); - } else { + } else if (handler->client->version < FW_CDEV_VERSION_EVENT_ASYNC_TSTAMP)= { struct fw_cdev_event_request2 *req =3D &e->req.request2; =20 req->type =3D FW_CDEV_EVENT_REQUEST2; @@ -723,6 +724,21 @@ static void handle_request(struct fw_card *card, struc= t fw_request *request, req->handle =3D r->resource.handle; req->closure =3D handler->closure; event_size0 =3D sizeof(*req); + } else { + struct fw_cdev_event_request3 *req =3D &e->req.with_tstamp; + + req->type =3D FW_CDEV_EVENT_REQUEST3; + req->tcode =3D tcode; + req->offset =3D offset; + req->source_node_id =3D source; + req->destination_node_id =3D destination; + req->card =3D card->index; + req->generation =3D generation; + req->length =3D length; + req->handle =3D r->resource.handle; + req->closure =3D handler->closure; + req->tstamp =3D fw_request_get_timestamp(request); + event_size0 =3D sizeof(*req); } =20 queue_event(handler->client, &e->event, --=20 2.37.2