aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_init.c
diff options
context:
space:
mode:
authorJoe Carnuccio <joe.carnuccio@qlogic.com>2008-07-10 19:55:53 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-07-26 15:14:39 -0400
commit1ee2714632ce3f7e6477069b41cb685112f5f217 (patch)
tree330ceb3edcce6f7506d6c6f2d7b7df3adf8e79c4 /drivers/scsi/qla2xxx/qla_init.c
parente5896bd5dcf71fa43ddcc545340b847c13d29c44 (diff)
[SCSI] qla2xxx: Retrieve board serial-number and description from VPD.
Recent ISPs have this information written at manufacturing time, so use the information. This also reduces future churn of the qla_devtbl.h file contents, as the driver can now depend on the information to be present in VPD. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index f4cd2cd874b9..08bdba520c90 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -1501,18 +1501,25 @@ qla2x00_set_model_info(scsi_qla_host_t *ha, uint8_t *model, size_t len, char *de
1501 index = (ha->pdev->subsystem_device & 0xff); 1501 index = (ha->pdev->subsystem_device & 0xff);
1502 if (ha->pdev->subsystem_vendor == PCI_VENDOR_ID_QLOGIC && 1502 if (ha->pdev->subsystem_vendor == PCI_VENDOR_ID_QLOGIC &&
1503 index < QLA_MODEL_NAMES) 1503 index < QLA_MODEL_NAMES)
1504 ha->model_desc = qla2x00_model_name[index * 2 + 1]; 1504 strncpy(ha->model_desc,
1505 qla2x00_model_name[index * 2 + 1],
1506 sizeof(ha->model_desc) - 1);
1505 } else { 1507 } else {
1506 index = (ha->pdev->subsystem_device & 0xff); 1508 index = (ha->pdev->subsystem_device & 0xff);
1507 if (ha->pdev->subsystem_vendor == PCI_VENDOR_ID_QLOGIC && 1509 if (ha->pdev->subsystem_vendor == PCI_VENDOR_ID_QLOGIC &&
1508 index < QLA_MODEL_NAMES) { 1510 index < QLA_MODEL_NAMES) {
1509 strcpy(ha->model_number, 1511 strcpy(ha->model_number,
1510 qla2x00_model_name[index * 2]); 1512 qla2x00_model_name[index * 2]);
1511 ha->model_desc = qla2x00_model_name[index * 2 + 1]; 1513 strncpy(ha->model_desc,
1514 qla2x00_model_name[index * 2 + 1],
1515 sizeof(ha->model_desc) - 1);
1512 } else { 1516 } else {
1513 strcpy(ha->model_number, def); 1517 strcpy(ha->model_number, def);
1514 } 1518 }
1515 } 1519 }
1520 if (IS_FWI2_CAPABLE(ha))
1521 qla2xxx_get_vpd_field(ha, "\x82", ha->model_desc,
1522 sizeof(ha->model_desc));
1516} 1523}
1517 1524
1518/* On sparc systems, obtain port and node WWN from firmware 1525/* On sparc systems, obtain port and node WWN from firmware