tg3: Fix NVRAM size detection for the STM45PE20 pinstrap on 5762 devices
authorMichael Chan <mchan@broadcom.com>
Tue, 9 Apr 2013 08:48:02 +0000 (08:48 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Apr 2013 19:14:14 +0000 (15:14 -0400)
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>
drivers/net/ethernet/broadcom/tg3.c

index d044adf2718b970b23db28b1d34b28d010d4a5e7..a27310dfb03e19c292c858f4edf8a93e43e2b74f 100644 (file)
@@ -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;
                }
        }