Skip to content

Commit

Permalink
tg3: Fix 5762 NVRAM sizing
Browse files Browse the repository at this point in the history
Don't set the default size to 128K if it is 5762.  Instead, rely on the
size we obtain from NVRAM location 0xf0.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Michael Chan authored and David S. Miller committed Feb 15, 2013
1 parent d240d21 commit c5d0b72
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/ethernet/broadcom/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -13883,7 +13883,8 @@ static void tg3_get_5720_nvram_info(struct tg3 *tp)
tp->nvram_size = TG3_NVRAM_SIZE_1MB;
break;
default:
tp->nvram_size = TG3_NVRAM_SIZE_128KB;
if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5762)
tp->nvram_size = TG3_NVRAM_SIZE_128KB;
break;
}
break;
Expand Down Expand Up @@ -13929,7 +13930,8 @@ static void tg3_get_5720_nvram_info(struct tg3 *tp)
tp->nvram_size = TG3_NVRAM_SIZE_1MB;
break;
default:
tp->nvram_size = TG3_NVRAM_SIZE_128KB;
if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5762)
tp->nvram_size = TG3_NVRAM_SIZE_128KB;
break;
}
break;
Expand Down

0 comments on commit c5d0b72

Please sign in to comment.