diff mbox

[16/20,SCSI] mpt3sas: Added support for customer specific branding

Message ID 1434102153-38581-17-git-send-email-Sreekanth.Reddy@avagotech.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sreekanth Reddy June 12, 2015, 9:42 a.m. UTC
Added support for below customer specific brandings

"VendorID"   "DeviceID"  "SubsystemVendor ID"   "SubsystemDevice ID"  Cisco Branding String
0x1000         0x97           0x1137                 0x154           Cisco 9300-8i 12Gbps SAS HBA
0x1000         0x97           0x1137                 0x155           Cisco 12G Modular SAS Pass through Controller
0x1000         0x97           0x1137                 0x156           UCS C3X60 12G SAS Pass through Controller

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 29 +++++++++++++++++++++++++++--
 drivers/scsi/mpt3sas/mpt3sas_base.h | 16 ++++++++++++----
 2 files changed, 39 insertions(+), 6 deletions(-)

Comments

Sreekanth Reddy June 18, 2015, 9:53 a.m. UTC | #1
Hi,

Any review comments on this patch. please let us known if any changes
are required.

Thanks,
Sreekanth

On Fri, Jun 12, 2015 at 3:12 PM, Sreekanth Reddy
<sreekanth.reddy@avagotech.com> wrote:
> Added support for below customer specific brandings
>
> "VendorID"   "DeviceID"  "SubsystemVendor ID"   "SubsystemDevice ID"  Cisco Branding String
> 0x1000         0x97           0x1137                 0x154           Cisco 9300-8i 12Gbps SAS HBA
> 0x1000         0x97           0x1137                 0x155           Cisco 12G Modular SAS Pass through Controller
> 0x1000         0x97           0x1137                 0x156           UCS C3X60 12G SAS Pass through Controller
>
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.c | 29 +++++++++++++++++++++++++++--
>  drivers/scsi/mpt3sas/mpt3sas_base.h | 16 ++++++++++++----
>  2 files changed, 39 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
> index 0b26c8d..2f2c331 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
> @@ -2393,9 +2393,17 @@ _base_display_cisco_branding(struct MPT3SAS_ADAPTER *ioc)
>         switch (ioc->pdev->device) {
>         case MPI25_MFGPAGE_DEVID_SAS3008:
>                 switch (ioc->pdev->subsystem_device) {
> -               case MPT3SAS_CISCO_12G_HBA_SSDID:
> +               case MPT3SAS_CISCO_12G_8E_HBA_SSDID:
>                         pr_info(MPT3SAS_FMT "%s\n", ioc->name,
> -                               MPT3SAS_CISCO_12G_HBA_BRANDING);
> +                               MPT3SAS_CISCO_12G_8E_HBA_BRANDING);
> +                       break;
> +               case MPT3SAS_CISCO_12G_8I_HBA_SSDID:
> +                       pr_info(MPT3SAS_FMT "%s\n", ioc->name,
> +                               MPT3SAS_CISCO_12G_8I_HBA_BRANDING);
> +                       break;
> +               case MPT3SAS_CISCO_12G_AVILA_HBA_SSDID:
> +                       pr_info(MPT3SAS_FMT "%s\n", ioc->name,
> +                               MPT3SAS_CISCO_12G_AVILA_HBA_BRANDING);
>                         break;
>                 default:
>                         pr_info(MPT3SAS_FMT
> @@ -2404,6 +2412,23 @@ _base_display_cisco_branding(struct MPT3SAS_ADAPTER *ioc)
>                         break;
>                 }
>                 break;
> +       case MPI25_MFGPAGE_DEVID_SAS3108_1:
> +               switch (ioc->pdev->subsystem_device) {
> +               case MPT3SAS_CISCO_12G_AVILA_HBA_SSDID:
> +                       pr_info(MPT3SAS_FMT "%s\n", ioc->name,
> +                       MPT3SAS_CISCO_12G_AVILA_HBA_BRANDING);
> +                       break;
> +               case MPT3SAS_CISCO_12G_COLUSA_MEZZANINE_HBA_SSDID:
> +                       pr_info(MPT3SAS_FMT "%s\n", ioc->name,
> +                       MPT3SAS_CISCO_12G_COLUSA_MEZZANINE_HBA_BRANDING);
> +                       break;
> +               default:
> +                       pr_info(MPT3SAS_FMT
> +                        "Cisco 12Gbps SAS HBA: Subsystem ID: 0x%X\n",
> +                        ioc->name, ioc->pdev->subsystem_device);
> +                       break;
> +               }
> +               break;
>         default:
>                  pr_info(MPT3SAS_FMT
>                         "Cisco 12Gbps SAS HBA: Subsystem ID: 0x%X\n",
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
> index a89c752..b97039b 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.h
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
> @@ -165,13 +165,21 @@
>  /*
>   * Cisco HBA branding
>   */
> -#define MPT3SAS_CISCO_12G_HBA_BRANDING       \
> -       "Cisco 9300-8E 12G SAS HBA"
> -
> +#define MPT3SAS_CISCO_12G_8E_HBA_BRANDING              \
> +               "Cisco 9300-8E 12G SAS HBA"
> +#define MPT3SAS_CISCO_12G_8I_HBA_BRANDING              \
> +               "Cisco 9300-8i 12G SAS HBA"
> +#define MPT3SAS_CISCO_12G_AVILA_HBA_BRANDING   \
> +               "Cisco 12G Modular SAS Pass through Controller"
> +#define MPT3SAS_CISCO_12G_COLUSA_MEZZANINE_HBA_BRANDING                \
> +               "UCS C3X60 12G SAS Pass through Controller"
>  /*
>   * Cisco HBA SSSDIDs
>   */
> - #define MPT3SAS_CISCO_12G_HBA_SSDID  0x14C
> +#define MPT3SAS_CISCO_12G_8E_HBA_SSDID  0x14C
> +#define MPT3SAS_CISCO_12G_8I_HBA_SSDID  0x154
> +#define MPT3SAS_CISCO_12G_AVILA_HBA_SSDID  0x155
> +#define MPT3SAS_CISCO_12G_COLUSA_MEZZANINE_HBA_SSDID  0x156
>
>  /*
>   * status bits for ioc->diag_buffer_status
> --
> 2.0.2
>
Martin K. Petersen June 19, 2015, 8:44 p.m. UTC | #2
>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

> Added support for below customer specific brandings "VendorID"
> "DeviceID" "SubsystemVendor ID" "SubsystemDevice ID" Cisco Branding
> String 0x1000 0x97 0x1137 0x154 Cisco 9300-8i 12Gbps SAS HBA 0x1000
> 0x97 0x1137 0x155 Cisco 12G Modular SAS Pass through Controller 0x1000
> 0x97 0x1137 0x156 UCS C3X60 12G SAS Pass through Controller

Same comment about not actually changing driver behavior.

These changes belong in pci.ids, not in a driver.
Sreekanth Reddy June 22, 2015, 12:26 p.m. UTC | #3
On Sat, Jun 20, 2015 at 2:14 AM, Martin K. Petersen
<martin.petersen@oracle.com> wrote:
>>>>>> Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:
>
>> Added support for below customer specific brandings "VendorID"
>> "DeviceID" "SubsystemVendor ID" "SubsystemDevice ID" Cisco Branding
>> String 0x1000 0x97 0x1137 0x154 Cisco 9300-8i 12Gbps SAS HBA 0x1000
>> 0x97 0x1137 0x155 Cisco 12G Modular SAS Pass through Controller 0x1000
>> 0x97 0x1137 0x156 UCS C3X60 12G SAS Pass through Controller
>
> Same comment about not actually changing driver behavior.
>
> These changes belong in pci.ids, not in a driver.

Yes Martin, I agree with you that these changes belong in pci.ids. But
Customers are asking us to print the HBA branding name while loading
the driver on their custom HBA's.

>
> --
> Martin K. Petersen      Oracle Linux Engineering
Martin K. Petersen June 22, 2015, 8:36 p.m. UTC | #4
>>>>> "Sreekanth" == Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:

Sreekanth> I agree with you that these changes belong in pci.ids. But
Sreekanth> Customers are asking us to print the HBA branding name while
Sreekanth> loading the driver on their custom HBA's.

Yes, and other HBA vendors have done the same (although thankfully this
practice appears to be going out of fashion).

Personally, I find SAS2308 orders of magnitude more useful and helpful
than WHIZ-BANG2010 since the former tells me exactly what chip I'm
dealing with.

Anyway. No big deal. I just think it's a bad habit to use the kernel for
marketing purposes.
Sreekanth Reddy June 25, 2015, 1:40 p.m. UTC | #5
On Tue, Jun 23, 2015 at 2:06 AM, Martin K. Petersen
<martin.petersen@oracle.com> wrote:
>
> >>>>> "Sreekanth" == Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:
>
> Sreekanth> I agree with you that these changes belong in pci.ids. But
> Sreekanth> Customers are asking us to print the HBA branding name while
> Sreekanth> loading the driver on their custom HBA's.
>
> Yes, and other HBA vendors have done the same (although thankfully this
> practice appears to be going out of fashion).
>
> Personally, I find SAS2308 orders of magnitude more useful and helpful
> than WHIZ-BANG2010 since the former tells me exactly what chip I'm
> dealing with.
>
> Anyway. No big deal. I just think it's a bad habit to use the kernel for
> marketing purposes.

Agreed. Can you please consider this patch for this time. Next time
onwards we take some actions to not encourage these types of request
from customers.

>
>
> --
> Martin K. Petersen      Oracle Linux Engineering
diff mbox

Patch

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 0b26c8d..2f2c331 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -2393,9 +2393,17 @@  _base_display_cisco_branding(struct MPT3SAS_ADAPTER *ioc)
 	switch (ioc->pdev->device) {
 	case MPI25_MFGPAGE_DEVID_SAS3008:
 		switch (ioc->pdev->subsystem_device) {
-		case MPT3SAS_CISCO_12G_HBA_SSDID:
+		case MPT3SAS_CISCO_12G_8E_HBA_SSDID:
 			pr_info(MPT3SAS_FMT "%s\n", ioc->name,
-				MPT3SAS_CISCO_12G_HBA_BRANDING);
+				MPT3SAS_CISCO_12G_8E_HBA_BRANDING);
+			break;
+		case MPT3SAS_CISCO_12G_8I_HBA_SSDID:
+			pr_info(MPT3SAS_FMT "%s\n", ioc->name,
+				MPT3SAS_CISCO_12G_8I_HBA_BRANDING);
+			break;
+		case MPT3SAS_CISCO_12G_AVILA_HBA_SSDID:
+			pr_info(MPT3SAS_FMT "%s\n", ioc->name,
+				MPT3SAS_CISCO_12G_AVILA_HBA_BRANDING);
 			break;
 		default:
 			pr_info(MPT3SAS_FMT
@@ -2404,6 +2412,23 @@  _base_display_cisco_branding(struct MPT3SAS_ADAPTER *ioc)
 			break;
 		}
 		break;
+	case MPI25_MFGPAGE_DEVID_SAS3108_1:
+		switch (ioc->pdev->subsystem_device) {
+		case MPT3SAS_CISCO_12G_AVILA_HBA_SSDID:
+			pr_info(MPT3SAS_FMT "%s\n", ioc->name,
+			MPT3SAS_CISCO_12G_AVILA_HBA_BRANDING);
+			break;
+		case MPT3SAS_CISCO_12G_COLUSA_MEZZANINE_HBA_SSDID:
+			pr_info(MPT3SAS_FMT "%s\n", ioc->name,
+			MPT3SAS_CISCO_12G_COLUSA_MEZZANINE_HBA_BRANDING);
+			break;
+		default:
+			pr_info(MPT3SAS_FMT
+			 "Cisco 12Gbps SAS HBA: Subsystem ID: 0x%X\n",
+			 ioc->name, ioc->pdev->subsystem_device);
+			break;
+		}
+		break;
 	default:
 		 pr_info(MPT3SAS_FMT
 			"Cisco 12Gbps SAS HBA: Subsystem ID: 0x%X\n",
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h
index a89c752..b97039b 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.h
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.h
@@ -165,13 +165,21 @@ 
 /*
  * Cisco HBA branding
  */
-#define MPT3SAS_CISCO_12G_HBA_BRANDING       \
-	"Cisco 9300-8E 12G SAS HBA"
-
+#define MPT3SAS_CISCO_12G_8E_HBA_BRANDING		\
+		"Cisco 9300-8E 12G SAS HBA"
+#define MPT3SAS_CISCO_12G_8I_HBA_BRANDING		\
+		"Cisco 9300-8i 12G SAS HBA"
+#define MPT3SAS_CISCO_12G_AVILA_HBA_BRANDING	\
+		"Cisco 12G Modular SAS Pass through Controller"
+#define MPT3SAS_CISCO_12G_COLUSA_MEZZANINE_HBA_BRANDING		\
+		"UCS C3X60 12G SAS Pass through Controller"
 /*
  * Cisco HBA SSSDIDs
  */
- #define MPT3SAS_CISCO_12G_HBA_SSDID  0x14C
+#define MPT3SAS_CISCO_12G_8E_HBA_SSDID  0x14C
+#define MPT3SAS_CISCO_12G_8I_HBA_SSDID  0x154
+#define MPT3SAS_CISCO_12G_AVILA_HBA_SSDID  0x155
+#define MPT3SAS_CISCO_12G_COLUSA_MEZZANINE_HBA_SSDID  0x156
 
 /*
  * status bits for ioc->diag_buffer_status