Browse Source

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 <nsujir@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan 12 years ago
parent
commit
f6334bb860
1 changed files with 6 additions and 0 deletions
  1. 6 0
      drivers/net/ethernet/broadcom/tg3.c

+ 6 - 0
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;
 		}
 	}