aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPhilippe De Muyter <phdm@macqel.be>2008-04-11 10:27:59 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2008-04-18 11:55:31 -0400
commita6ca4f7081095e3cdeb1a45d66fbe4856eca10d3 (patch)
treeea8b4d1d405d0e710cdc0d794993429bbb2676da /drivers
parentee2d91e2b3e422f3f61cd7c6a58bd98a5ec72bd1 (diff)
ieee1394: limit early node speed to host interface speed
The following patch limits the node speed to the host interface speed, before using it. Signed-off-by: Philippe De Muyter <phdm@macqel.be> It should actually suffice to do this only for the local node's speedcap[]. But there is another bug in the speed calculation: The local node's speed is not correctly propagated to the speeds which are to be used to access remote nodes. http://thread.gmane.org/gmane.linux.kernel.firewire.devel/11772/focus=12024 Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ieee1394/ieee1394_core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/ieee1394/ieee1394_core.c b/drivers/ieee1394/ieee1394_core.c
index 942bf1ff521..dcdb71a7718 100644
--- a/drivers/ieee1394/ieee1394_core.c
+++ b/drivers/ieee1394/ieee1394_core.c
@@ -373,6 +373,8 @@ static void build_speed_map(struct hpsb_host *host, int nodecount)
373 if (sid->port2 == SELFID_PORT_CHILD) cldcnt[n]++; 373 if (sid->port2 == SELFID_PORT_CHILD) cldcnt[n]++;
374 374
375 speedcap[n] = sid->speed; 375 speedcap[n] = sid->speed;
376 if (speedcap[n] > host->csr.lnk_spd)
377 speedcap[n] = host->csr.lnk_spd;
376 n--; 378 n--;
377 } 379 }
378 } 380 }