aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2007-01-05 05:23:15 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-07 18:50:06 -0500
commit2f2d39d2843570e81be6d53da6052f6752dc3c45 (patch)
tree76b57ace5a843d2ed24dfab6297bbd6d6d8fb3f7
parent15a260d53f7ca026e45109d2c2bec8c4b087780b (diff)
PCI: Speed up the Intel SMBus unhiding quirk
Speed up the Intel SMBus PCI quirk by avoiding tests which can only fail. This also makes the compiled code significantly smaller when using gcc 3.2/3.4. gcc 4.x appears to optimize the code by itself so this change doesn't make a difference there. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/pci/quirks.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 47214fdfa6c8..e5cc6a40ed46 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -977,52 +977,51 @@ static void __init asus_hides_smbus_hostbridge(struct pci_dev *dev)
977 case 0x1626: /* L3C notebook */ 977 case 0x1626: /* L3C notebook */
978 asus_hides_smbus = 1; 978 asus_hides_smbus = 1;
979 } 979 }
980 if (dev->device == PCI_DEVICE_ID_INTEL_82845G_HB) 980 else if (dev->device == PCI_DEVICE_ID_INTEL_82845G_HB)
981 switch(dev->subsystem_device) { 981 switch(dev->subsystem_device) {
982 case 0x80b1: /* P4GE-V */ 982 case 0x80b1: /* P4GE-V */
983 case 0x80b2: /* P4PE */ 983 case 0x80b2: /* P4PE */
984 case 0x8093: /* P4B533-V */ 984 case 0x8093: /* P4B533-V */
985 asus_hides_smbus = 1; 985 asus_hides_smbus = 1;
986 } 986 }
987 if (dev->device == PCI_DEVICE_ID_INTEL_82850_HB) 987 else if (dev->device == PCI_DEVICE_ID_INTEL_82850_HB)
988 switch(dev->subsystem_device) { 988 switch(dev->subsystem_device) {
989 case 0x8030: /* P4T533 */ 989 case 0x8030: /* P4T533 */
990 asus_hides_smbus = 1; 990 asus_hides_smbus = 1;
991 } 991 }
992 if (dev->device == PCI_DEVICE_ID_INTEL_7205_0) 992 else if (dev->device == PCI_DEVICE_ID_INTEL_7205_0)
993 switch (dev->subsystem_device) { 993 switch (dev->subsystem_device) {
994 case 0x8070: /* P4G8X Deluxe */ 994 case 0x8070: /* P4G8X Deluxe */
995 asus_hides_smbus = 1; 995 asus_hides_smbus = 1;
996 } 996 }
997 if (dev->device == PCI_DEVICE_ID_INTEL_E7501_MCH) 997 else if (dev->device == PCI_DEVICE_ID_INTEL_E7501_MCH)
998 switch (dev->subsystem_device) { 998 switch (dev->subsystem_device) {
999 case 0x80c9: /* PU-DLS */ 999 case 0x80c9: /* PU-DLS */
1000 asus_hides_smbus = 1; 1000 asus_hides_smbus = 1;
1001 } 1001 }
1002 if (dev->device == PCI_DEVICE_ID_INTEL_82855GM_HB) 1002 else if (dev->device == PCI_DEVICE_ID_INTEL_82855GM_HB)
1003 switch (dev->subsystem_device) { 1003 switch (dev->subsystem_device) {
1004 case 0x1751: /* M2N notebook */ 1004 case 0x1751: /* M2N notebook */
1005 case 0x1821: /* M5N notebook */ 1005 case 0x1821: /* M5N notebook */
1006 asus_hides_smbus = 1; 1006 asus_hides_smbus = 1;
1007 } 1007 }
1008 if (dev->device == PCI_DEVICE_ID_INTEL_82855PM_HB) 1008 else if (dev->device == PCI_DEVICE_ID_INTEL_82855PM_HB)
1009 switch (dev->subsystem_device) { 1009 switch (dev->subsystem_device) {
1010 case 0x184b: /* W1N notebook */ 1010 case 0x184b: /* W1N notebook */
1011 case 0x186a: /* M6Ne notebook */ 1011 case 0x186a: /* M6Ne notebook */
1012 asus_hides_smbus = 1; 1012 asus_hides_smbus = 1;
1013 } 1013 }
1014 if (dev->device == PCI_DEVICE_ID_INTEL_82865_HB) 1014 else if (dev->device == PCI_DEVICE_ID_INTEL_82865_HB)
1015 switch (dev->subsystem_device) { 1015 switch (dev->subsystem_device) {
1016 case 0x80f2: /* P4P800-X */ 1016 case 0x80f2: /* P4P800-X */
1017 asus_hides_smbus = 1; 1017 asus_hides_smbus = 1;
1018 } 1018 }
1019 if (dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB) { 1019 else if (dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB)
1020 switch (dev->subsystem_device) { 1020 switch (dev->subsystem_device) {
1021 case 0x1882: /* M6V notebook */ 1021 case 0x1882: /* M6V notebook */
1022 case 0x1977: /* A6VA notebook */ 1022 case 0x1977: /* A6VA notebook */
1023 asus_hides_smbus = 1; 1023 asus_hides_smbus = 1;
1024 } 1024 }
1025 }
1026 } else if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_HP)) { 1025 } else if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_HP)) {
1027 if (dev->device == PCI_DEVICE_ID_INTEL_82855PM_HB) 1026 if (dev->device == PCI_DEVICE_ID_INTEL_82855PM_HB)
1028 switch(dev->subsystem_device) { 1027 switch(dev->subsystem_device) {
@@ -1030,25 +1029,24 @@ static void __init asus_hides_smbus_hostbridge(struct pci_dev *dev)
1030 case 0x0890: /* HP Compaq nc6000 */ 1029 case 0x0890: /* HP Compaq nc6000 */
1031 asus_hides_smbus = 1; 1030 asus_hides_smbus = 1;
1032 } 1031 }
1033 if (dev->device == PCI_DEVICE_ID_INTEL_82865_HB) 1032 else if (dev->device == PCI_DEVICE_ID_INTEL_82865_HB)
1034 switch (dev->subsystem_device) { 1033 switch (dev->subsystem_device) {
1035 case 0x12bc: /* HP D330L */ 1034 case 0x12bc: /* HP D330L */
1036 case 0x12bd: /* HP D530 */ 1035 case 0x12bd: /* HP D530 */
1037 asus_hides_smbus = 1; 1036 asus_hides_smbus = 1;
1038 } 1037 }
1039 if (dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB) { 1038 else if (dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB)
1040 switch (dev->subsystem_device) { 1039 switch (dev->subsystem_device) {
1041 case 0x099c: /* HP Compaq nx6110 */ 1040 case 0x099c: /* HP Compaq nx6110 */
1042 asus_hides_smbus = 1; 1041 asus_hides_smbus = 1;
1043 } 1042 }
1044 }
1045 } else if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_TOSHIBA)) { 1043 } else if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_TOSHIBA)) {
1046 if (dev->device == PCI_DEVICE_ID_INTEL_82855GM_HB) 1044 if (dev->device == PCI_DEVICE_ID_INTEL_82855GM_HB)
1047 switch(dev->subsystem_device) { 1045 switch(dev->subsystem_device) {
1048 case 0x0001: /* Toshiba Satellite A40 */ 1046 case 0x0001: /* Toshiba Satellite A40 */
1049 asus_hides_smbus = 1; 1047 asus_hides_smbus = 1;
1050 } 1048 }
1051 if (dev->device == PCI_DEVICE_ID_INTEL_82855PM_HB) 1049 else if (dev->device == PCI_DEVICE_ID_INTEL_82855PM_HB)
1052 switch(dev->subsystem_device) { 1050 switch(dev->subsystem_device) {
1053 case 0x0001: /* Toshiba Tecra M2 */ 1051 case 0x0001: /* Toshiba Tecra M2 */
1054 asus_hides_smbus = 1; 1052 asus_hides_smbus = 1;