aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames.Smart@Emulex.Com <James.Smart@Emulex.Com>2005-11-28 11:42:19 -0500
committerJames Bottomley <jejb@mulgrave.(none)>2005-12-13 20:27:57 -0500
commit5cc36b3cd0e3610ad7c7e2514160998276798fc0 (patch)
treeae9e107f3b4eea99df1598c15ba0a0f306082ed8
parente4adb20406385d1cc8fdb15e92ed7ac3d0ae41f6 (diff)
[SCSI] lpfc 8.1.1 : Bring model descriptions in sync with Emulex standard generic names
Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r--drivers/scsi/lpfc/lpfc_hw.h6
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c107
2 files changed, 65 insertions, 48 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h
index 4f0029301412..1ea565e0561f 100644
--- a/drivers/scsi/lpfc/lpfc_hw.h
+++ b/drivers/scsi/lpfc/lpfc_hw.h
@@ -1054,6 +1054,12 @@ typedef struct {
1054#define PCI_DEVICE_ID_ZEPHYR_SCSP 0xfe11 1054#define PCI_DEVICE_ID_ZEPHYR_SCSP 0xfe11
1055#define PCI_DEVICE_ID_ZEPHYR_DCSP 0xfe12 1055#define PCI_DEVICE_ID_ZEPHYR_DCSP 0xfe12
1056 1056
1057#define PCI_SUBSYSTEM_ID_LP11000S 0xfc11
1058#define PCI_SUBSYSTEM_ID_LP11002S 0xfc12
1059#define PCI_SUBSYSTEM_ID_LPE11000S 0xfc21
1060#define PCI_SUBSYSTEM_ID_LPE11002S 0xfc22
1061#define PCI_SUBSYSTEM_ID_LPE11010S 0xfc2A
1062
1057#define JEDEC_ID_ADDRESS 0x0080001c 1063#define JEDEC_ID_ADDRESS 0x0080001c
1058#define FIREFLY_JEDEC_ID 0x1ACC 1064#define FIREFLY_JEDEC_ID 0x1ACC
1059#define SUPERFLY_JEDEC_ID 0x0020 1065#define SUPERFLY_JEDEC_ID 0x0020
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/**************************************************/