firewire-fixes-6.8-rc7

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.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQE66IEYNDXNBPeGKSsLtaWM8LwEwUCZeOqLAAKCRCsLtaWM8Lw
 E2rLAQDJiYNXItCD0Q+RISEH7mtrfXmx/f4Tb1Uf9lBtKzOKIAD/Vn0H5WRrj5Qx
 fuTb70AD2zRb4zpTM65hOdYBEQ4TnAE=
 =T3IO
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2024-03-02 15:18:02 -08:00
commit 04b8076df2

View file

@ -500,7 +500,19 @@ static void bm_work(struct work_struct *work)
fw_notice(card, "phy config: new root=%x, gap_count=%d\n", fw_notice(card, "phy config: new root=%x, gap_count=%d\n",
new_root_id, gap_count); new_root_id, gap_count);
fw_send_phy_config(card, new_root_id, generation, gap_count); fw_send_phy_config(card, new_root_id, generation, gap_count);
reset_bus(card, true); /*
* Where possible, use a short bus reset to minimize
* disruption to isochronous transfers. But in the event
* of a gap count inconsistency, use a long bus reset.
*
* As noted in 1394a 8.4.6.2, nodes on a mixed 1394/1394a bus
* may set different gap counts after a bus reset. On a mixed
* 1394/1394a bus, a short bus reset can get doubled. Some
* nodes may treat the double reset as one bus reset and others
* may treat it as two, causing a gap count inconsistency
* again. Using a long bus reset prevents this.
*/
reset_bus(card, card->gap_count != 0);
/* Will allocate broadcast channel after the reset. */ /* Will allocate broadcast channel after the reset. */
goto out; goto out;
} }