diff options
author | Eric Moore <eric.moore@lsi.com> | 2009-04-21 17:40:48 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-04-27 11:54:00 -0400 |
commit | f0f9cc1fb8a21f3ff90900505fc82a43d29d0975 (patch) | |
tree | c1126cc4206a9e98c0b19cfd5bed7eaa9e92ed67 /drivers/scsi/mpt2sas/mpt2sas_base.c | |
parent | e5f9bb198aa47d06553b66cc5f24ded49ed0b70d (diff) |
[SCSI] mpt2sas : Identify Dell series-7 adapters at driver load time
The Dell branding along with the VID, DID, SSVID, SSDID following the LSI
branding that contains the card firmware/chip/bios versions. If the SSDID
is not known but it is a Dell HBA, the driver will print the SSDID instead
of the Dell branding string. Nothing will be printed for non Dell HBAs
Signed-off-by: Eric Moore <eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_base.c')
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_base.c | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index 12ecffbf518f..f3da592f7bcc 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c | |||
@@ -1396,6 +1396,64 @@ mpt2sas_base_put_smid_target_assist(struct MPT2SAS_ADAPTER *ioc, u16 smid, | |||
1396 | } | 1396 | } |
1397 | 1397 | ||
1398 | /** | 1398 | /** |
1399 | * _base_display_dell_branding - Disply branding string | ||
1400 | * @ioc: per adapter object | ||
1401 | * | ||
1402 | * Return nothing. | ||
1403 | */ | ||
1404 | static void | ||
1405 | _base_display_dell_branding(struct MPT2SAS_ADAPTER *ioc) | ||
1406 | { | ||
1407 | char dell_branding[MPT2SAS_DELL_BRANDING_SIZE]; | ||
1408 | |||
1409 | if (ioc->pdev->subsystem_vendor != PCI_VENDOR_ID_DELL) | ||
1410 | return; | ||
1411 | |||
1412 | memset(dell_branding, 0, MPT2SAS_DELL_BRANDING_SIZE); | ||
1413 | switch (ioc->pdev->subsystem_device) { | ||
1414 | case MPT2SAS_DELL_6GBPS_SAS_HBA_SSDID: | ||
1415 | strncpy(dell_branding, MPT2SAS_DELL_6GBPS_SAS_HBA_BRANDING, | ||
1416 | MPT2SAS_DELL_BRANDING_SIZE - 1); | ||
1417 | break; | ||
1418 | case MPT2SAS_DELL_PERC_H200_ADAPTER_SSDID: | ||
1419 | strncpy(dell_branding, MPT2SAS_DELL_PERC_H200_ADAPTER_BRANDING, | ||
1420 | MPT2SAS_DELL_BRANDING_SIZE - 1); | ||
1421 | break; | ||
1422 | case MPT2SAS_DELL_PERC_H200_INTEGRATED_SSDID: | ||
1423 | strncpy(dell_branding, | ||
1424 | MPT2SAS_DELL_PERC_H200_INTEGRATED_BRANDING, | ||
1425 | MPT2SAS_DELL_BRANDING_SIZE - 1); | ||
1426 | break; | ||
1427 | case MPT2SAS_DELL_PERC_H200_MODULAR_SSDID: | ||
1428 | strncpy(dell_branding, | ||
1429 | MPT2SAS_DELL_PERC_H200_MODULAR_BRANDING, | ||
1430 | MPT2SAS_DELL_BRANDING_SIZE - 1); | ||
1431 | break; | ||
1432 | case MPT2SAS_DELL_PERC_H200_EMBEDDED_SSDID: | ||
1433 | strncpy(dell_branding, | ||
1434 | MPT2SAS_DELL_PERC_H200_EMBEDDED_BRANDING, | ||
1435 | MPT2SAS_DELL_BRANDING_SIZE - 1); | ||
1436 | break; | ||
1437 | case MPT2SAS_DELL_PERC_H200_SSDID: | ||
1438 | strncpy(dell_branding, MPT2SAS_DELL_PERC_H200_BRANDING, | ||
1439 | MPT2SAS_DELL_BRANDING_SIZE - 1); | ||
1440 | break; | ||
1441 | case MPT2SAS_DELL_6GBPS_SAS_SSDID: | ||
1442 | strncpy(dell_branding, MPT2SAS_DELL_6GBPS_SAS_BRANDING, | ||
1443 | MPT2SAS_DELL_BRANDING_SIZE - 1); | ||
1444 | break; | ||
1445 | default: | ||
1446 | sprintf(dell_branding, "0x%4X", ioc->pdev->subsystem_device); | ||
1447 | break; | ||
1448 | } | ||
1449 | |||
1450 | printk(MPT2SAS_INFO_FMT "%s: Vendor(0x%04X), Device(0x%04X)," | ||
1451 | " SSVID(0x%04X), SSDID(0x%04X)\n", ioc->name, dell_branding, | ||
1452 | ioc->pdev->vendor, ioc->pdev->device, ioc->pdev->subsystem_vendor, | ||
1453 | ioc->pdev->subsystem_device); | ||
1454 | } | ||
1455 | |||
1456 | /** | ||
1399 | * _base_display_ioc_capabilities - Disply IOC's capabilities. | 1457 | * _base_display_ioc_capabilities - Disply IOC's capabilities. |
1400 | * @ioc: per adapter object | 1458 | * @ioc: per adapter object |
1401 | * | 1459 | * |
@@ -1436,6 +1494,8 @@ _base_display_ioc_capabilities(struct MPT2SAS_ADAPTER *ioc) | |||
1436 | i++; | 1494 | i++; |
1437 | } | 1495 | } |
1438 | 1496 | ||
1497 | _base_display_dell_branding(ioc); | ||
1498 | |||
1439 | i = 0; | 1499 | i = 0; |
1440 | printk("), "); | 1500 | printk("), "); |
1441 | printk("Capabilities=("); | 1501 | printk("Capabilities=("); |