summary refs log tree commit diff
path: root/drivers/net/ethernet/broadcom/bgmac.h
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2023-02-27 10:11:56 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-17 08:50:22 +0100
commit3ee0c9fb7f460758da95e038ba6d1913eaa92fa0 (patch)
tree9e67f75145c2c9c02aff94cfc6d33199e5b75d8d /drivers/net/ethernet/broadcom/bgmac.h
parent56d67b9788da60baeaba49846af57548d6dcb72f (diff)
downloadlinux-3ee0c9fb7f460758da95e038ba6d1913eaa92fa0.tar.gz
bgmac: fix *initial* chip reset to support BCM5358
[ Upstream commit f99e6d7c4ed3be2531bd576425a5bd07fb133bd7 ]

While bringing hardware up we should perform a full reset including the
switch bit (BGMAC_BCMA_IOCTL_SW_RESET aka SICF_SWRST). It's what
specification says and what reference driver does.

This seems to be critical for the BCM5358. Without this hardware doesn't
get initialized properly and doesn't seem to transmit or receive any
packets.

Originally bgmac was calling bgmac_chip_reset() before setting
"has_robosw" property which resulted in expected behaviour. That has
changed as a side effect of adding platform device support which
regressed BCM5358 support.

Fixes: f6a95a24957a ("net: ethernet: bgmac: Add platform device support")
Cc: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20230227091156.19509-1-zajec5@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bgmac.h')
-rw-r--r--drivers/net/ethernet/broadcom/bgmac.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bgmac.h b/drivers/net/ethernet/broadcom/bgmac.h
index e05ac92c0650..d73ef262991d 100644
--- a/drivers/net/ethernet/broadcom/bgmac.h
+++ b/drivers/net/ethernet/broadcom/bgmac.h
@@ -472,6 +472,8 @@ struct bgmac {
 	int irq;
 	u32 int_mask;
 
+	bool in_init;
+
 	/* Current MAC state */
 	int mac_speed;
 	int mac_duplex;