From nobody Tue Feb 10 12:14:22 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 06FB8C77B7E for ; Thu, 25 May 2023 10:17:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240827AbjEYKRt (ORCPT ); Thu, 25 May 2023 06:17:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240840AbjEYKRC (ORCPT ); Thu, 25 May 2023 06:17:02 -0400 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 059BF1A8 for ; Thu, 25 May 2023 03:16:36 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 64BEA5C01ED; Thu, 25 May 2023 06:16:35 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 25 May 2023 06:16:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1685009795; x= 1685096195; bh=vLnKaQC1H8MrzTAmo/K64YxxQOflNTjfEH6QTfOvlSY=; b=r Me9UGIKIYubaxAzCMoCJuLL34vKW9rQ3GKszPnxYTlYZ1j8KDBcMffbPNecKOSXH cRKo3FdfbF2rlgaibRS2mNdaq9LGhseuxU2Fb3PviqgSrOfacDVquY3Fj6dVyn1X +bspzWcyN5IZVHGR1c2MdoKVmWxMMixL9KRE01X45W7zRBxYGMcQy5nA/zq7ZSM0 DP01O7xVbW+x2UMNy9XCrgernAQMZ2rcM4LusRFuWA5MGGbj02cQJ+TKE/rAlyy3 gok6gx22YZh9T7suL7AoWCm/7ZKgQ8449UA203Av61ZP070y8c7rgNxPH66UrM1B EiQdMORotKg6Px9NyXaiQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1685009795; x=1685096195; bh=v LnKaQC1H8MrzTAmo/K64YxxQOflNTjfEH6QTfOvlSY=; b=lS+pVgxAzWARH2r9Y T+6JkJEWcgIJaDGl6EQORgrlc6Qet4reqm7KqQ7q8CifGvzj/l/01Zv5to9yXvu9 vu0mT3Neil9g2/rJB3/rggUHOvVH0prXaxQDJ7/KLc5q/kJNjRys/KWAgw8DmZKq v3caOZUX70cjtwWiAVy//MeJvDzoRLv6g703KVhDJac10ReHOPz7OJLoKWKnbs29 DYHQYiHGuFXCurMBuEQuSO7Mg74hlKBk+SW1U0JnNg+ZdFDFMM6WFveV96w1eZh8 ASDku0nzuqR2KYHRTxnLHSxdYM56gAR0sHvSBDDPuPs9qL7a++t30YHnB+S4ksk1 hfNDQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeejjedgvdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepvfgrkhgrshhhihcuufgrkhgrmhhothhouceoohdqthgrkhgr shhhihesshgrkhgrmhhotggthhhirdhjpheqnecuggftrfgrthhtvghrnhepveefffefke etgfevgeefleehfffhueejtdejveethfekveektdejjedvtdejhfejnecuvehluhhsthgv rhfuihiivgepudenucfrrghrrghmpehmrghilhhfrhhomhepohdqthgrkhgrshhhihessh grkhgrmhhotggthhhirdhjph X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 25 May 2023 06:16:34 -0400 (EDT) From: Takashi Sakamoto To: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH v2 04/12] firewire: cdev: implement new event to notify request subaction with time stamp Date: Thu, 25 May 2023 19:16:17 +0900 Message-Id: <20230525101625.888906-5-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230525101625.888906-1-o-takashi@sakamocchi.jp> References: <20230525101625.888906-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.39.2