[PATCH v2 00/12] firewire: deliver hardware time stamp for asynchronous transaction

From: Takashi Sakamoto
Date: Thu May 25 2023 - 06:17:22 EST


Hi,

This patchset is revised version of the previous one[1]. Copied from the
cover letter:

1394 OHCI hardware supports hardware time stamp for asynchronous
communication at 8,000 Hz resolution (= isochronous cycle), while
current implementation of FireWire subsystem does not deliver the time
stamp to both unit driver and user space application when operating the
asynchronous communication. It is inconvenient to a kind of application
which attempts to synchronize data from multiple sources by the (coarse)
time stamp.

This patchset changes the subsystem so that the unit driver and the user
space application to receive the time stamp, therefore it affects kernel
service for asynchronous transaction, kernel API for unit driver, and UAPI
for user space application.


The first patch is newly added for KUnit test to check layout of structure
exposed to user space. I'm pleased if getting any review by KUnit
developers since it is my first time to write any KUnit test.

The new feature will be used for my future work to replace tasklet with
workqueue. The hardware time stamp could enable us to compute the
processing delay so precise.

[1] https://lore.kernel.org/lkml/20230125120301.51585-1-o-takashi@xxxxxxxxxxxxx/

Takashi Sakamoto (12):
firewire: add KUnit test to check layout of UAPI structures
firewire: cdev: add new version of ABI to notify time stamp at
request/response subaction of transaction
firewire: cdev: add new event to notify request subaction with time
stamp
firewire: cdev: implement new event to notify request subaction with
time stamp
firewire: core: use union for callback of transaction completion
firewire: core: implement variations to send request and wait for
response with time stamp
firewire: cdev: code refactoring to operate event of response
firewire: cdev: add new event to notify response subaction with time
stamp
firewire: cdev: implement new event to notify response subaction with
time stamp
firewire: cdev: code refactoring to dispatch event for phy packet
firewire: cdev: add new event to notify phy packet with time stamp
firewire: cdev: implement new event relevant to phy packet with time
stamp

drivers/firewire/.kunitconfig | 4 +
drivers/firewire/Kconfig | 16 ++
drivers/firewire/Makefile | 3 +
drivers/firewire/core-cdev.c | 252 +++++++++++++++++++++-------
drivers/firewire/core-transaction.c | 93 +++++++---
drivers/firewire/core.h | 7 +
drivers/firewire/ohci.c | 17 +-
drivers/firewire/uapi-test.c | 87 ++++++++++
include/linux/firewire.h | 82 ++++++++-
include/uapi/linux/firewire-cdev.h | 180 +++++++++++++++++---
10 files changed, 625 insertions(+), 116 deletions(-)
create mode 100644 drivers/firewire/.kunitconfig
create mode 100644 drivers/firewire/uapi-test.c

--
2.39.2