aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/tg3.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-17 11:54:25 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-17 11:54:25 -0700
commit0e496b8e84410c96d1ffc86f0b37b0328a4234da (patch)
treed8a2aeeaee03eb4f305ba4dc5ab9395c4ee31321 /drivers/net/ethernet/broadcom/tg3.c
parentpcmcia: pd6729: fix error return code in pd6729_pci_probe() (diff)
parentLinux 3.10-rc6 (diff)
downloadlinux-dev-0e496b8e84410c96d1ffc86f0b37b0328a4234da.tar.xz
linux-dev-0e496b8e84410c96d1ffc86f0b37b0328a4234da.zip
Merge 3.10-rc6 into char-misc-next
We want the fixes in here.
Diffstat (limited to 'drivers/net/ethernet/broadcom/tg3.c')
-rw-r--r--drivers/net/ethernet/broadcom/tg3.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 0f493c8dc28b..c777b9013164 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -1800,6 +1800,9 @@ static int tg3_poll_fw(struct tg3 *tp)
int i;
u32 val;
+ if (tg3_flag(tp, NO_FWARE_REPORTED))
+ return 0;
+
if (tg3_flag(tp, IS_SSB_CORE)) {
/* We don't use firmware. */
return 0;
@@ -10404,6 +10407,13 @@ static int tg3_reset_hw(struct tg3 *tp, bool reset_phy)
*/
static int tg3_init_hw(struct tg3 *tp, bool reset_phy)
{
+ /* Chip may have been just powered on. If so, the boot code may still
+ * be running initialization. Wait for it to finish to avoid races in
+ * accessing the hardware.
+ */
+ tg3_enable_register_access(tp);
+ tg3_poll_fw(tp);
+
tg3_switch_clocks(tp);
tw32(TG3PCI_MEM_WIN_BASE_ADDR, 0);