Patchwork [net-next,02/11] tg3: Fix NVRAM size detection for the STM45PE20 pinstrap on 5762 devices

login
register
mail settings
Submitter Nithin Sujir
Date April 9, 2013, 6:48 p.m.
Message ID <1365533291-5672-3-git-send-email-nsujir@broadcom.com>
Download mbox | patch
Permalink /patch/235164/
State Accepted
Delegated to: David Miller
Headers show

Comments

Nithin Sujir - April 9, 2013, 6:48 p.m.
From: Michael Chan <mchan@broadcom.com>

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>
---
 drivers/net/ethernet/broadcom/tg3.c | 6 ++++++
 1 file changed, 6 insertions(+)

Patch

diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index d044adf..a27310d 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;
 		}
 	}