]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
firewire: core: use long bus reset on gap count error
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Thu, 29 Feb 2024 13:17:37 +0000 (22:17 +0900)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:19:14 +0000 (18:19 -0400)
commite4cd40ba9afd25dd98bf7f9c1e774a541989512b
tree5ff8588eabce2865191717b5d1fbebf3588ae38d
parentbdfc6e5310e5e146bd7dd09bd38b3ac981661b13
firewire: core: use long bus reset on gap count error

[ Upstream commit d0b06dc48fb15902d7da09c5c0861e7f042a9381 ]

When resetting the bus after a gap count error, use a long rather than
short bus reset.

IEEE 1394-1995 uses only long bus resets. IEEE 1394a adds the option of
short bus resets. When video or audio transmission is in progress and a
device is hot-plugged elsewhere on the bus, the resulting bus reset can
cause video frame drops or audio dropouts. Short bus resets reduce or
eliminate this problem. Accordingly, short bus resets are almost always
preferred.

However, on a mixed 1394/1394a bus, a short bus reset can trigger an
immediate additional bus reset. This double bus reset can be interpreted
differently by different nodes on the bus, resulting in an inconsistent gap
count after the bus reset. An inconsistent gap count will cause another bus
reset, leading to a neverending bus reset loop. This only happens for some
bus topologies, not for all mixed 1394/1394a buses.

By instead sending a long bus reset after a gap count inconsistency, we
avoid the doubled bus reset, restoring the bus to normal operation.

Signed-off-by: Adam Goldman <adamg@pobox.com>
Link: https://sourceforge.net/p/linux1394/mailman/message/58741624/
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/firewire/core-card.c