[SCSI] megaraid_sas: Add support to display Customer branding details in syslog
authorSumit.Saxena@lsi.com <Sumit.Saxena@lsi.com>
Wed, 22 May 2013 07:02:43 +0000 (12:32 +0530)
committerJames Bottomley <JBottomley@Parallels.com>
Tue, 25 Jun 2013 00:42:26 +0000 (17:42 -0700)
Signed-off-by: Sumit Saxena <sumit.saxena@lsi.com>
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/megaraid/megaraid_sas.h
drivers/scsi/megaraid/megaraid_sas_fusion.c

index d5efad70f234aab4b4eb7daf9509d2312b22eee1..9504b519e12166ac158e7904f5942f04ec79ccb2 100644 (file)
 #define PCI_DEVICE_ID_LSI_INVADER              0x005d
 #define PCI_DEVICE_ID_LSI_FURY                 0x005f
 
+/*
+ * Intel HBA SSDIDs
+ */
+#define MEGARAID_INTEL_RS3DC080_SSDID          0x9360
+#define MEGARAID_INTEL_RS3DC040_SSDID          0x9362
+#define MEGARAID_INTEL_RS3SC008_SSDID          0x9380
+#define MEGARAID_INTEL_RS3MC044_SSDID          0x9381
+#define MEGARAID_INTEL_RS3WC080_SSDID          0x9341
+#define MEGARAID_INTEL_RS3WC040_SSDID          0x9343
+
+/*
+ * Intel HBA branding
+ */
+#define MEGARAID_INTEL_RS3DC080_BRANDING       \
+       "Intel(R) RAID Controller RS3DC080"
+#define MEGARAID_INTEL_RS3DC040_BRANDING       \
+       "Intel(R) RAID Controller RS3DC040"
+#define MEGARAID_INTEL_RS3SC008_BRANDING       \
+       "Intel(R) RAID Controller RS3SC008"
+#define MEGARAID_INTEL_RS3MC044_BRANDING       \
+       "Intel(R) RAID Controller RS3MC044"
+#define MEGARAID_INTEL_RS3WC080_BRANDING       \
+       "Intel(R) RAID Controller RS3WC080"
+#define MEGARAID_INTEL_RS3WC040_BRANDING       \
+       "Intel(R) RAID Controller RS3WC040"
+
 /*
  * =====================================
  * MegaRAID SAS MFI firmware definitions
index 454743d50a8ae3986f9f11bdd357fe08319226d0..73aa68e60a12f4b48530f9457c12bdd69943d8ee 100644 (file)
@@ -864,6 +864,66 @@ megasas_sync_map_info(struct megasas_instance *instance)
        return ret;
 }
 
+/*
+ * meagasas_display_intel_branding - Display branding string
+ * @instance: per adapter object
+ *
+ * Return nothing.
+ */
+static void
+megasas_display_intel_branding(struct megasas_instance *instance)
+{
+       if (instance->pdev->subsystem_vendor != PCI_VENDOR_ID_INTEL)
+               return;
+
+       switch (instance->pdev->device) {
+       case PCI_DEVICE_ID_LSI_INVADER:
+               switch (instance->pdev->subsystem_device) {
+               case MEGARAID_INTEL_RS3DC080_SSDID:
+                       dev_info(&instance->pdev->dev, "scsi host %d: %s\n",
+                               instance->host->host_no,
+                               MEGARAID_INTEL_RS3DC080_BRANDING);
+                       break;
+               case MEGARAID_INTEL_RS3DC040_SSDID:
+                       dev_info(&instance->pdev->dev, "scsi host %d: %s\n",
+                               instance->host->host_no,
+                               MEGARAID_INTEL_RS3DC040_BRANDING);
+                       break;
+               case MEGARAID_INTEL_RS3SC008_SSDID:
+                       dev_info(&instance->pdev->dev, "scsi host %d: %s\n",
+                               instance->host->host_no,
+                               MEGARAID_INTEL_RS3SC008_BRANDING);
+                       break;
+               case MEGARAID_INTEL_RS3MC044_SSDID:
+                       dev_info(&instance->pdev->dev, "scsi host %d: %s\n",
+                               instance->host->host_no,
+                               MEGARAID_INTEL_RS3MC044_BRANDING);
+                       break;
+               default:
+                       break;
+               }
+               break;
+       case PCI_DEVICE_ID_LSI_FURY:
+               switch (instance->pdev->subsystem_device) {
+               case MEGARAID_INTEL_RS3WC080_SSDID:
+                       dev_info(&instance->pdev->dev, "scsi host %d: %s\n",
+                               instance->host->host_no,
+                               MEGARAID_INTEL_RS3WC080_BRANDING);
+                       break;
+               case MEGARAID_INTEL_RS3WC040_SSDID:
+                       dev_info(&instance->pdev->dev, "scsi host %d: %s\n",
+                               instance->host->host_no,
+                               MEGARAID_INTEL_RS3WC040_BRANDING);
+                       break;
+               default:
+                       break;
+               }
+               break;
+       default:
+               break;
+       }
+}
+
 /**
  * megasas_init_adapter_fusion -       Initializes the FW
  * @instance:          Adapter soft state
@@ -944,6 +1004,8 @@ megasas_init_adapter_fusion(struct megasas_instance *instance)
        if (megasas_ioc_init_fusion(instance))
                goto fail_ioc_init;
 
+       megasas_display_intel_branding(instance);
+
        instance->flag_ieee = 1;
 
        fusion->map_sz =  sizeof(struct MR_FW_RAID_MAP) +