* [PATCH 0/2] firewire: core/ohci: misc fixes for transaction cancellation
@ 2026-09-27 4:44 Takashi Sakamoto
2026-09-27 4:44 ` [PATCH 1/2] firewire: core: remove unnecessary branch for timestamping when cancelling transaction request packets Takashi Sakamoto
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Takashi Sakamoto @ 2026-09-27 4:44 UTC (permalink / raw)
To: linux1394-devel; +Cc: linux-kernel
Hi,
This series includes the misc fixes for the transaction cancellation.
Takashi Sakamoto (2):
firewire: ohci: remove unnecessary branch for timestamping when
cancelling transaction request packets
firewire: ohci: run work immediately when re-enabled in packet
cancellation
drivers/firewire/core-transaction.c | 17 ++++++-----------
drivers/firewire/ohci.c | 2 +-
2 files changed, 7 insertions(+), 12 deletions(-)
base-commit: cc43480ac04cf909387d8b722f7491905ef7a7c3
--
2.53.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] firewire: core: remove unnecessary branch for timestamping when cancelling transaction request packets
2026-09-27 4:44 [PATCH 0/2] firewire: core/ohci: misc fixes for transaction cancellation Takashi Sakamoto
@ 2026-09-27 4:44 ` Takashi Sakamoto
2026-09-27 4:44 ` [PATCH 2/2] firewire: ohci: run work immediately when re-enabled in packet cancellation Takashi Sakamoto
2026-09-27 22:34 ` [PATCH 0/2] firewire: core/ohci: misc fixes for transaction cancellation Takashi Sakamoto
2 siblings, 0 replies; 4+ messages in thread
From: Takashi Sakamoto @ 2026-09-27 4:44 UTC (permalink / raw)
To: linux1394-devel; +Cc: linux-kernel
When fw_card_driver.cancel_packet() returns a non-zero value, the request
subaction of the transaction has already finished. It means that the
packet for the request subaction has already received an ack code and a
timestamp, so there is no need to check them.
Remove the unnecessary branch for the ack code and timestamp.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
---
drivers/firewire/core-transaction.c | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-transaction.c
index 8ef04d84011b..1e4c104c7e91 100644
--- a/drivers/firewire/core-transaction.c
+++ b/drivers/firewire/core-transaction.c
@@ -135,21 +135,16 @@ int fw_cancel_transaction(struct fw_card *card,
if (card->driver->cancel_packet(card, &transaction->packet) == 0)
return 0;
+ u32 curr_cycle_time = 0;
+
+ // Timestamping on behalf of hardware.
+ (void)fw_card_read_cycle_time(card, &curr_cycle_time);
+ tstamp = cycle_time_to_ohci_tstamp(curr_cycle_time);
+
/*
* If the request packet has already been sent, we need to see
* if the transaction is still pending and remove it in that case.
*/
-
- if (transaction->packet.ack == 0) {
- // The timestamp is reused since it was just read now.
- tstamp = transaction->packet.timestamp;
- } else {
- u32 curr_cycle_time = 0;
-
- (void)fw_card_read_cycle_time(card, &curr_cycle_time);
- tstamp = cycle_time_to_ohci_tstamp(curr_cycle_time);
- }
-
return close_transaction(transaction, card, RCODE_CANCELLED, tstamp);
}
EXPORT_SYMBOL(fw_cancel_transaction);
--
2.53.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] firewire: ohci: run work immediately when re-enabled in packet cancellation
2026-09-27 4:44 [PATCH 0/2] firewire: core/ohci: misc fixes for transaction cancellation Takashi Sakamoto
2026-09-27 4:44 ` [PATCH 1/2] firewire: core: remove unnecessary branch for timestamping when cancelling transaction request packets Takashi Sakamoto
@ 2026-09-27 4:44 ` Takashi Sakamoto
2026-09-27 22:34 ` [PATCH 0/2] firewire: core/ohci: misc fixes for transaction cancellation Takashi Sakamoto
2 siblings, 0 replies; 4+ messages in thread
From: Takashi Sakamoto @ 2026-09-27 4:44 UTC (permalink / raw)
To: linux1394-devel; +Cc: linux-kernel
During packet cancellation, the work item for the AT request context is
disabled. As a result, packets for request subactions are not processed
by the work item even if they finished, since the work item can not be
scheduled from hardIRQ handling.
Run the work item immediately after re-enabling it.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
---
drivers/firewire/ohci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
index 710640b759e4..df53efec0b0a 100644
--- a/drivers/firewire/ohci.c
+++ b/drivers/firewire/ohci.c
@@ -2676,7 +2676,7 @@ static int ohci_cancel_packet(struct fw_card *card, struct fw_packet *packet)
packet->callback(packet, &ohci->card, packet->ack);
ret = 0;
out:
- enable_work(&ctx->work);
+ enable_and_queue_work(card->async_wq, &ctx->work);
return ret;
}
--
2.53.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] firewire: core/ohci: misc fixes for transaction cancellation
2026-09-27 4:44 [PATCH 0/2] firewire: core/ohci: misc fixes for transaction cancellation Takashi Sakamoto
2026-09-27 4:44 ` [PATCH 1/2] firewire: core: remove unnecessary branch for timestamping when cancelling transaction request packets Takashi Sakamoto
2026-09-27 4:44 ` [PATCH 2/2] firewire: ohci: run work immediately when re-enabled in packet cancellation Takashi Sakamoto
@ 2026-09-27 22:34 ` Takashi Sakamoto
2 siblings, 0 replies; 4+ messages in thread
From: Takashi Sakamoto @ 2026-09-27 22:34 UTC (permalink / raw)
To: linux1394-devel; +Cc: linux-kernel
On Sun, Sep 27, 2026 at 01:44:05PM +0900, Takashi Sakamoto wrote:
> Hi,
>
> This series includes the misc fixes for the transaction cancellation.
>
> Takashi Sakamoto (2):
> firewire: ohci: remove unnecessary branch for timestamping when
> cancelling transaction request packets
> firewire: ohci: run work immediately when re-enabled in packet
> cancellation
>
> drivers/firewire/core-transaction.c | 17 ++++++-----------
> drivers/firewire/ohci.c | 2 +-
> 2 files changed, 7 insertions(+), 12 deletions(-)
Applied to for-next branch.
Regards
Takashi Sakamoto
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-09-27 22:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-27 4:44 [PATCH 0/2] firewire: core/ohci: misc fixes for transaction cancellation Takashi Sakamoto
2026-09-27 4:44 ` [PATCH 1/2] firewire: core: remove unnecessary branch for timestamping when cancelling transaction request packets Takashi Sakamoto
2026-09-27 4:44 ` [PATCH 2/2] firewire: ohci: run work immediately when re-enabled in packet cancellation Takashi Sakamoto
2026-09-27 22:34 ` [PATCH 0/2] firewire: core/ohci: misc fixes for transaction cancellation Takashi Sakamoto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®