diff options
author | Matt Carlson <mcarlson@broadcom.com> | 2010-02-17 10:17:02 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-17 20:27:39 -0500 |
commit | 24daf2b0a4005f3a4e757752fcfed9da276cf202 (patch) | |
tree | 13b1988b5473bb0a2e0fa57feb4d7938c43b7a26 /drivers/net/tg3.c | |
parent | 9ea4818dd39cc8c6b31c38c9f51d19d5d4ee0be6 (diff) |
tg3: Reformat SSID to phy ID table
This patch reformats the SSID to phy ID table, replacing constants with
preprocessor definitions. This patch is also prep work for the
following patch, which will push line lengths beyond 80 chars.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 84 |
1 files changed, 55 insertions, 29 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 3a62cc50c210..b545ea7e0ad6 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -12112,45 +12112,71 @@ struct subsys_tbl_ent { | |||
12112 | u32 phy_id; | 12112 | u32 phy_id; |
12113 | }; | 12113 | }; |
12114 | 12114 | ||
12115 | static struct subsys_tbl_ent subsys_id_to_phy_id[] = { | 12115 | static struct subsys_tbl_ent subsys_id_to_phy_id[] __devinitdata = { |
12116 | /* Broadcom boards. */ | 12116 | /* Broadcom boards. */ |
12117 | { PCI_VENDOR_ID_BROADCOM, 0x1644, PHY_ID_BCM5401 }, /* BCM95700A6 */ | 12117 | { TG3PCI_SUBVENDOR_ID_BROADCOM, |
12118 | { PCI_VENDOR_ID_BROADCOM, 0x0001, PHY_ID_BCM5701 }, /* BCM95701A5 */ | 12118 | TG3PCI_SUBDEVICE_ID_BROADCOM_95700A6, PHY_ID_BCM5401 }, |
12119 | { PCI_VENDOR_ID_BROADCOM, 0x0002, PHY_ID_BCM8002 }, /* BCM95700T6 */ | 12119 | { TG3PCI_SUBVENDOR_ID_BROADCOM, |
12120 | { PCI_VENDOR_ID_BROADCOM, 0x0003, 0 }, /* BCM95700A9 */ | 12120 | TG3PCI_SUBDEVICE_ID_BROADCOM_95701A5, PHY_ID_BCM5701 }, |
12121 | { PCI_VENDOR_ID_BROADCOM, 0x0005, PHY_ID_BCM5701 }, /* BCM95701T1 */ | 12121 | { TG3PCI_SUBVENDOR_ID_BROADCOM, |
12122 | { PCI_VENDOR_ID_BROADCOM, 0x0006, PHY_ID_BCM5701 }, /* BCM95701T8 */ | 12122 | TG3PCI_SUBDEVICE_ID_BROADCOM_95700T6, PHY_ID_BCM8002 }, |
12123 | { PCI_VENDOR_ID_BROADCOM, 0x0007, 0 }, /* BCM95701A7 */ | 12123 | { TG3PCI_SUBVENDOR_ID_BROADCOM, |
12124 | { PCI_VENDOR_ID_BROADCOM, 0x0008, PHY_ID_BCM5701 }, /* BCM95701A10 */ | 12124 | TG3PCI_SUBDEVICE_ID_BROADCOM_95700A9, 0 }, |
12125 | { PCI_VENDOR_ID_BROADCOM, 0x8008, PHY_ID_BCM5701 }, /* BCM95701A12 */ | 12125 | { TG3PCI_SUBVENDOR_ID_BROADCOM, |
12126 | { PCI_VENDOR_ID_BROADCOM, 0x0009, PHY_ID_BCM5703 }, /* BCM95703Ax1 */ | 12126 | TG3PCI_SUBDEVICE_ID_BROADCOM_95701T1, PHY_ID_BCM5701 }, |
12127 | { PCI_VENDOR_ID_BROADCOM, 0x8009, PHY_ID_BCM5703 }, /* BCM95703Ax2 */ | 12127 | { TG3PCI_SUBVENDOR_ID_BROADCOM, |
12128 | TG3PCI_SUBDEVICE_ID_BROADCOM_95701T8, PHY_ID_BCM5701 }, | ||
12129 | { TG3PCI_SUBVENDOR_ID_BROADCOM, | ||
12130 | TG3PCI_SUBDEVICE_ID_BROADCOM_95701A7, 0 }, | ||
12131 | { TG3PCI_SUBVENDOR_ID_BROADCOM, | ||
12132 | TG3PCI_SUBDEVICE_ID_BROADCOM_95701A10, PHY_ID_BCM5701 }, | ||
12133 | { TG3PCI_SUBVENDOR_ID_BROADCOM, | ||
12134 | TG3PCI_SUBDEVICE_ID_BROADCOM_95701A12, PHY_ID_BCM5701 }, | ||
12135 | { TG3PCI_SUBVENDOR_ID_BROADCOM, | ||
12136 | TG3PCI_SUBDEVICE_ID_BROADCOM_95703AX1, PHY_ID_BCM5703 }, | ||
12137 | { TG3PCI_SUBVENDOR_ID_BROADCOM, | ||
12138 | TG3PCI_SUBDEVICE_ID_BROADCOM_95703AX2, PHY_ID_BCM5703 }, | ||
12128 | 12139 | ||
12129 | /* 3com boards. */ | 12140 | /* 3com boards. */ |
12130 | { PCI_VENDOR_ID_3COM, 0x1000, PHY_ID_BCM5401 }, /* 3C996T */ | 12141 | { TG3PCI_SUBVENDOR_ID_3COM, |
12131 | { PCI_VENDOR_ID_3COM, 0x1006, PHY_ID_BCM5701 }, /* 3C996BT */ | 12142 | TG3PCI_SUBDEVICE_ID_3COM_3C996T, PHY_ID_BCM5401 }, |
12132 | { PCI_VENDOR_ID_3COM, 0x1004, 0 }, /* 3C996SX */ | 12143 | { TG3PCI_SUBVENDOR_ID_3COM, |
12133 | { PCI_VENDOR_ID_3COM, 0x1007, PHY_ID_BCM5701 }, /* 3C1000T */ | 12144 | TG3PCI_SUBDEVICE_ID_3COM_3C996BT, PHY_ID_BCM5701 }, |
12134 | { PCI_VENDOR_ID_3COM, 0x1008, PHY_ID_BCM5701 }, /* 3C940BR01 */ | 12145 | { TG3PCI_SUBVENDOR_ID_3COM, |
12146 | TG3PCI_SUBDEVICE_ID_3COM_3C996SX, 0 }, | ||
12147 | { TG3PCI_SUBVENDOR_ID_3COM, | ||
12148 | TG3PCI_SUBDEVICE_ID_3COM_3C1000T, PHY_ID_BCM5701 }, | ||
12149 | { TG3PCI_SUBVENDOR_ID_3COM, | ||
12150 | TG3PCI_SUBDEVICE_ID_3COM_3C940BR01, PHY_ID_BCM5701 }, | ||
12135 | 12151 | ||
12136 | /* DELL boards. */ | 12152 | /* DELL boards. */ |
12137 | { PCI_VENDOR_ID_DELL, 0x00d1, PHY_ID_BCM5401 }, /* VIPER */ | 12153 | { TG3PCI_SUBVENDOR_ID_DELL, |
12138 | { PCI_VENDOR_ID_DELL, 0x0106, PHY_ID_BCM5401 }, /* JAGUAR */ | 12154 | TG3PCI_SUBDEVICE_ID_DELL_VIPER, PHY_ID_BCM5401 }, |
12139 | { PCI_VENDOR_ID_DELL, 0x0109, PHY_ID_BCM5411 }, /* MERLOT */ | 12155 | { TG3PCI_SUBVENDOR_ID_DELL, |
12140 | { PCI_VENDOR_ID_DELL, 0x010a, PHY_ID_BCM5411 }, /* SLIM_MERLOT */ | 12156 | TG3PCI_SUBDEVICE_ID_DELL_JAGUAR, PHY_ID_BCM5401 }, |
12157 | { TG3PCI_SUBVENDOR_ID_DELL, | ||
12158 | TG3PCI_SUBDEVICE_ID_DELL_MERLOT, PHY_ID_BCM5411 }, | ||
12159 | { TG3PCI_SUBVENDOR_ID_DELL, | ||
12160 | TG3PCI_SUBDEVICE_ID_DELL_SLIM_MERLOT, PHY_ID_BCM5411 }, | ||
12141 | 12161 | ||
12142 | /* Compaq boards. */ | 12162 | /* Compaq boards. */ |
12143 | { PCI_VENDOR_ID_COMPAQ, 0x007c, PHY_ID_BCM5701 }, /* BANSHEE */ | 12163 | { TG3PCI_SUBVENDOR_ID_COMPAQ, |
12144 | { PCI_VENDOR_ID_COMPAQ, 0x009a, PHY_ID_BCM5701 }, /* BANSHEE_2 */ | 12164 | TG3PCI_SUBDEVICE_ID_COMPAQ_BANSHEE, PHY_ID_BCM5701 }, |
12145 | { PCI_VENDOR_ID_COMPAQ, 0x007d, 0 }, /* CHANGELING */ | 12165 | { TG3PCI_SUBVENDOR_ID_COMPAQ, |
12146 | { PCI_VENDOR_ID_COMPAQ, 0x0085, PHY_ID_BCM5701 }, /* NC7780 */ | 12166 | TG3PCI_SUBDEVICE_ID_COMPAQ_BANSHEE_2, PHY_ID_BCM5701 }, |
12147 | { PCI_VENDOR_ID_COMPAQ, 0x0099, PHY_ID_BCM5701 }, /* NC7780_2 */ | 12167 | { TG3PCI_SUBVENDOR_ID_COMPAQ, |
12168 | TG3PCI_SUBDEVICE_ID_COMPAQ_CHANGELING, 0 }, | ||
12169 | { TG3PCI_SUBVENDOR_ID_COMPAQ, | ||
12170 | TG3PCI_SUBDEVICE_ID_COMPAQ_NC7780, PHY_ID_BCM5701 }, | ||
12171 | { TG3PCI_SUBVENDOR_ID_COMPAQ, | ||
12172 | TG3PCI_SUBDEVICE_ID_COMPAQ_NC7780_2, PHY_ID_BCM5701 }, | ||
12148 | 12173 | ||
12149 | /* IBM boards. */ | 12174 | /* IBM boards. */ |
12150 | { PCI_VENDOR_ID_IBM, 0x0281, 0 } /* IBM??? */ | 12175 | { TG3PCI_SUBVENDOR_ID_IBM, |
12176 | TG3PCI_SUBDEVICE_ID_IBM_5703SAX2, 0 } | ||
12151 | }; | 12177 | }; |
12152 | 12178 | ||
12153 | static inline struct subsys_tbl_ent *lookup_by_subsys(struct tg3 *tp) | 12179 | static struct subsys_tbl_ent * __devinit tg3_lookup_by_subsys(struct tg3 *tp) |
12154 | { | 12180 | { |
12155 | int i; | 12181 | int i; |
12156 | 12182 | ||
@@ -12476,7 +12502,7 @@ static int __devinit tg3_phy_probe(struct tg3 *tp) | |||
12476 | /* No eeprom signature? Try the hardcoded | 12502 | /* No eeprom signature? Try the hardcoded |
12477 | * subsys device table. | 12503 | * subsys device table. |
12478 | */ | 12504 | */ |
12479 | p = lookup_by_subsys(tp); | 12505 | p = tg3_lookup_by_subsys(tp); |
12480 | if (!p) | 12506 | if (!p) |
12481 | return -ENODEV; | 12507 | return -ENODEV; |
12482 | 12508 | ||