Commit:     fadac4060c0456ce0a190ee581746ae8663f84e1
Parent:     3ba4d093fe8a26f5f2da94411bf8732fa6e9da86
Author:     Gabriel Paubert <[EMAIL PROTECTED]>
AuthorDate: Fri Mar 23 12:03:52 2007 -0700
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Wed Mar 28 02:18:51 2007 -0400

    mv643xx_eth: Fix use of uninitialized port_num field
    In this driver, the default ethernet address is first set by by calling
    eth_port_uc_addr_get() which reads the relevant registers of the
    corresponding port as initially set by firmware. However that function
    used the port_num field accessed through the private area of net_dev
    before it was set.
    The result was that one board I have ended up with the unicast address
    set to 00:00:00:00:00:00 (only port 1 is connected on this board). The
    problem appeared after commit 84dd619e4dc3b0b1c40dafd98c90fd950bce7bc5.
    This patch fixes the bug by setting mp->port_num prior to calling
    Signed-off-by: Gabriel Paubert <[EMAIL PROTECTED]>
    Signed-off-by: Dale Farnsworth <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
 drivers/net/mv643xx_eth.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index c9f55bc..8015a7c 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -1379,7 +1379,7 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
-       port_num = pd->port_number;
+       port_num = mp->port_num = pd->port_number;
        /* set default config values */
        eth_port_uc_addr_get(dev, dev->dev_addr);
@@ -1411,8 +1411,6 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
        duplex = pd->duplex;
        speed = pd->speed;
-       mp->port_num = port_num;
        /* Hook up MII support for ethtool */
        mp-> = dev;
        mp->mii.mdio_read = mv643xx_mdio_read;
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

Reply via email to