summaryrefslogtreecommitdiffstats
path: root/drivers/firewire/core-card.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 16:58:08 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 16:58:08 +0000
commit1121cef62750fbc3ec1b87f4fcf2cef0f05f23a9 (patch)
treeba8548f2df113c7da8a46563947536f455f9a1c0 /drivers/firewire/core-card.c
parentAdding debian version 6.1.76-1. (diff)
downloadlinux-1121cef62750fbc3ec1b87f4fcf2cef0f05f23a9.tar.xz
linux-1121cef62750fbc3ec1b87f4fcf2cef0f05f23a9.zip
Merging upstream version 6.1.82.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/firewire/core-card.c')
-rw-r--r--drivers/firewire/core-card.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/firewire/core-card.c b/drivers/firewire/core-card.c
index 6ac5ff20a..8aaa7fcb2 100644
--- a/drivers/firewire/core-card.c
+++ b/drivers/firewire/core-card.c
@@ -429,7 +429,23 @@ static void bm_work(struct work_struct *work)
*/
card->bm_generation = generation;
- if (root_device == NULL) {
+ if (card->gap_count == 0) {
+ /*
+ * If self IDs have inconsistent gap counts, do a
+ * bus reset ASAP. The config rom read might never
+ * complete, so don't wait for it. However, still
+ * send a PHY configuration packet prior to the
+ * bus reset. The PHY configuration packet might
+ * fail, but 1394-2008 8.4.5.2 explicitly permits
+ * it in this case, so it should be safe to try.
+ */
+ new_root_id = local_id;
+ /*
+ * We must always send a bus reset if the gap count
+ * is inconsistent, so bypass the 5-reset limit.
+ */
+ card->bm_retries = 0;
+ } else if (root_device == NULL) {
/*
* Either link_on is false, or we failed to read the
* config rom. In either case, pick another root.