aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2005-12-09 14:34:53 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-12-12 15:27:19 -0500
commit92f965e8c5433408d5a3805c6882b657eb6cbdb1 (patch)
tree063db455feceaa73fdc3305c14e17cab838e6da1
parentb1086eef813ecee09bd6b8ae364acf0fad065cba (diff)
[PATCH] sky2: don't die if we see chip rev 0xb5
There maybe new versions of Yukon2 in the future, so make the driver more robust to handle this. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
-rw-r--r--drivers/net/sky2.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 7dc5b4821ae4..0f694a917fbd 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -128,17 +128,15 @@ MODULE_DEVICE_TABLE(pci, sky2_id_table);
128static const unsigned txqaddr[] = { Q_XA1, Q_XA2 }; 128static const unsigned txqaddr[] = { Q_XA1, Q_XA2 };
129static const unsigned rxqaddr[] = { Q_R1, Q_R2 }; 129static const unsigned rxqaddr[] = { Q_R1, Q_R2 };
130 130
131static const char *yukon_name[] = { 131/* This driver supports yukon2 chipset only */
132 [CHIP_ID_YUKON_LITE - CHIP_ID_YUKON] = "Lite", /* 0xb0 */ 132static const char *yukon2_name[] = {
133 [CHIP_ID_YUKON_LP - CHIP_ID_YUKON] = "LP", /* 0xb2 */ 133 "XL", /* 0xb3 */
134 [CHIP_ID_YUKON_XL - CHIP_ID_YUKON] = "XL", /* 0xb3 */ 134 "EC Ultra", /* 0xb4 */
135 [CHIP_ID_YUKON_EC_U - CHIP_ID_YUKON] = "EC Ultra", /* 0xb4 */ 135 "UNKNOWN", /* 0xb5 */
136 136 "EC", /* 0xb6 */
137 [CHIP_ID_YUKON_EC - CHIP_ID_YUKON] = "EC", /* 0xb6 */ 137 "FE", /* 0xb7 */
138 [CHIP_ID_YUKON_FE - CHIP_ID_YUKON] = "FE", /* 0xb7 */
139}; 138};
140 139
141
142/* Access to external PHY */ 140/* Access to external PHY */
143static int gm_phy_write(struct sky2_hw *hw, unsigned port, u16 reg, u16 val) 141static int gm_phy_write(struct sky2_hw *hw, unsigned port, u16 reg, u16 val)
144{ 142{
@@ -2951,7 +2949,7 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
2951 2949
2952 printk(KERN_INFO PFX "v%s addr 0x%lx irq %d Yukon-%s (0x%x) rev %d\n", 2950 printk(KERN_INFO PFX "v%s addr 0x%lx irq %d Yukon-%s (0x%x) rev %d\n",
2953 DRV_VERSION, pci_resource_start(pdev, 0), pdev->irq, 2951 DRV_VERSION, pci_resource_start(pdev, 0), pdev->irq,
2954 yukon_name[hw->chip_id - CHIP_ID_YUKON], 2952 yukon2_name[hw->chip_id - CHIP_ID_YUKON_XL],
2955 hw->chip_id, hw->chip_rev); 2953 hw->chip_id, hw->chip_rev);
2956 2954
2957 dev = sky2_init_netdev(hw, 0, using_dac); 2955 dev = sky2_init_netdev(hw, 0, using_dac);