aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2006-12-02 13:35:08 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-12-03 10:33:27 -0500
commit18a3b5966611b1d6f539e3e0bf863ad13a44dd45 (patch)
treed0fa72dbdd2141993ff21f72d253942f9f61870c /drivers/scsi/lpfc
parent4ff43246e45943200ae3233732adf8708c2faef6 (diff)
[SCSI] lpfc 8.1.11 : Removed decoding of PCI Subsystem Id
To avoid continually updating the driver for new subsystem ids (as adapter modules are proliferating), remove this 2nd level decode. Genericize the reported Adapter names to be consistent across Emulex product line. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r--drivers/scsi/lpfc/lpfc_hw.h6
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c113
2 files changed, 35 insertions, 84 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h
index 0d08a50ca41e..3ba1ee4ace9a 100644
--- a/drivers/scsi/lpfc/lpfc_hw.h
+++ b/drivers/scsi/lpfc/lpfc_hw.h
@@ -1105,12 +1105,6 @@ typedef struct {
1105#define PCI_DEVICE_ID_ZEPHYR_SCSP 0xfe11 1105#define PCI_DEVICE_ID_ZEPHYR_SCSP 0xfe11
1106#define PCI_DEVICE_ID_ZEPHYR_DCSP 0xfe12 1106#define PCI_DEVICE_ID_ZEPHYR_DCSP 0xfe12
1107 1107
1108#define PCI_SUBSYSTEM_ID_LP11000S 0xfc11
1109#define PCI_SUBSYSTEM_ID_LP11002S 0xfc12
1110#define PCI_SUBSYSTEM_ID_LPE11000S 0xfc21
1111#define PCI_SUBSYSTEM_ID_LPE11002S 0xfc22
1112#define PCI_SUBSYSTEM_ID_LPE11010S 0xfc2A
1113
1114#define JEDEC_ID_ADDRESS 0x0080001c 1108#define JEDEC_ID_ADDRESS 0x0080001c
1115#define FIREFLY_JEDEC_ID 0x1ACC 1109#define FIREFLY_JEDEC_ID 0x1ACC
1116#define SUPERFLY_JEDEC_ID 0x0020 1110#define SUPERFLY_JEDEC_ID 0x0020
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 71ee0cd32216..b872519e2ced 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -804,19 +804,13 @@ lpfc_get_hba_model_desc(struct lpfc_hba * phba, uint8_t * mdp, uint8_t * descp)
804{ 804{
805 lpfc_vpd_t *vp; 805 lpfc_vpd_t *vp;
806 uint16_t dev_id = phba->pcidev->device; 806 uint16_t dev_id = phba->pcidev->device;
807 uint16_t dev_subid = phba->pcidev->subsystem_device;
808 uint8_t hdrtype;
809 int max_speed; 807 int max_speed;
810 char * ports;
811 struct { 808 struct {
812 char * name; 809 char * name;
813 int max_speed; 810 int max_speed;
814 char * ports;
815 char * bus; 811 char * bus;
816 } m = {"<Unknown>", 0, "", ""}; 812 } m = {"<Unknown>", 0, ""};
817 813
818 pci_read_config_byte(phba->pcidev, PCI_HEADER_TYPE, &hdrtype);
819 ports = (hdrtype == 0x80) ? "2-port " : "";
820 if (mdp && mdp[0] != '\0' 814 if (mdp && mdp[0] != '\0'
821 && descp && descp[0] != '\0') 815 && descp && descp[0] != '\0')
822 return; 816 return;
@@ -836,130 +830,93 @@ lpfc_get_hba_model_desc(struct lpfc_hba * phba, uint8_t * mdp, uint8_t * descp)
836 830
837 switch (dev_id) { 831 switch (dev_id) {
838 case PCI_DEVICE_ID_FIREFLY: 832 case PCI_DEVICE_ID_FIREFLY:
839 m = (typeof(m)){"LP6000", max_speed, "", "PCI"}; 833 m = (typeof(m)){"LP6000", max_speed, "PCI"};
840 break; 834 break;
841 case PCI_DEVICE_ID_SUPERFLY: 835 case PCI_DEVICE_ID_SUPERFLY:
842 if (vp->rev.biuRev >= 1 && vp->rev.biuRev <= 3) 836 if (vp->rev.biuRev >= 1 && vp->rev.biuRev <= 3)
843 m = (typeof(m)){"LP7000", max_speed, "", "PCI"}; 837 m = (typeof(m)){"LP7000", max_speed, "PCI"};
844 else 838 else
845 m = (typeof(m)){"LP7000E", max_speed, "", "PCI"}; 839 m = (typeof(m)){"LP7000E", max_speed, "PCI"};
846 break; 840 break;
847 case PCI_DEVICE_ID_DRAGONFLY: 841 case PCI_DEVICE_ID_DRAGONFLY:
848 m = (typeof(m)){"LP8000", max_speed, "", "PCI"}; 842 m = (typeof(m)){"LP8000", max_speed, "PCI"};
849 break; 843 break;
850 case PCI_DEVICE_ID_CENTAUR: 844 case PCI_DEVICE_ID_CENTAUR:
851 if (FC_JEDEC_ID(vp->rev.biuRev) == CENTAUR_2G_JEDEC_ID) 845 if (FC_JEDEC_ID(vp->rev.biuRev) == CENTAUR_2G_JEDEC_ID)
852 m = (typeof(m)){"LP9002", max_speed, "", "PCI"}; 846 m = (typeof(m)){"LP9002", max_speed, "PCI"};
853 else 847 else
854 m = (typeof(m)){"LP9000", max_speed, "", "PCI"}; 848 m = (typeof(m)){"LP9000", max_speed, "PCI"};
855 break; 849 break;
856 case PCI_DEVICE_ID_RFLY: 850 case PCI_DEVICE_ID_RFLY:
857 m = (typeof(m)){"LP952", max_speed, "", "PCI"}; 851 m = (typeof(m)){"LP952", max_speed, "PCI"};
858 break; 852 break;
859 case PCI_DEVICE_ID_PEGASUS: 853 case PCI_DEVICE_ID_PEGASUS:
860 m = (typeof(m)){"LP9802", max_speed, "", "PCI-X"}; 854 m = (typeof(m)){"LP9802", max_speed, "PCI-X"};
861 break; 855 break;
862 case PCI_DEVICE_ID_THOR: 856 case PCI_DEVICE_ID_THOR:
863 if (hdrtype == 0x80) 857 m = (typeof(m)){"LP10000", max_speed, "PCI-X"};
864 m = (typeof(m)){"LP10000DC",
865 max_speed, ports, "PCI-X"};
866 else
867 m = (typeof(m)){"LP10000",
868 max_speed, ports, "PCI-X"};
869 break; 858 break;
870 case PCI_DEVICE_ID_VIPER: 859 case PCI_DEVICE_ID_VIPER:
871 m = (typeof(m)){"LPX1000", max_speed, "", "PCI-X"}; 860 m = (typeof(m)){"LPX1000", max_speed, "PCI-X"};
872 break; 861 break;
873 case PCI_DEVICE_ID_PFLY: 862 case PCI_DEVICE_ID_PFLY:
874 m = (typeof(m)){"LP982", max_speed, "", "PCI-X"}; 863 m = (typeof(m)){"LP982", max_speed, "PCI-X"};
875 break; 864 break;
876 case PCI_DEVICE_ID_TFLY: 865 case PCI_DEVICE_ID_TFLY:
877 if (hdrtype == 0x80) 866 m = (typeof(m)){"LP1050", max_speed, "PCI-X"};
878 m = (typeof(m)){"LP1050DC", max_speed, ports, "PCI-X"};
879 else
880 m = (typeof(m)){"LP1050", max_speed, ports, "PCI-X"};
881 break; 867 break;
882 case PCI_DEVICE_ID_HELIOS: 868 case PCI_DEVICE_ID_HELIOS:
883 if (hdrtype == 0x80) 869 m = (typeof(m)){"LP11000", max_speed, "PCI-X2"};
884 m = (typeof(m)){"LP11002", max_speed, ports, "PCI-X2"};
885 else
886 m = (typeof(m)){"LP11000", max_speed, ports, "PCI-X2"};
887 break; 870 break;
888 case PCI_DEVICE_ID_HELIOS_SCSP: 871 case PCI_DEVICE_ID_HELIOS_SCSP:
889 m = (typeof(m)){"LP11000-SP", max_speed, ports, "PCI-X2"}; 872 m = (typeof(m)){"LP11000-SP", max_speed, "PCI-X2"};
890 break; 873 break;
891 case PCI_DEVICE_ID_HELIOS_DCSP: 874 case PCI_DEVICE_ID_HELIOS_DCSP:
892 m = (typeof(m)){"LP11002-SP", max_speed, ports, "PCI-X2"}; 875 m = (typeof(m)){"LP11002-SP", max_speed, "PCI-X2"};
893 break; 876 break;
894 case PCI_DEVICE_ID_NEPTUNE: 877 case PCI_DEVICE_ID_NEPTUNE:
895 if (hdrtype == 0x80) 878 m = (typeof(m)){"LPe1000", max_speed, "PCIe"};
896 m = (typeof(m)){"LPe1002", max_speed, ports, "PCIe"};
897 else
898 m = (typeof(m)){"LPe1000", max_speed, ports, "PCIe"};
899 break; 879 break;
900 case PCI_DEVICE_ID_NEPTUNE_SCSP: 880 case PCI_DEVICE_ID_NEPTUNE_SCSP:
901 m = (typeof(m)){"LPe1000-SP", max_speed, ports, "PCIe"}; 881 m = (typeof(m)){"LPe1000-SP", max_speed, "PCIe"};
902 break; 882 break;
903 case PCI_DEVICE_ID_NEPTUNE_DCSP: 883 case PCI_DEVICE_ID_NEPTUNE_DCSP:
904 m = (typeof(m)){"LPe1002-SP", max_speed, ports, "PCIe"}; 884 m = (typeof(m)){"LPe1002-SP", max_speed, "PCIe"};
905 break; 885 break;
906 case PCI_DEVICE_ID_BMID: 886 case PCI_DEVICE_ID_BMID:
907 m = (typeof(m)){"LP1150", max_speed, ports, "PCI-X2"}; 887 m = (typeof(m)){"LP1150", max_speed, "PCI-X2"};
908 break; 888 break;
909 case PCI_DEVICE_ID_BSMB: 889 case PCI_DEVICE_ID_BSMB:
910 m = (typeof(m)){"LP111", max_speed, ports, "PCI-X2"}; 890 m = (typeof(m)){"LP111", max_speed, "PCI-X2"};
911 break; 891 break;
912 case PCI_DEVICE_ID_ZEPHYR: 892 case PCI_DEVICE_ID_ZEPHYR:
913 if (hdrtype == 0x80) 893 m = (typeof(m)){"LPe11000", max_speed, "PCIe"};
914 m = (typeof(m)){"LPe11002", max_speed, ports, "PCIe"};
915 else
916 m = (typeof(m)){"LPe11000", max_speed, ports, "PCIe"};
917 break; 894 break;
918 case PCI_DEVICE_ID_ZEPHYR_SCSP: 895 case PCI_DEVICE_ID_ZEPHYR_SCSP:
919 m = (typeof(m)){"LPe11000", max_speed, ports, "PCIe"}; 896 m = (typeof(m)){"LPe11000", max_speed, "PCIe"};
920 break; 897 break;
921 case PCI_DEVICE_ID_ZEPHYR_DCSP: 898 case PCI_DEVICE_ID_ZEPHYR_DCSP:
922 m = (typeof(m)){"LPe11002-SP", max_speed, ports, "PCIe"}; 899 m = (typeof(m)){"LPe11002-SP", max_speed, "PCIe"};
923 break; 900 break;
924 case PCI_DEVICE_ID_ZMID: 901 case PCI_DEVICE_ID_ZMID:
925 m = (typeof(m)){"LPe1150", max_speed, ports, "PCIe"}; 902 m = (typeof(m)){"LPe1150", max_speed, "PCIe"};
926 break; 903 break;
927 case PCI_DEVICE_ID_ZSMB: 904 case PCI_DEVICE_ID_ZSMB:
928 m = (typeof(m)){"LPe111", max_speed, ports, "PCIe"}; 905 m = (typeof(m)){"LPe111", max_speed, "PCIe"};
929 break; 906 break;
930 case PCI_DEVICE_ID_LP101: 907 case PCI_DEVICE_ID_LP101:
931 m = (typeof(m)){"LP101", max_speed, ports, "PCI-X"}; 908 m = (typeof(m)){"LP101", max_speed, "PCI-X"};
932 break; 909 break;
933 case PCI_DEVICE_ID_LP10000S: 910 case PCI_DEVICE_ID_LP10000S:
934 m = (typeof(m)){"LP10000-S", max_speed, ports, "PCI"}; 911 m = (typeof(m)){"LP10000-S", max_speed, "PCI"};
935 break; 912 break;
936 case PCI_DEVICE_ID_LP11000S: 913 case PCI_DEVICE_ID_LP11000S:
914 m = (typeof(m)){"LP11000-S", max_speed,
915 "PCI-X2"};
916 break;
937 case PCI_DEVICE_ID_LPE11000S: 917 case PCI_DEVICE_ID_LPE11000S:
938 switch (dev_subid) { 918 m = (typeof(m)){"LPe11000-S", max_speed,
939 case PCI_SUBSYSTEM_ID_LP11000S: 919 "PCIe"};
940 m = (typeof(m)){"LP11000-S", max_speed,
941 ports, "PCI-X2"};
942 break;
943 case PCI_SUBSYSTEM_ID_LP11002S:
944 m = (typeof(m)){"LP11002-S", max_speed,
945 ports, "PCI-X2"};
946 break;
947 case PCI_SUBSYSTEM_ID_LPE11000S:
948 m = (typeof(m)){"LPe11000-S", max_speed,
949 ports, "PCIe"};
950 break;
951 case PCI_SUBSYSTEM_ID_LPE11002S:
952 m = (typeof(m)){"LPe11002-S", max_speed,
953 ports, "PCIe"};
954 break;
955 case PCI_SUBSYSTEM_ID_LPE11010S:
956 m = (typeof(m)){"LPe11010-S", max_speed,
957 "10-port ", "PCIe"};
958 break;
959 default:
960 m = (typeof(m)){ NULL };
961 break;
962 }
963 break; 920 break;
964 default: 921 default:
965 m = (typeof(m)){ NULL }; 922 m = (typeof(m)){ NULL };
@@ -970,8 +927,8 @@ lpfc_get_hba_model_desc(struct lpfc_hba * phba, uint8_t * mdp, uint8_t * descp)
970 snprintf(mdp, 79,"%s", m.name); 927 snprintf(mdp, 79,"%s", m.name);
971 if (descp && descp[0] == '\0') 928 if (descp && descp[0] == '\0')
972 snprintf(descp, 255, 929 snprintf(descp, 255,
973 "Emulex %s %dGb %s%s Fibre Channel Adapter", 930 "Emulex %s %dGb %s Fibre Channel Adapter",
974 m.name, m.max_speed, m.ports, m.bus); 931 m.name, m.max_speed, m.bus);
975} 932}
976 933
977/**************************************************/ 934/**************************************************/