From: Philippe De Muyter Date: Fri, 11 Apr 2008 14:27:59 +0000 (+0200) Subject: ieee1394: limit early node speed to host interface speed X-Git-Tag: v2.6.26-rc1~1141^2~31 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6ca4f7081095e3cdeb1a45d66fbe4856eca10d3;p=linux-2.6 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 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 --- diff --git a/drivers/ieee1394/ieee1394_core.c b/drivers/ieee1394/ieee1394_core.c index 942bf1ff52..dcdb71a771 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) if (sid->port2 == SELFID_PORT_CHILD) cldcnt[n]++; speedcap[n] = sid->speed; + if (speedcap[n] > host->csr.lnk_spd) + speedcap[n] = host->csr.lnk_spd; n--; } }