diff options
author | David S. Miller <davem@davemloft.net> | 2006-02-27 12:51:27 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-02-27 12:51:27 -0800 |
commit | 051d3cbd96909b2fe6b5038e7bbe77f41356db05 (patch) | |
tree | 6decc4a2a4f1c3df66df5d78602ab8b4f971375d | |
parent | de5f503cfbe4f942492269c6bd97a16a4d61e488 (diff) |
[TG3]: Fix Sun tg3 variant detection.
Some Sun parts don't have PCI_VENDOR_ID_SUN in the subsystem
vendor ID. So add another fallback test, which is the name
of the OBP firmware device tree node. If it's a Sun part we'll
get "network", else it will be named "ethernet".
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/tg3.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index e7dc653d5bd..e8e92c853e8 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -9408,6 +9408,15 @@ static int __devinit tg3_is_sun_570X(struct tg3 *tp) return 0; if (venid == PCI_VENDOR_ID_SUN) return 1; + + /* TG3 chips onboard the SunBlade-2500 don't have the + * subsystem-vendor-id set to PCI_VENDOR_ID_SUN but they + * are distinguishable from non-Sun variants by being + * named "network" by the firmware. Non-Sun cards will + * show up as being named "ethernet". + */ + if (!strcmp(pcp->prom_name, "network")) + return 1; } return 0; } |