diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 11 |
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 |