summaryrefslogtreecommitdiff
path: root/drivers/net/fm/dtsec.c
diff options
context:
space:
mode:
authorTimur Tabi <timur@freescale.com>2011-10-04 21:44:43 (GMT)
committerKumar Gala <galak@kernel.crashing.org>2011-10-09 22:57:53 (GMT)
commit30381716284b688cb1b4e315aa6b8ef7422fa172 (patch)
treedcc69b390f3aa32f12547903f19c4ebc336cc568 /drivers/net/fm/dtsec.c
parent712cf7ab0b58e51a69e339397457d3591b6b650e (diff)
downloadu-boot-fsl-qoriq-30381716284b688cb1b4e315aa6b8ef7422fa172.tar.xz
powerpc/85xx: fix null pointer dereference when init the SGMII TBI PHY
Function dtsec_configure_serdes() needs to know where the TBI PHY registers are in order to configure SGMII for proper SerDes operation. During SGMII initialzation, fm_eth_init_mac() passing NULL for 'phyregs' when it called init_dtsec(), because it was believed that phyregs was not used. In fact, it is used by dtsec_configure_serdes() to configure the TBI PHY registers. We also need to define the PHY registers in struct fm_mdio. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'drivers/net/fm/dtsec.c')
-rw-r--r--drivers/net/fm/dtsec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/fm/dtsec.c b/drivers/net/fm/dtsec.c
index a77ee20..7dd78f2 100644
--- a/drivers/net/fm/dtsec.c
+++ b/drivers/net/fm/dtsec.c
@@ -171,7 +171,7 @@ void init_dtsec(struct fsl_enet_mac *mac, void *base,
void *phyregs, int max_rx_len)
{
mac->base = base;
- mac->phyregs = NULL;
+ mac->phyregs = phyregs;
mac->max_rx_len = max_rx_len;
mac->init_mac = dtsec_init_mac;
mac->enable_mac = dtsec_enable_mac;