Re: [PATCH] firewire: core: use long bus reset on gap count error

From: Adam Goldman
Date: Wed Mar 20 2024 - 05:38:21 EST


Hi Takashi,

On Wed, Feb 28, 2024 at 09:41:44AM +0900, Takashi Sakamoto wrote:
> Additionally, for your investigation, you added the debug print to get the
> timing of bus reset scheduling. I think it useful for this kind of issue.
> Would I ask you to write another patch to add it? In my opinion, the case
> of mixed versions of 1394 PHYs in the same bus has more quirks and the
> debug print is helpful to investigate it further.

I'm sorry for my delay in preparing a patch.

I've submitted a patch to linux1394-devel to log when we schedule or
initiate a bus reset. This is enabled with a new parameter to the
firewire-core module. It provides logging similar to the debug print I
used to investigate the reset loop.

Also, there is already logging for bus reset interrupts in
firewire-ohci. This logs all bus resets and does not indicate whether we
initiated the reset or some other node on the bus initiated it. However,
the logging in firewire-ohci always froze my computer when I enabled it.
I've submitted a separate patch to fix the firewire-ohci logging.

I believe both forms of logging can be useful. firewire-ohci logs all
bus resets, but it doesn't tell where the resets came from. firewire-core
only logs bus resets we initiate.

I also considered adding an option to firewire-ohci to log PHY register
access. This would include writes to IBR and ISBR, so it would log when
we initiate resets. However, this logging would be more complicated to
add, so I didn't do it.

-- Adam