Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=21b2c5647b057624628888857f0e2246538a80b1
Commit:     21b2c5647b057624628888857f0e2246538a80b1
Parent:     809e905ce73eaa13972c2617959f8ec16e7d0d6f
Author:     Stefan Richter <[EMAIL PROTECTED]>
AuthorDate: Mon Apr 23 21:28:47 2007 +0200
Committer:  Stefan Richter <[EMAIL PROTECTED]>
CommitDate: Mon Apr 30 00:00:32 2007 +0200

    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 <[EMAIL PROTECTED]>
---
 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 bd67c86..2296d43 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)
        priv->bc_maxpayload = 512;
 
        /* Determine speed limit */
-       for (i = 0; i < host->node_count; i++)
+       /* FIXME: This is broken for nodes with link speed < PHY speed,
+        * and it is suboptimal for S200B...S800B hardware.
+        * The result of nodemgr's speed probe should be used somehow. */
+       for (i = 0; i < host->node_count; i++) {
+               /* take care of S100B...S400B PHY ports */
+               if (host->speed[i] == SELFID_SPEED_UNKNOWN) {
+                       max_speed = IEEE1394_SPEED_100;
+                       break;
+               }
                if (max_speed > host->speed[i])
                        max_speed = host->speed[i];
+       }
        priv->bc_sspd = max_speed;
 
        if (set_mtu) {
@@ -1420,11 +1429,10 @@ static void ether1394_prep_gasp_packet(struct 
hpsb_packet *p,
        p->data[1] = cpu_to_be32(ETHER1394_GASP_SPECIFIER_ID_LO << 24 |
                                 ETHER1394_GASP_VERSION);
 
-       /* Setting the node id to ALL_NODES (not LOCAL_BUS | ALL_NODES)
-        * prevents hpsb_send_packet() from setting the speed to an arbitrary
-        * value based on packet->node_id if packet->node_id is not set. */
-       p->node_id = ALL_NODES;
        p->speed_code = priv->bc_sspd;
+
+       /* prevent hpsb_send_packet() from overriding our speed code */
+       p->node_id = LOCAL_BUS | ALL_NODES;
 }
 
 static void ether1394_free_packet(struct hpsb_packet *packet)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to