diff options
| author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2025-08-23 12:09:52 +0900 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-11-13 15:36:47 -0500 |
| commit | ff35d2d052d456ab51492a9dfb532ef97c4724d0 (patch) | |
| tree | c6ff622d7791e9b8d88213e3d9e2ef0922509e18 /drivers/firewire | |
| parent | 3a274f142ad83df37f8ce4cc844869b46c4982a6 (diff) | |
| download | linux-ff35d2d052d456ab51492a9dfb532ef97c4724d0.tar.gz linux-ff35d2d052d456ab51492a9dfb532ef97c4724d0.tar.bz2 linux-ff35d2d052d456ab51492a9dfb532ef97c4724d0.zip | |
firewire: ohci: move self_id_complete tracepoint after validating register
[ Upstream commit 696968262aeee51e1c0529c3c060ddd180702e02 ]
The value of OHCI1394_SelfIDCount register includes an error-indicating
bit. It is safer to place the tracepoint probe after validating the
register value.
Link: https://lore.kernel.org/r/20250823030954.268412-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/firewire')
| -rw-r--r-- | drivers/firewire/ohci.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index 5d8301b0f3aa..421cf87e93c1 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c @@ -2063,6 +2063,9 @@ static void bus_reset_work(struct work_struct *work) ohci_notice(ohci, "self ID receive error\n"); return; } + + trace_self_id_complete(ohci->card.index, reg, ohci->self_id, has_be_header_quirk(ohci)); + /* * The count in the SelfIDCount register is the number of * bytes in the self ID receive buffer. Since we also receive @@ -2231,15 +2234,8 @@ static irqreturn_t irq_handler(int irq, void *data) if (event & OHCI1394_busReset) reg_write(ohci, OHCI1394_IntMaskClear, OHCI1394_busReset); - if (event & OHCI1394_selfIDComplete) { - if (trace_self_id_complete_enabled()) { - u32 reg = reg_read(ohci, OHCI1394_SelfIDCount); - - trace_self_id_complete(ohci->card.index, reg, ohci->self_id, - has_be_header_quirk(ohci)); - } + if (event & OHCI1394_selfIDComplete) queue_work(selfid_workqueue, &ohci->bus_reset_work); - } if (event & OHCI1394_RQPkt) queue_work(ohci->card.async_wq, &ohci->ar_request_ctx.work); |
