Skip to content

Commit

Permalink
[TG3]: Fix Sun tg3 variant detection.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed Feb 27, 2006
1 parent de5f503 commit 051d3cb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 051d3cb

Please sign in to comment.