Skip to content

Commit 04b8076

Browse files
committed
Merge tag 'firewire-fixes-6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394
Pull firewire fixes from Takashi Sakamoto: "A workaround to suppress the continuous bus resets in the case that older devices are connected to the modern 1394 OHCI hardware and devices In IEEE 1394 Amendment (IEEE 1394a-2000), the short bus reset is added to resolve the shortcomings of the long bus reset in IEEE 1394-1995. However, it is well-known that the solution is not necessarily effective in the mixing environment that both IEEE 1394-1995 PHY and IEEE 1394a-2000 (or later) PHY exist, as described in section 8.4.6.2 of IEEE 1394a-2000. The current implementation of firewire stack schedules the short bus reset when attempting to resolve the mismatch of gap count in the certain generation of bus topology. It can cause the continuous bus reset in the issued environment. The workaround simply uses the long bus reset instead of the short bus reset. It is desirable to detect whether the issued environment or not. However, the way to access PHY registers from remote note is firstly defined in IEEE 1394a-2000, thus it is not available in the case" * tag 'firewire-fixes-6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: firewire: core: use long bus reset on gap count error
2 parents 4640e2b + d0b06dc commit 04b8076

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

drivers/firewire/core-card.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,19 @@ static void bm_work(struct work_struct *work)
500500
fw_notice(card, "phy config: new root=%x, gap_count=%d\n",
501501
new_root_id, gap_count);
502502
fw_send_phy_config(card, new_root_id, generation, gap_count);
503-
reset_bus(card, true);
503+
/*
504+
* Where possible, use a short bus reset to minimize
505+
* disruption to isochronous transfers. But in the event
506+
* of a gap count inconsistency, use a long bus reset.
507+
*
508+
* As noted in 1394a 8.4.6.2, nodes on a mixed 1394/1394a bus
509+
* may set different gap counts after a bus reset. On a mixed
510+
* 1394/1394a bus, a short bus reset can get doubled. Some
511+
* nodes may treat the double reset as one bus reset and others
512+
* may treat it as two, causing a gap count inconsistency
513+
* again. Using a long bus reset prevents this.
514+
*/
515+
reset_bus(card, card->gap_count != 0);
504516
/* Will allocate broadcast channel after the reset. */
505517
goto out;
506518
}

0 commit comments

Comments
 (0)