Comment 9 for bug 2043905

Revision history for this message
In , a.mark.broadworth (a.mark.broadworth-linux-kernel-bugs) wrote :

This appears to have been introduced with:

commit dcadfd7f7c74ef9ee415e072a19bdf6c085159eb (HEAD -> dcadfd7f7c7)
Author: Takashi Sakamoto <email address hidden>
Date: Tue May 30 08:12:40 2023 +0900

    firewire: core: use union for callback of transaction completion

    In 1394 OHCI, the OUTPUT_LAST descriptor of Asynchronous Transmit (AT)
    request context has timeStamp field, in which 1394 OHCI controller
    record the isochronous cycle when the packet was sent for the request
    subaction. Additionally, for the case of split transaction in IEEE 1394,
    Asynchronous Receive (AT) request context is used for response subaction
    to finish the transaction. The trailer quadlet of descriptor in the
    context has timeStamp field, in which 1394 OHCI controller records the
    isochronous cycle when the packet arrived.

    Current implementation of 1394 OHCI controller driver stores values of
    both fields to internal structure as time stamp, while Linux FireWire
    subsystem provides no way to access to it. When using asynchronous
    transaction service provided by the subsystem, callback function is passed
    to kernel API. The prototype of callback function has the lack of argument
    for the values.

    This commit adds a new callback function for the purpose. It has an
    additional argument to point to the constant array with two elements. For
    backward compatibility to kernel space, a new union is also adds to wrap
    two different prototype of callback function. The fw_transaction structure
    has the union as a member and a boolean flag to express which function
    callback is available.

    The core function is changed to handle the two cases; with or without
    time stamp. For the error path to process transaction, the isochronous
    cycle is computed by current value of CYCLE_TIMER register in 1394 OHCI
    controller. Especially for the case of timeout of split transaction, the
    expected isochronous cycle is computed.

    Link: https://<email address hidden>
    Signed-off-by: Takashi Sakamoto <email address hidden>