From f6334bb860a890eab2699330930c267bb83e83db Mon Sep 17 00:00:00 2001 From: Michael Chan Date: Tue, 9 Apr 2013 08:48:02 +0000 Subject: [PATCH] tg3: Fix NVRAM size detection for the STM45PE20 pinstrap on 5762 devices The STM45PE20 pinstrap on 5762 devices supports multiple sizes. So treat it just like the ST45_USPT and the size will be read from 0xf0 via tg3_get_nvram_size(). Signed-off-by: Nithin Nayak Sujir Signed-off-by: Michael Chan Signed-off-by: David S. Miller --- drivers/net/ethernet/broadcom/tg3.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index d044adf2718b..a27310dfb03e 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -13986,6 +13986,12 @@ static void tg3_get_5720_nvram_info(struct tg3 *tp) case FLASH_5762_EEPROM_LD: nvmpinstrp = FLASH_5720_EEPROM_LD; break; + case FLASH_5720VENDOR_M_ST_M45PE20: + /* This pinstrap supports multiple sizes, so force it + * to read the actual size from location 0xf0. + */ + nvmpinstrp = FLASH_5720VENDOR_ST_45USPT; + break; } } -- 2.20.1