Skip to content

Commit 09773bf

Browse files
committed
firewire: ohci: fulfill timestamp for some local asynchronous transaction
1394 OHCI driver generates packet data for the response subaction to the request subaction to some local registers. In the case, the driver should assign timestamp to them by itself. This commit fulfills the timestamp for the subaction. Cc: [email protected] Fixes: dcadfd7 ("firewire: core: use union for callback of transaction completion") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Sakamoto <[email protected]>
1 parent 38762a0 commit 09773bf

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/firewire/ohci.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,6 +1556,8 @@ static int handle_at_packet(struct context *context,
15561556
#define HEADER_GET_DATA_LENGTH(q) (((q) >> 16) & 0xffff)
15571557
#define HEADER_GET_EXTENDED_TCODE(q) (((q) >> 0) & 0xffff)
15581558

1559+
static u32 get_cycle_time(struct fw_ohci *ohci);
1560+
15591561
static void handle_local_rom(struct fw_ohci *ohci,
15601562
struct fw_packet *packet, u32 csr)
15611563
{
@@ -1580,6 +1582,8 @@ static void handle_local_rom(struct fw_ohci *ohci,
15801582
(void *) ohci->config_rom + i, length);
15811583
}
15821584

1585+
// Timestamping on behalf of the hardware.
1586+
response.timestamp = cycle_time_to_ohci_tstamp(get_cycle_time(ohci));
15831587
fw_core_handle_response(&ohci->card, &response);
15841588
}
15851589

@@ -1628,6 +1632,8 @@ static void handle_local_lock(struct fw_ohci *ohci,
16281632
fw_fill_response(&response, packet->header, RCODE_BUSY, NULL, 0);
16291633

16301634
out:
1635+
// Timestamping on behalf of the hardware.
1636+
response.timestamp = cycle_time_to_ohci_tstamp(get_cycle_time(ohci));
16311637
fw_core_handle_response(&ohci->card, &response);
16321638
}
16331639

@@ -1670,8 +1676,6 @@ static void handle_local_request(struct context *ctx, struct fw_packet *packet)
16701676
}
16711677
}
16721678

1673-
static u32 get_cycle_time(struct fw_ohci *ohci);
1674-
16751679
static void at_context_transmit(struct context *ctx, struct fw_packet *packet)
16761680
{
16771681
unsigned long flags;

0 commit comments

Comments
 (0)