[SCSI] mpt2sas : Added customer specific display support
authorKashyap, Desai <kashyap.desai@lsi.com>
Tue, 15 Mar 2011 14:34:26 +0000 (20:04 +0530)
committerJames Bottomley <James.Bottomley@suse.de>
Wed, 23 Mar 2011 16:36:51 +0000 (11:36 -0500)
Added Vendor specific branding message support.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/mpt2sas/mpt2sas_base.c
drivers/scsi/mpt2sas/mpt2sas_base.h

index e8a6f1cf1e4b25ac240f4601f360e510c8e1a618..5e001ffd4c13410c8f34cfb51962e3483b1ed6c7 100644 (file)
@@ -1747,6 +1747,54 @@ _base_display_intel_branding(struct MPT2SAS_ADAPTER *ioc)
        }
 }
 
+/**
+ * _base_display_hp_branding - Display branding string
+ * @ioc: per adapter object
+ *
+ * Return nothing.
+ */
+static void
+_base_display_hp_branding(struct MPT2SAS_ADAPTER *ioc)
+{
+       if (ioc->pdev->subsystem_vendor != MPT2SAS_HP_3PAR_SSVID)
+               return;
+
+       switch (ioc->pdev->device) {
+       case MPI2_MFGPAGE_DEVID_SAS2004:
+               switch (ioc->pdev->subsystem_device) {
+               case MPT2SAS_HP_DAUGHTER_2_4_INTERNAL_SSDID:
+                       printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
+                           MPT2SAS_HP_DAUGHTER_2_4_INTERNAL_BRANDING);
+                       break;
+               default:
+                       break;
+               }
+       case MPI2_MFGPAGE_DEVID_SAS2308_2:
+               switch (ioc->pdev->subsystem_device) {
+               case MPT2SAS_HP_2_4_INTERNAL_SSDID:
+                       printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
+                           MPT2SAS_HP_2_4_INTERNAL_BRANDING);
+                       break;
+               case MPT2SAS_HP_2_4_EXTERNAL_SSDID:
+                       printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
+                           MPT2SAS_HP_2_4_EXTERNAL_BRANDING);
+                       break;
+               case MPT2SAS_HP_1_4_INTERNAL_1_4_EXTERNAL_SSDID:
+                       printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
+                           MPT2SAS_HP_1_4_INTERNAL_1_4_EXTERNAL_BRANDING);
+                       break;
+               case MPT2SAS_HP_EMBEDDED_2_4_INTERNAL_SSDID:
+                       printk(MPT2SAS_INFO_FMT "%s\n", ioc->name,
+                           MPT2SAS_HP_EMBEDDED_2_4_INTERNAL_BRANDING);
+                       break;
+               default:
+                       break;
+               }
+       default:
+               break;
+       }
+}
+
 /**
  * _base_display_ioc_capabilities - Disply IOC's capabilities.
  * @ioc: per adapter object
@@ -1778,6 +1826,7 @@ _base_display_ioc_capabilities(struct MPT2SAS_ADAPTER *ioc)
 
        _base_display_dell_branding(ioc);
        _base_display_intel_branding(ioc);
+       _base_display_hp_branding(ioc);
 
        printk(MPT2SAS_INFO_FMT "Protocol=(", ioc->name);
 
index a3f8aa9baea42b77dd32484d35aa74a57573deff..500328245f6159fa1713ce4b0ae20df11513c603 100644 (file)
 #define MPT2SAS_INTEL_RMS2LL080_SSDID          0x350E
 #define MPT2SAS_INTEL_RMS2LL040_SSDID          0x350F
 
+
+/*
+ * HP HBA branding
+ */
+#define MPT2SAS_HP_3PAR_SSVID                0x1590
+#define MPT2SAS_HP_2_4_INTERNAL_BRANDING        "HP H220 Host Bus Adapter"
+#define MPT2SAS_HP_2_4_EXTERNAL_BRANDING        "HP H221 Host Bus Adapter"
+#define MPT2SAS_HP_1_4_INTERNAL_1_4_EXTERNAL_BRANDING "HP H222 Host Bus Adapter"
+#define MPT2SAS_HP_EMBEDDED_2_4_INTERNAL_BRANDING    "HP H220i Host Bus Adapter"
+#define MPT2SAS_HP_DAUGHTER_2_4_INTERNAL_BRANDING    "HP H210i Host Bus Adapter"
+
+/*
+ * HO HBA SSDIDs
+ */
+#define MPT2SAS_HP_2_4_INTERNAL_SSDID            0x0041
+#define MPT2SAS_HP_2_4_EXTERNAL_SSDID            0x0042
+#define MPT2SAS_HP_1_4_INTERNAL_1_4_EXTERNAL_SSDID    0x0043
+#define MPT2SAS_HP_EMBEDDED_2_4_INTERNAL_SSDID        0x0044
+#define MPT2SAS_HP_DAUGHTER_2_4_INTERNAL_SSDID        0x0046
+
 /*
  * per target private data
  */