Commit 18a3b596 authored by James Smart's avatar James Smart Committed by James Bottomley

[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: default avatarJames Smart <James.Smart@emulex.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 4ff43246
...@@ -1105,12 +1105,6 @@ typedef struct { ...@@ -1105,12 +1105,6 @@ typedef struct {
#define PCI_DEVICE_ID_ZEPHYR_SCSP 0xfe11 #define PCI_DEVICE_ID_ZEPHYR_SCSP 0xfe11
#define PCI_DEVICE_ID_ZEPHYR_DCSP 0xfe12 #define PCI_DEVICE_ID_ZEPHYR_DCSP 0xfe12
#define PCI_SUBSYSTEM_ID_LP11000S 0xfc11
#define PCI_SUBSYSTEM_ID_LP11002S 0xfc12
#define PCI_SUBSYSTEM_ID_LPE11000S 0xfc21
#define PCI_SUBSYSTEM_ID_LPE11002S 0xfc22
#define PCI_SUBSYSTEM_ID_LPE11010S 0xfc2A
#define JEDEC_ID_ADDRESS 0x0080001c #define JEDEC_ID_ADDRESS 0x0080001c
#define FIREFLY_JEDEC_ID 0x1ACC #define FIREFLY_JEDEC_ID 0x1ACC
#define SUPERFLY_JEDEC_ID 0x0020 #define SUPERFLY_JEDEC_ID 0x0020
......
...@@ -804,19 +804,13 @@ lpfc_get_hba_model_desc(struct lpfc_hba * phba, uint8_t * mdp, uint8_t * descp) ...@@ -804,19 +804,13 @@ lpfc_get_hba_model_desc(struct lpfc_hba * phba, uint8_t * mdp, uint8_t * descp)
{ {
lpfc_vpd_t *vp; lpfc_vpd_t *vp;
uint16_t dev_id = phba->pcidev->device; uint16_t dev_id = phba->pcidev->device;
uint16_t dev_subid = phba->pcidev->subsystem_device;
uint8_t hdrtype;
int max_speed; int max_speed;
char * ports;
struct { struct {
char * name; char * name;
int max_speed; int max_speed;
char * ports;
char * bus; char * bus;
} m = {"<Unknown>", 0, "", ""}; } m = {"<Unknown>", 0, ""};
pci_read_config_byte(phba->pcidev, PCI_HEADER_TYPE, &hdrtype);
ports = (hdrtype == 0x80) ? "2-port " : "";
if (mdp && mdp[0] != '\0' if (mdp && mdp[0] != '\0'
&& descp && descp[0] != '\0') && descp && descp[0] != '\0')
return; return;
...@@ -836,130 +830,93 @@ lpfc_get_hba_model_desc(struct lpfc_hba * phba, uint8_t * mdp, uint8_t * descp) ...@@ -836,130 +830,93 @@ lpfc_get_hba_model_desc(struct lpfc_hba * phba, uint8_t * mdp, uint8_t * descp)
switch (dev_id) { switch (dev_id) {
case PCI_DEVICE_ID_FIREFLY: case PCI_DEVICE_ID_FIREFLY:
m = (typeof(m)){"LP6000", max_speed, "", "PCI"}; m = (typeof(m)){"LP6000", max_speed, "PCI"};
break; break;
case PCI_DEVICE_ID_SUPERFLY: case PCI_DEVICE_ID_SUPERFLY:
if (vp->rev.biuRev >= 1 && vp->rev.biuRev <= 3) if (vp->rev.biuRev >= 1 && vp->rev.biuRev <= 3)
m = (typeof(m)){"LP7000", max_speed, "", "PCI"}; m = (typeof(m)){"LP7000", max_speed, "PCI"};
else else
m = (typeof(m)){"LP7000E", max_speed, "", "PCI"}; m = (typeof(m)){"LP7000E", max_speed, "PCI"};
break; break;
case PCI_DEVICE_ID_DRAGONFLY: case PCI_DEVICE_ID_DRAGONFLY:
m = (typeof(m)){"LP8000", max_speed, "", "PCI"}; m = (typeof(m)){"LP8000", max_speed, "PCI"};
break; break;
case PCI_DEVICE_ID_CENTAUR: case PCI_DEVICE_ID_CENTAUR:
if (FC_JEDEC_ID(vp->rev.biuRev) == CENTAUR_2G_JEDEC_ID) if (FC_JEDEC_ID(vp->rev.biuRev) == CENTAUR_2G_JEDEC_ID)
m = (typeof(m)){"LP9002", max_speed, "", "PCI"}; m = (typeof(m)){"LP9002", max_speed, "PCI"};
else else
m = (typeof(m)){"LP9000", max_speed, "", "PCI"}; m = (typeof(m)){"LP9000", max_speed, "PCI"};
break; break;
case PCI_DEVICE_ID_RFLY: case PCI_DEVICE_ID_RFLY:
m = (typeof(m)){"LP952", max_speed, "", "PCI"}; m = (typeof(m)){"LP952", max_speed, "PCI"};
break; break;
case PCI_DEVICE_ID_PEGASUS: case PCI_DEVICE_ID_PEGASUS:
m = (typeof(m)){"LP9802", max_speed, "", "PCI-X"}; m = (typeof(m)){"LP9802", max_speed, "PCI-X"};
break; break;
case PCI_DEVICE_ID_THOR: case PCI_DEVICE_ID_THOR:
if (hdrtype == 0x80) m = (typeof(m)){"LP10000", max_speed, "PCI-X"};
m = (typeof(m)){"LP10000DC",
max_speed, ports, "PCI-X"};
else
m = (typeof(m)){"LP10000",
max_speed, ports, "PCI-X"};
break; break;
case PCI_DEVICE_ID_VIPER: case PCI_DEVICE_ID_VIPER:
m = (typeof(m)){"LPX1000", max_speed, "", "PCI-X"}; m = (typeof(m)){"LPX1000", max_speed, "PCI-X"};
break; break;
case PCI_DEVICE_ID_PFLY: case PCI_DEVICE_ID_PFLY:
m = (typeof(m)){"LP982", max_speed, "", "PCI-X"}; m = (typeof(m)){"LP982", max_speed, "PCI-X"};
break; break;
case PCI_DEVICE_ID_TFLY: case PCI_DEVICE_ID_TFLY:
if (hdrtype == 0x80) m = (typeof(m)){"LP1050", max_speed, "PCI-X"};
m = (typeof(m)){"LP1050DC", max_speed, ports, "PCI-X"};
else
m = (typeof(m)){"LP1050", max_speed, ports, "PCI-X"};
break; break;
case PCI_DEVICE_ID_HELIOS: case PCI_DEVICE_ID_HELIOS:
if (hdrtype == 0x80) m = (typeof(m)){"LP11000", max_speed, "PCI-X2"};
m = (typeof(m)){"LP11002", max_speed, ports, "PCI-X2"};
else
m = (typeof(m)){"LP11000", max_speed, ports, "PCI-X2"};
break; break;
case PCI_DEVICE_ID_HELIOS_SCSP: case PCI_DEVICE_ID_HELIOS_SCSP:
m = (typeof(m)){"LP11000-SP", max_speed, ports, "PCI-X2"}; m = (typeof(m)){"LP11000-SP", max_speed, "PCI-X2"};
break; break;
case PCI_DEVICE_ID_HELIOS_DCSP: case PCI_DEVICE_ID_HELIOS_DCSP:
m = (typeof(m)){"LP11002-SP", max_speed, ports, "PCI-X2"}; m = (typeof(m)){"LP11002-SP", max_speed, "PCI-X2"};
break; break;
case PCI_DEVICE_ID_NEPTUNE: case PCI_DEVICE_ID_NEPTUNE:
if (hdrtype == 0x80) m = (typeof(m)){"LPe1000", max_speed, "PCIe"};
m = (typeof(m)){"LPe1002", max_speed, ports, "PCIe"};
else
m = (typeof(m)){"LPe1000", max_speed, ports, "PCIe"};
break; break;
case PCI_DEVICE_ID_NEPTUNE_SCSP: case PCI_DEVICE_ID_NEPTUNE_SCSP:
m = (typeof(m)){"LPe1000-SP", max_speed, ports, "PCIe"}; m = (typeof(m)){"LPe1000-SP", max_speed, "PCIe"};
break; break;
case PCI_DEVICE_ID_NEPTUNE_DCSP: case PCI_DEVICE_ID_NEPTUNE_DCSP:
m = (typeof(m)){"LPe1002-SP", max_speed, ports, "PCIe"}; m = (typeof(m)){"LPe1002-SP", max_speed, "PCIe"};
break; break;
case PCI_DEVICE_ID_BMID: case PCI_DEVICE_ID_BMID:
m = (typeof(m)){"LP1150", max_speed, ports, "PCI-X2"}; m = (typeof(m)){"LP1150", max_speed, "PCI-X2"};
break; break;
case PCI_DEVICE_ID_BSMB: case PCI_DEVICE_ID_BSMB:
m = (typeof(m)){"LP111", max_speed, ports, "PCI-X2"}; m = (typeof(m)){"LP111", max_speed, "PCI-X2"};
break; break;
case PCI_DEVICE_ID_ZEPHYR: case PCI_DEVICE_ID_ZEPHYR:
if (hdrtype == 0x80) m = (typeof(m)){"LPe11000", max_speed, "PCIe"};
m = (typeof(m)){"LPe11002", max_speed, ports, "PCIe"};
else
m = (typeof(m)){"LPe11000", max_speed, ports, "PCIe"};
break; break;
case PCI_DEVICE_ID_ZEPHYR_SCSP: case PCI_DEVICE_ID_ZEPHYR_SCSP:
m = (typeof(m)){"LPe11000", max_speed, ports, "PCIe"}; m = (typeof(m)){"LPe11000", max_speed, "PCIe"};
break; break;
case PCI_DEVICE_ID_ZEPHYR_DCSP: case PCI_DEVICE_ID_ZEPHYR_DCSP:
m = (typeof(m)){"LPe11002-SP", max_speed, ports, "PCIe"}; m = (typeof(m)){"LPe11002-SP", max_speed, "PCIe"};
break; break;
case PCI_DEVICE_ID_ZMID: case PCI_DEVICE_ID_ZMID:
m = (typeof(m)){"LPe1150", max_speed, ports, "PCIe"}; m = (typeof(m)){"LPe1150", max_speed, "PCIe"};
break; break;
case PCI_DEVICE_ID_ZSMB: case PCI_DEVICE_ID_ZSMB:
m = (typeof(m)){"LPe111", max_speed, ports, "PCIe"}; m = (typeof(m)){"LPe111", max_speed, "PCIe"};
break; break;
case PCI_DEVICE_ID_LP101: case PCI_DEVICE_ID_LP101:
m = (typeof(m)){"LP101", max_speed, ports, "PCI-X"}; m = (typeof(m)){"LP101", max_speed, "PCI-X"};
break; break;
case PCI_DEVICE_ID_LP10000S: case PCI_DEVICE_ID_LP10000S:
m = (typeof(m)){"LP10000-S", max_speed, ports, "PCI"}; m = (typeof(m)){"LP10000-S", max_speed, "PCI"};
break; break;
case PCI_DEVICE_ID_LP11000S: case PCI_DEVICE_ID_LP11000S:
case PCI_DEVICE_ID_LPE11000S:
switch (dev_subid) {
case PCI_SUBSYSTEM_ID_LP11000S:
m = (typeof(m)){"LP11000-S", max_speed, m = (typeof(m)){"LP11000-S", max_speed,
ports, "PCI-X2"}; "PCI-X2"};
break; break;
case PCI_SUBSYSTEM_ID_LP11002S: case PCI_DEVICE_ID_LPE11000S:
m = (typeof(m)){"LP11002-S", max_speed,
ports, "PCI-X2"};
break;
case PCI_SUBSYSTEM_ID_LPE11000S:
m = (typeof(m)){"LPe11000-S", max_speed, m = (typeof(m)){"LPe11000-S", max_speed,
ports, "PCIe"}; "PCIe"};
break;
case PCI_SUBSYSTEM_ID_LPE11002S:
m = (typeof(m)){"LPe11002-S", max_speed,
ports, "PCIe"};
break;
case PCI_SUBSYSTEM_ID_LPE11010S:
m = (typeof(m)){"LPe11010-S", max_speed,
"10-port ", "PCIe"};
break;
default:
m = (typeof(m)){ NULL };
break;
}
break; break;
default: default:
m = (typeof(m)){ NULL }; m = (typeof(m)){ NULL };
...@@ -970,8 +927,8 @@ lpfc_get_hba_model_desc(struct lpfc_hba * phba, uint8_t * mdp, uint8_t * descp) ...@@ -970,8 +927,8 @@ lpfc_get_hba_model_desc(struct lpfc_hba * phba, uint8_t * mdp, uint8_t * descp)
snprintf(mdp, 79,"%s", m.name); snprintf(mdp, 79,"%s", m.name);
if (descp && descp[0] == '\0') if (descp && descp[0] == '\0')
snprintf(descp, 255, snprintf(descp, 255,
"Emulex %s %dGb %s%s Fibre Channel Adapter", "Emulex %s %dGb %s Fibre Channel Adapter",
m.name, m.max_speed, m.ports, m.bus); m.name, m.max_speed, m.bus);
} }
/**************************************************/ /**************************************************/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment