diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_init.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 107 |
1 files changed, 59 insertions, 48 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 1ab3dac7b632..766dac230a6c 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -760,8 +760,9 @@ lpfc_get_hba_model_desc(struct lpfc_hba * phba, uint8_t * mdp, uint8_t * descp) | |||
760 | { | 760 | { |
761 | lpfc_vpd_t *vp; | 761 | lpfc_vpd_t *vp; |
762 | uint16_t dev_id; | 762 | uint16_t dev_id; |
763 | uint16_t dev_subid; | ||
763 | uint8_t hdrtype; | 764 | uint8_t hdrtype; |
764 | char str[16]; | 765 | char *model_str = ""; |
765 | 766 | ||
766 | vp = &phba->vpd; | 767 | vp = &phba->vpd; |
767 | pci_read_config_word(phba->pcidev, PCI_DEVICE_ID, &dev_id); | 768 | pci_read_config_word(phba->pcidev, PCI_DEVICE_ID, &dev_id); |
@@ -769,122 +770,132 @@ lpfc_get_hba_model_desc(struct lpfc_hba * phba, uint8_t * mdp, uint8_t * descp) | |||
769 | 770 | ||
770 | switch (dev_id) { | 771 | switch (dev_id) { |
771 | case PCI_DEVICE_ID_FIREFLY: | 772 | case PCI_DEVICE_ID_FIREFLY: |
772 | strcpy(str, "LP6000 1"); | 773 | model_str = "LP6000 1Gb PCI"; |
773 | break; | 774 | break; |
774 | case PCI_DEVICE_ID_SUPERFLY: | 775 | case PCI_DEVICE_ID_SUPERFLY: |
775 | if (vp->rev.biuRev >= 1 && vp->rev.biuRev <= 3) | 776 | if (vp->rev.biuRev >= 1 && vp->rev.biuRev <= 3) |
776 | strcpy(str, "LP7000 1"); | 777 | model_str = "LP7000 1Gb PCI"; |
777 | else | 778 | else |
778 | strcpy(str, "LP7000E 1"); | 779 | model_str = "LP7000E 1Gb PCI"; |
779 | break; | 780 | break; |
780 | case PCI_DEVICE_ID_DRAGONFLY: | 781 | case PCI_DEVICE_ID_DRAGONFLY: |
781 | strcpy(str, "LP8000 1"); | 782 | model_str = "LP8000 1Gb PCI"; |
782 | break; | 783 | break; |
783 | case PCI_DEVICE_ID_CENTAUR: | 784 | case PCI_DEVICE_ID_CENTAUR: |
784 | if (FC_JEDEC_ID(vp->rev.biuRev) == CENTAUR_2G_JEDEC_ID) | 785 | if (FC_JEDEC_ID(vp->rev.biuRev) == CENTAUR_2G_JEDEC_ID) |
785 | strcpy(str, "LP9002 2"); | 786 | model_str = "LP9002 2Gb PCI"; |
786 | else | 787 | else |
787 | strcpy(str, "LP9000 1"); | 788 | model_str = "LP9000 1Gb PCI"; |
788 | break; | 789 | break; |
789 | case PCI_DEVICE_ID_RFLY: | 790 | case PCI_DEVICE_ID_RFLY: |
790 | strcpy(str, "LP952 2"); | 791 | model_str = "LP952 2Gb PCI"; |
791 | break; | 792 | break; |
792 | case PCI_DEVICE_ID_PEGASUS: | 793 | case PCI_DEVICE_ID_PEGASUS: |
793 | strcpy(str, "LP9802 2"); | 794 | model_str = "LP9802 2Gb PCI-X"; |
794 | break; | 795 | break; |
795 | case PCI_DEVICE_ID_THOR: | 796 | case PCI_DEVICE_ID_THOR: |
796 | if (hdrtype == 0x80) | 797 | if (hdrtype == 0x80) |
797 | strcpy(str, "LP10000DC 2"); | 798 | model_str = "LP10000DC 2Gb 2-port PCI-X"; |
798 | else | 799 | else |
799 | strcpy(str, "LP10000 2"); | 800 | model_str = "LP10000 2Gb PCI-X"; |
800 | break; | 801 | break; |
801 | case PCI_DEVICE_ID_VIPER: | 802 | case PCI_DEVICE_ID_VIPER: |
802 | strcpy(str, "LPX1000 10"); | 803 | model_str = "LPX1000 10Gb PCI-X"; |
803 | break; | 804 | break; |
804 | case PCI_DEVICE_ID_PFLY: | 805 | case PCI_DEVICE_ID_PFLY: |
805 | strcpy(str, "LP982 2"); | 806 | model_str = "LP982 2Gb PCI-X"; |
806 | break; | 807 | break; |
807 | case PCI_DEVICE_ID_TFLY: | 808 | case PCI_DEVICE_ID_TFLY: |
808 | if (hdrtype == 0x80) | 809 | if (hdrtype == 0x80) |
809 | strcpy(str, "LP1050DC 2"); | 810 | model_str = "LP1050DC 2Gb 2-port PCI-X"; |
810 | else | 811 | else |
811 | strcpy(str, "LP1050 2"); | 812 | model_str = "LP1050 2Gb PCI-X"; |
812 | break; | 813 | break; |
813 | case PCI_DEVICE_ID_HELIOS: | 814 | case PCI_DEVICE_ID_HELIOS: |
814 | if (hdrtype == 0x80) | 815 | if (hdrtype == 0x80) |
815 | strcpy(str, "LP11002 4"); | 816 | model_str = "LP11002 4Gb 2-port PCI-X2"; |
816 | else | 817 | else |
817 | strcpy(str, "LP11000 4"); | 818 | model_str = "LP11000 4Gb PCI-X2"; |
818 | break; | 819 | break; |
819 | case PCI_DEVICE_ID_HELIOS_SCSP: | 820 | case PCI_DEVICE_ID_HELIOS_SCSP: |
820 | strcpy(str, "LP11000-SP 4"); | 821 | model_str = "LP11000-SP 4Gb PCI-X2"; |
821 | break; | 822 | break; |
822 | case PCI_DEVICE_ID_HELIOS_DCSP: | 823 | case PCI_DEVICE_ID_HELIOS_DCSP: |
823 | strcpy(str, "LP11002-SP 4"); | 824 | model_str = "LP11002-SP 4Gb 2-port PCI-X2"; |
824 | break; | 825 | break; |
825 | case PCI_DEVICE_ID_NEPTUNE: | 826 | case PCI_DEVICE_ID_NEPTUNE: |
826 | if (hdrtype == 0x80) | 827 | if (hdrtype == 0x80) |
827 | strcpy(str, "LPe1002 4"); | 828 | model_str = "LPe1002 4Gb 2-port"; |
828 | else | 829 | else |
829 | strcpy(str, "LPe1000 4"); | 830 | model_str = "LPe1000 4Gb PCIe"; |
830 | break; | 831 | break; |
831 | case PCI_DEVICE_ID_NEPTUNE_SCSP: | 832 | case PCI_DEVICE_ID_NEPTUNE_SCSP: |
832 | strcpy(str, "LPe1000-SP 4"); | 833 | model_str = "LPe1000-SP 4Gb PCIe"; |
833 | break; | 834 | break; |
834 | case PCI_DEVICE_ID_NEPTUNE_DCSP: | 835 | case PCI_DEVICE_ID_NEPTUNE_DCSP: |
835 | strcpy(str, "LPe1002-SP 4"); | 836 | model_str = "LPe1002-SP 4Gb 2-port PCIe"; |
836 | break; | 837 | break; |
837 | case PCI_DEVICE_ID_BMID: | 838 | case PCI_DEVICE_ID_BMID: |
838 | strcpy(str, "LP1150 4"); | 839 | model_str = "LP1150 4Gb PCI-X2"; |
839 | break; | 840 | break; |
840 | case PCI_DEVICE_ID_BSMB: | 841 | case PCI_DEVICE_ID_BSMB: |
841 | strcpy(str, "LP111 4"); | 842 | model_str = "LP111 4Gb PCI-X2"; |
842 | break; | 843 | break; |
843 | case PCI_DEVICE_ID_ZEPHYR: | 844 | case PCI_DEVICE_ID_ZEPHYR: |
844 | if (hdrtype == 0x80) | 845 | if (hdrtype == 0x80) |
845 | strcpy(str, "LPe11002 4"); | 846 | model_str = "LPe11002 4Gb 2-port PCIe"; |
846 | else | 847 | else |
847 | strcpy(str, "LPe11000 4"); | 848 | model_str = "LPe11000 4Gb PCIe"; |
848 | break; | 849 | break; |
849 | case PCI_DEVICE_ID_ZEPHYR_SCSP: | 850 | case PCI_DEVICE_ID_ZEPHYR_SCSP: |
850 | strcpy(str, "LPe11000-SP 4"); | 851 | model_str = "LPe11000-SP 4Gb PCIe"; |
851 | break; | 852 | break; |
852 | case PCI_DEVICE_ID_ZEPHYR_DCSP: | 853 | case PCI_DEVICE_ID_ZEPHYR_DCSP: |
853 | strcpy(str, "LPe11002-SP 4"); | 854 | model_str = "LPe11002-SP 4Gb 2-port PCIe"; |
854 | break; | 855 | break; |
855 | case PCI_DEVICE_ID_ZMID: | 856 | case PCI_DEVICE_ID_ZMID: |
856 | strcpy(str, "LPe1150 4"); | 857 | model_str = "LPe1150 4Gb PCIe"; |
857 | break; | 858 | break; |
858 | case PCI_DEVICE_ID_ZSMB: | 859 | case PCI_DEVICE_ID_ZSMB: |
859 | strcpy(str, "LPe111 4"); | 860 | model_str = "LPe111 4Gb PCIe"; |
860 | break; | 861 | break; |
861 | case PCI_DEVICE_ID_LP101: | 862 | case PCI_DEVICE_ID_LP101: |
862 | strcpy(str, "LP101 2"); | 863 | model_str = "LP101 2Gb PCI-X"; |
863 | break; | 864 | break; |
864 | case PCI_DEVICE_ID_LP10000S: | 865 | case PCI_DEVICE_ID_LP10000S: |
865 | strcpy(str, "LP10000-S 2"); | 866 | model_str = "LP10000-S 2Gb PCI"; |
866 | break; | ||
867 | default: | ||
868 | memset(str, 0, 16); | ||
869 | break; | 867 | break; |
870 | case PCI_DEVICE_ID_LP11000S: | 868 | case PCI_DEVICE_ID_LP11000S: |
871 | if (hdrtype == 0x80) | ||
872 | strcpy(str, "LP11002-S 4"); | ||
873 | else | ||
874 | strcpy(str, "LP11000-S 4"); | ||
875 | break; | ||
876 | case PCI_DEVICE_ID_LPE11000S: | 869 | case PCI_DEVICE_ID_LPE11000S: |
877 | if (hdrtype == 0x80) | 870 | pci_read_config_word(phba->pcidev, PCI_SUBSYSTEM_ID, |
878 | strcpy(str, "LPe11002-S 4"); | 871 | &dev_subid); |
879 | else | 872 | switch (dev_subid) { |
880 | strcpy(str, "LPe11000-S 4"); | 873 | case PCI_SUBSYSTEM_ID_LP11000S: |
874 | model_str = "LP11002-S 4Gb PCI-X2"; | ||
875 | break; | ||
876 | case PCI_SUBSYSTEM_ID_LP11002S: | ||
877 | model_str = "LP11000-S 4Gb 2-port PCI-X2"; | ||
878 | break; | ||
879 | case PCI_SUBSYSTEM_ID_LPE11000S: | ||
880 | model_str = "LPe11002-S 4Gb PCIe"; | ||
881 | break; | ||
882 | case PCI_SUBSYSTEM_ID_LPE11002S: | ||
883 | model_str = "LPe11002-S 4Gb 2-port PCIe"; | ||
884 | break; | ||
885 | case PCI_SUBSYSTEM_ID_LPE11010S: | ||
886 | model_str = "LPe11010-S 4Gb 10-port PCIe"; | ||
887 | break; | ||
888 | default: | ||
889 | break; | ||
890 | } | ||
891 | break; | ||
892 | default: | ||
881 | break; | 893 | break; |
882 | } | 894 | } |
883 | if (mdp) | 895 | if (mdp) |
884 | sscanf(str, "%s", mdp); | 896 | sscanf(model_str, "%s", mdp); |
885 | if (descp) | 897 | if (descp) |
886 | sprintf(descp, "Emulex LightPulse %s Gigabit PCI Fibre " | 898 | sprintf(descp, "Emulex %s Fibre Channel Adapter", model_str); |
887 | "Channel Adapter", str); | ||
888 | } | 899 | } |
889 | 900 | ||
890 | /**************************************************/ | 901 | /**************************************************/ |