diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-04-23 15:28:47 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-04-29 18:00:32 -0400 |
commit | 21b2c5647b057624628888857f0e2246538a80b1 (patch) | |
tree | 04d0146a2a03c06c34c44a5765d37225115b4de6 /drivers/ieee1394/eth1394.c | |
parent | 809e905ce73eaa13972c2617959f8ec16e7d0d6f (diff) |
ieee1394: eth1394: send async streams at S100 on 1394b buses
eth1394 did not work on buses consisting of S100B...S400B hardware
because it attempted to send GASP packets at S800.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394/eth1394.c')
-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) |