diff options
Diffstat (limited to 'drivers/ieee1394')
-rw-r--r-- | drivers/ieee1394/eth1394.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c index bd67c862099e..2296d43a2414 100644 --- a/drivers/ieee1394/eth1394.c +++ b/drivers/ieee1394/eth1394.c | |||
@@ -475,9 +475,18 @@ static void ether1394_reset_priv(struct net_device *dev, int set_mtu) | |||
475 | priv->bc_maxpayload = 512; | 475 | priv->bc_maxpayload = 512; |
476 | 476 | ||
477 | /* Determine speed limit */ | 477 | /* Determine speed limit */ |
478 | for (i = 0; i < host->node_count; i++) | 478 | /* FIXME: This is broken for nodes with link speed < PHY speed, |
479 | * and it is suboptimal for S200B...S800B hardware. | ||
480 | * The result of nodemgr's speed probe should be used somehow. */ | ||
481 | for (i = 0; i < host->node_count; i++) { | ||
482 | /* take care of S100B...S400B PHY ports */ | ||
483 | if (host->speed[i] == SELFID_SPEED_UNKNOWN) { | ||
484 | max_speed = IEEE1394_SPEED_100; | ||
485 | break; | ||
486 | } | ||
479 | if (max_speed > host->speed[i]) | 487 | if (max_speed > host->speed[i]) |
480 | max_speed = host->speed[i]; | 488 | max_speed = host->speed[i]; |
489 | } | ||
481 | priv->bc_sspd = max_speed; | 490 | priv->bc_sspd = max_speed; |
482 | 491 | ||
483 | if (set_mtu) { | 492 | if (set_mtu) { |
@@ -1420,11 +1429,10 @@ static void ether1394_prep_gasp_packet(struct hpsb_packet *p, | |||
1420 | p->data[1] = cpu_to_be32(ETHER1394_GASP_SPECIFIER_ID_LO << 24 | | 1429 | p->data[1] = cpu_to_be32(ETHER1394_GASP_SPECIFIER_ID_LO << 24 | |
1421 | ETHER1394_GASP_VERSION); | 1430 | ETHER1394_GASP_VERSION); |
1422 | 1431 | ||
1423 | /* Setting the node id to ALL_NODES (not LOCAL_BUS | ALL_NODES) | ||
1424 | * prevents hpsb_send_packet() from setting the speed to an arbitrary | ||
1425 | * value based on packet->node_id if packet->node_id is not set. */ | ||
1426 | p->node_id = ALL_NODES; | ||
1427 | p->speed_code = priv->bc_sspd; | 1432 | p->speed_code = priv->bc_sspd; |
1433 | |||
1434 | /* prevent hpsb_send_packet() from overriding our speed code */ | ||
1435 | p->node_id = LOCAL_BUS | ALL_NODES; | ||
1428 | } | 1436 | } |
1429 | 1437 | ||
1430 | static void ether1394_free_packet(struct hpsb_packet *packet) | 1438 | static void ether1394_free_packet(struct hpsb_packet *packet) |