Skip to content
Commit fadac406 authored by Gabriel Paubert's avatar Gabriel Paubert Committed by Jeff Garzik
Browse files

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 84dd619e

.

This patch fixes the bug by setting mp->port_num prior to calling
eth_port_uc_get_addr().

Signed-off-by: default avatarGabriel Paubert <paubert@iram.es>
Signed-off-by: default avatarDale Farnsworth <dale@farnsworth.org>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 3ba4d093
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment