mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
firewire: ohci: fulfill timestamp for some local asynchronous transaction
commit 09773bf55aeabe3fd61745d900798dc1272c778a upstream.
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: stable@vger.kernel.org
Fixes: dcadfd7f7c
("firewire: core: use union for callback of transaction completion")
Link: https://lore.kernel.org/r/20240429084709.707473-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a34dd17da9
commit
5e651695c3
1 changed files with 6 additions and 2 deletions
|
@ -1556,6 +1556,8 @@ static int handle_at_packet(struct context *context,
|
||||||
#define HEADER_GET_DATA_LENGTH(q) (((q) >> 16) & 0xffff)
|
#define HEADER_GET_DATA_LENGTH(q) (((q) >> 16) & 0xffff)
|
||||||
#define HEADER_GET_EXTENDED_TCODE(q) (((q) >> 0) & 0xffff)
|
#define HEADER_GET_EXTENDED_TCODE(q) (((q) >> 0) & 0xffff)
|
||||||
|
|
||||||
|
static u32 get_cycle_time(struct fw_ohci *ohci);
|
||||||
|
|
||||||
static void handle_local_rom(struct fw_ohci *ohci,
|
static void handle_local_rom(struct fw_ohci *ohci,
|
||||||
struct fw_packet *packet, u32 csr)
|
struct fw_packet *packet, u32 csr)
|
||||||
{
|
{
|
||||||
|
@ -1580,6 +1582,8 @@ static void handle_local_rom(struct fw_ohci *ohci,
|
||||||
(void *) ohci->config_rom + i, length);
|
(void *) ohci->config_rom + i, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Timestamping on behalf of the hardware.
|
||||||
|
response.timestamp = cycle_time_to_ohci_tstamp(get_cycle_time(ohci));
|
||||||
fw_core_handle_response(&ohci->card, &response);
|
fw_core_handle_response(&ohci->card, &response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1628,6 +1632,8 @@ static void handle_local_lock(struct fw_ohci *ohci,
|
||||||
fw_fill_response(&response, packet->header, RCODE_BUSY, NULL, 0);
|
fw_fill_response(&response, packet->header, RCODE_BUSY, NULL, 0);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
// Timestamping on behalf of the hardware.
|
||||||
|
response.timestamp = cycle_time_to_ohci_tstamp(get_cycle_time(ohci));
|
||||||
fw_core_handle_response(&ohci->card, &response);
|
fw_core_handle_response(&ohci->card, &response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1670,8 +1676,6 @@ static void handle_local_request(struct context *ctx, struct fw_packet *packet)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 get_cycle_time(struct fw_ohci *ohci);
|
|
||||||
|
|
||||||
static void at_context_transmit(struct context *ctx, struct fw_packet *packet)
|
static void at_context_transmit(struct context *ctx, struct fw_packet *packet)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue