From patchwork Fri Jun 12 09:42:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 6596891 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 2D69FC0020 for ; Fri, 12 Jun 2015 09:48:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4A8EC20397 for ; Fri, 12 Jun 2015 09:48:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 32F2620260 for ; Fri, 12 Jun 2015 09:48:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932308AbbFLJnt (ORCPT ); Fri, 12 Jun 2015 05:43:49 -0400 Received: from mail-qk0-f177.google.com ([209.85.220.177]:35768 "EHLO mail-qk0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753300AbbFLJnp (ORCPT ); Fri, 12 Jun 2015 05:43:45 -0400 Received: by qkhq76 with SMTP id q76so14834443qkh.2 for ; Fri, 12 Jun 2015 02:43:44 -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=mo+N9CHiDfjgYaAAkTtB38Q6P7C3s6/cf/OH/Dc/SJw=; b=BK8gfQQ2h+8Zd9F09Y4HyQW38tDjdq62srCK0Bzf2TF3NjOCOLqtv42SdjYY5aA1KU LOdq7NEjpec772/9gcgdRJKpQCPeRhkvaYIx3jI90Ftpjf8Gne9iPck0iO1ryzpBtJ5D l56loRq20ZoZgdu9ogxRQ7tmOx6oxwOqQZMSQ= 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=mo+N9CHiDfjgYaAAkTtB38Q6P7C3s6/cf/OH/Dc/SJw=; b=Eay3SXhjuyFBxEerjaTUJwZGvgCkwPqMDmwgOJYqoT2iBn3rtxPM1SXL3a5oksD17h /bBkx2OHbuib3/vfPaO63fcxmw2mp5TO09ZZ4knopg20bj/Tsgn9JLZQUNRWexYMWRok c3KkCAfE9CUxX6hKdJC/eiQG0bETqnwXccl6EPE2PhVjr7Wn+/X1Hs+rEVdO6T26jwYm 6RmcXMdVDopTBnDZ46I4kaTCK1/DMRPRnvt1N1XUq6uIgsDQkgJH0EjxqlyBSIaZxwzZ Hm+85m27Cmk6RBzI4f+8nxWx2WFi6p8KJOcf335RkZwrp7BGYS2C3ogbmGdvvMfd4T/m f7BQ== X-Gm-Message-State: ALoCoQnFYg8eaaTWmAfbbsA3T10WbxfAQKu8wuj1sInrBLDGFj85wWivkWrjEqC1rvUyKGs7s26v X-Received: by 10.55.24.18 with SMTP id j18mr27898163qkh.60.1434102224587; Fri, 12 Jun 2015 02:43:44 -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.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Jun 2015 02:43:43 -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 11/20] [SCSI] mpt3sas: Add branding string support for OEM custom HBA Date: Fri, 12 Jun 2015 15:12:23 +0530 Message-Id: <1434102153-38581-12-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 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 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 db362cb..267e489 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -2378,6 +2378,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. @@ -2410,6 +2443,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 c4780c7..7cdbc65 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)