From patchwork Tue Jun 30 06:54:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 6694221 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 EAA5DC05AC for ; Tue, 30 Jun 2015 07:01:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2311A20279 for ; Tue, 30 Jun 2015 07:01:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2BA64205E7 for ; Tue, 30 Jun 2015 07:01:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753750AbbF3HA1 (ORCPT ); Tue, 30 Jun 2015 03:00:27 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:33930 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752879AbbF3G4N (ORCPT ); Tue, 30 Jun 2015 02:56:13 -0400 Received: by pabvl15 with SMTP id vl15so688242pab.1 for ; Mon, 29 Jun 2015 23:56:12 -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=rlE6J3Aw5QMEKD23tZpEGCcavt48ARa8FNUst8FDecw=; b=GBrWoidA7HEAX8px25PQkBWgBRZjIbLFUW51W/23ifaUctBXgAWxm1RGTQAdp2qVV+ D15RrIs1qQ3JO+SricwECKivs7uyj1xVUdv2VP/MvPHB98OjT4JdV4/IIMXtZ3M6h0lE EtqaP2mV+5tXyqDccIaCUMIK3FjCz+96c+rI0= 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=rlE6J3Aw5QMEKD23tZpEGCcavt48ARa8FNUst8FDecw=; b=RVtaoyM3UUblr0J8yFZtVlTH8j2ZtXXvWjUQ+JIRxI6hhH2E2+U1zOwGypQzjjyT15 abdMOfFhjopfsZ1BkY/yP6au7JkK18dJe4ARl8Q1+7hRIRj+5B9dsbYh5YiZSgZMNWHp fria7mBzWtwFrqNT9gEAi0QOlQSYNk3M4itNVRTGDZk4n1aKtLEw0XFnsvdBZc5gF57u mYbwOul61DuI8Tgzr3nPH7Qhzj67SReyq9Ql4Vl9PX9r9nTVB00TpT0rJVdUgKAKRLIx D1Jjbzif1Tm51Y44X4oIvNPx3HCDIS0NVEAouxhOEW43smGremI2Gsvd0MtWWvFeTbSu OAIw== X-Gm-Message-State: ALoCoQlk/EH02u+SPvvyFXIpDVEEytaMbYyKUYC91+uT+7yTVzKPSGyIr05tTBgwFQs/qAxuJlP7 X-Received: by 10.70.23.196 with SMTP id o4mr13081663pdf.164.1435647372675; Mon, 29 Jun 2015 23:56:12 -0700 (PDT) Received: from host1.lsi.com ([192.19.239.250]) by mx.google.com with ESMTPSA id 1sm935543pds.79.2015.06.29.23.56.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 Jun 2015 23:56:11 -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, jthumshirn@suse.de, Sreekanth Reddy Subject: [PATCH v2 11/20] [SCSI] mpt3sas: Add branding string support for OEM custom HBA Date: Tue, 30 Jun 2015 12:24:57 +0530 Message-Id: <1435647306-36956-12-git-send-email-Sreekanth.Reddy@avagotech.com> X-Mailer: git-send-email 2.0.2 In-Reply-To: <1435647306-36956-1-git-send-email-Sreekanth.Reddy@avagotech.com> References: <1435647306-36956-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=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,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 Add the following OEM's branding to the mpt3sas driver. "VendorID" "DeviceID" "SubsystemVendor ID" "SubsystemDevice ID" Cisco Branding String 0x1000 0x97 SVID = 0x1137 0x014C Cisco 9300-8E 12G SAS HBA Changes in v2: Patch version change only. Signed-off-by: Sreekanth Reddy Reviewed-by: Martin K. Petersen --- drivers/scsi/mpt3sas/mpt3sas_base.c | 34 ++++++++++++++++++++++++++++++++++ drivers/scsi/mpt3sas/mpt3sas_base.h | 11 +++++++++++ 2 files changed, 45 insertions(+) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index e8b93a8..4f82687 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -2398,6 +2398,39 @@ _base_display_dell_branding(struct MPT3SAS_ADAPTER *ioc) } } +/** + * _base_display_cisco_branding - Display branding string + * @ioc: per adapter object + * + * Return nothing. + */ +static void +_base_display_cisco_branding(struct MPT3SAS_ADAPTER *ioc) +{ + if (ioc->pdev->subsystem_vendor != PCI_VENDOR_ID_CISCO) + return; + + switch (ioc->pdev->device) { + case MPI25_MFGPAGE_DEVID_SAS3008: + switch (ioc->pdev->subsystem_device) { + case MPT3SAS_CISCO_12G_HBA_SSDID: + pr_info(MPT3SAS_FMT "%s\n", ioc->name, + MPT3SAS_CISCO_12G_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", + ioc->name, ioc->pdev->subsystem_device); + break; + } +} /** * _base_display_ioc_capabilities - Disply IOC's capabilities. @@ -2430,6 +2463,7 @@ _base_display_ioc_capabilities(struct MPT3SAS_ADAPTER *ioc) _base_display_intel_branding(ioc); _base_display_dell_branding(ioc); + _base_display_cisco_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 a5a34f3..736682c 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.h +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h @@ -163,6 +163,17 @@ #define MPT3SAS_DELL_12G_HBA_SSDID 0x1F46 /* + * Cisco HBA branding + */ +#define MPT3SAS_CISCO_12G_HBA_BRANDING \ + "Cisco 9300-8E 12G SAS HBA" + +/* + * Cisco HBA SSSDIDs + */ + #define MPT3SAS_CISCO_12G_HBA_SSDID 0x14C + +/* * status bits for ioc->diag_buffer_status */ #define MPT3_DIAG_BUFFER_IS_REGISTERED (0x01)