From patchwork Fri Jun 12 09:42:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 6596681 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 38E58C0020 for ; Fri, 12 Jun 2015 09:44:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5DC8A20672 for ; Fri, 12 Jun 2015 09:44:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6CD7F2065D for ; Fri, 12 Jun 2015 09:44:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752154AbbFLJnv (ORCPT ); Fri, 12 Jun 2015 05:43:51 -0400 Received: from mail-qc0-f180.google.com ([209.85.216.180]:34179 "EHLO mail-qc0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932281AbbFLJnk (ORCPT ); Fri, 12 Jun 2015 05:43:40 -0400 Received: by qcbfb9 with SMTP id fb9so10266qcb.1 for ; Fri, 12 Jun 2015 02:43:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=avagotech.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jQCLHZQEIWQz5mM5UgpiKKLFB7vv5k6tLo491WK738U=; b=XghMNCA/pemWPO8wb0El/Us903uBgtgHshcG8Wsl1ColFL3HLApk/rgyJ+Ui3N2qsN h57OOfNXbxcl8gJ7/vO2JPkNEK8mAmdcmAJKB+GPbOr6N5PMd7/NdZZBeKeaVcQRNnBy RLDnWinDDCnHFOSqIUPc0WmVjm7D+TdeLbav8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jQCLHZQEIWQz5mM5UgpiKKLFB7vv5k6tLo491WK738U=; b=QzKZ9e5CiufQ1/Rf0Q33io9QsezLEa6ul2EINLwmBwAma4STmRHh5CYg5WknFTCJSe /OfrB7kYpkAmPMibMCx/WMZSq+We8LxCs2eLpNMKQo14KV1jkv9DWLWyAH6QViQSTvSQ uwTSpVrg8QXzYsa+w0xCxY0L+ooC882/eqsP/xR35RaDOvdCbtc20jd3+30s3RtSdbXB ajIOPjqLi0hPQvPGNbBlSVAc8gXWejDCk4Hd76R3rE8L/MeEVt98sOlItry3uOwueixF 6BlKuBuR0uAO5mXicRv0gPkaV40RiO4h2SxymqcPdHI6QEPcAwUZp3Iqznajb7JfDXaE U9ew== X-Gm-Message-State: ALoCoQk5SOpeLlWd1+y9QzbVclAPoyuUWd2Y4DBvKHNdf49kul/1TjaRh8Ht6MmZXCnYW8Ne0koF X-Received: by 10.140.148.72 with SMTP id 69mr17920887qhu.15.1434102219591; Fri, 12 Jun 2015 02:43:39 -0700 (PDT) Received: from host1.lsi.com ([192.19.239.250]) by mx.google.com with ESMTPSA id 18sm1466219qgh.40.2015.06.12.02.43.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Jun 2015 02:43:38 -0700 (PDT) From: Sreekanth Reddy X-Google-Original-From: Sreekanth Reddy To: jejb@kernel.org, hch@infradead.org Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org, JBottomley@Parallels.com, Sathya.Prakash@avagotech.com, linux-kernel@vger.kernel.org, Sreekanth Reddy Subject: [PATCH 10/20] [SCSI] mpt3sas: Add branding string support for OEM's HBA Date: Fri, 12 Jun 2015 15:12:22 +0530 Message-Id: <1434102153-38581-11-git-send-email-Sreekanth.Reddy@avagotech.com> X-Mailer: git-send-email 2.0.2 In-Reply-To: <1434102153-38581-1-git-send-email-Sreekanth.Reddy@avagotech.com> References: <1434102153-38581-1-git-send-email-Sreekanth.Reddy@avagotech.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Added the following Dell branding to the mpt3sas driver. "VendorID" "DeviceID" "SubsystemVendor ID" "SubsystemDevice ID" Dell Branding String 0x1000 0x0097 0x1028 0x1F46 DELL 12Gbps HBA Signed-off-by: Sreekanth Reddy Reviewed-by: Johannes Thumshirn Reviewed-by: Martin K. Petersen --- drivers/scsi/mpt3sas/mpt3sas_base.c | 36 ++++++++++++++++++++++++++++++++++++ drivers/scsi/mpt3sas/mpt3sas_base.h | 11 +++++++++++ 2 files changed, 47 insertions(+) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 6739c0a..db362cb 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -2345,6 +2345,41 @@ _base_display_intel_branding(struct MPT3SAS_ADAPTER *ioc) /** + * _base_display_dell_branding - Display branding string + * @ioc: per adapter object + * + * Return nothing. + */ +static void +_base_display_dell_branding(struct MPT3SAS_ADAPTER *ioc) +{ + if (ioc->pdev->subsystem_vendor != PCI_VENDOR_ID_DELL) + return; + + switch (ioc->pdev->device) { + case MPI25_MFGPAGE_DEVID_SAS3008: + switch (ioc->pdev->subsystem_device) { + case MPT3SAS_DELL_12G_HBA_SSDID: + pr_info(MPT3SAS_FMT "%s\n", ioc->name, + MPT3SAS_DELL_12G_HBA_BRANDING); + break; + default: + pr_info(MPT3SAS_FMT + "Dell 12Gbps HBA: Subsystem ID: 0x%X\n", ioc->name, + ioc->pdev->subsystem_device); + break; + } + break; + default: + pr_info(MPT3SAS_FMT + "Dell 12Gbps HBA: Subsystem ID: 0x%X\n", ioc->name, + ioc->pdev->subsystem_device); + break; + } +} + + +/** * _base_display_ioc_capabilities - Disply IOC's capabilities. * @ioc: per adapter object * @@ -2374,6 +2409,7 @@ _base_display_ioc_capabilities(struct MPT3SAS_ADAPTER *ioc) bios_version & 0x000000FF); _base_display_intel_branding(ioc); + _base_display_dell_branding(ioc); pr_info(MPT3SAS_FMT "Protocol=(", ioc->name); diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h index 2318ef8..c4780c7 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.h +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h @@ -152,6 +152,17 @@ #define MPT3SAS_INTEL_RS3UC080_SSDID 0x3524 /* + * Dell HBA branding + */ +#define MPT3SAS_DELL_12G_HBA_BRANDING \ + "Dell 12Gbps HBA" + +/* + * Dell HBA SSDIDs + */ +#define MPT3SAS_DELL_12G_HBA_SSDID 0x1F46 + +/* * status bits for ioc->diag_buffer_status */ #define MPT3_DIAG_BUFFER_IS_REGISTERED (0x01)