From patchwork Fri Jan 19 12:37:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suganath Prabu S X-Patchwork-Id: 10175177 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E168B60386 for ; Fri, 19 Jan 2018 12:38:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D212928607 for ; Fri, 19 Jan 2018 12:38:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C64112868D; Fri, 19 Jan 2018 12:38:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C2D228607 for ; Fri, 19 Jan 2018 12:38:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754873AbeASMiC (ORCPT ); Fri, 19 Jan 2018 07:38:02 -0500 Received: from mail-qt0-f196.google.com ([209.85.216.196]:36248 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754805AbeASMiB (ORCPT ); Fri, 19 Jan 2018 07:38:01 -0500 Received: by mail-qt0-f196.google.com with SMTP id z11so3397822qtm.3 for ; Fri, 19 Jan 2018 04:38:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZKS3ZAzHpdbhqVvTIarMRS8Nxz7VC6zaTIEqsokKBdI=; b=I+kENUJBNTXfsXv2kHiCN5mhT9yRbIq43tjG40v/KX8b9FLD56JpWuBt/JgO2qZtoj vR8BiK5mUkdY3aVb8fCg51hfhBVYcjMd7i73jgh1PNCBMbaMXni20B1Xu2xNTZLLPoKL evXFfm8+EODbxEZy7ZuOlRpkWyujAiKhgklfw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ZKS3ZAzHpdbhqVvTIarMRS8Nxz7VC6zaTIEqsokKBdI=; b=TlB0JyuUZafIpXkuwOgGuw9e921wG3w0POPfTuJaAbjx+d1s5gwTVBqBknzXrR7nZf MpFRlBcRRPD/hbJb+Ny8S8MeKo/CheQh7HttTf9PUqGJp8wuhUFKqvEDgotRCg6kAJ7G sJyfDkHPfV9B/wzp1MmW+g7khE5Umf798IH3XN+ZCbhhVSTxx/mdgFuL/pWsvvbLSFJV SWB3AEYJc9KVig5No74dqRbmWQPxRzvl7x2Mwcoyn65Dski3p4lM5XGpnoO2bBvVFP+L yeFp7GxLggNghbIjB/LxndXJ3rTcB48qs+6Wnr89fU99gXTqtQcQ7MyTazvaFoHGUcM4 BRwA== X-Gm-Message-State: AKwxytdY4z5RhINZEJZhNfqKvXMNwgh/chQVj7uPV3TAH9st44YcAIJS Rc2PvAUBbivtMNsm/2Hki30B9L+t X-Google-Smtp-Source: ACJfBot+1lnWAGmNMAb3UBgKGV5AUUNIQ2YXZNqBbDbhu56ZxFNoCLlQoa3zZX3t4lQYq9GJJhKr4g== X-Received: by 10.237.46.196 with SMTP id k62mr34386361qtd.213.1516365480730; Fri, 19 Jan 2018 04:38:00 -0800 (PST) Received: from dhcp-135-24-192-103.dhcp.broadcom.net ([192.19.239.250]) by smtp.googlemail.com with ESMTPSA id p40sm6327885qtp.25.2018.01.19.04.37.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Jan 2018 04:38:00 -0800 (PST) From: Suganath Prabu S To: linux-scsi@vger.kernel.org, linux-nvme@lists.infradead.org Cc: Sathya.Prakash@broadcom.com, sreekanth.reddy@broadcom.com, chaitra.basappa@broadcom.com, Suganath Prabu S Subject: [PATCH 1/6] mpt3sas: Add PCI device ID for Andromeda. Date: Fri, 19 Jan 2018 04:37:37 -0800 Message-Id: <1516365462-14708-2-git-send-email-suganath-prabu.subramani@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1516365462-14708-1-git-send-email-suganath-prabu.subramani@broadcom.com> References: <1516365462-14708-1-git-send-email-suganath-prabu.subramani@broadcom.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add device ID and flag for Andromeda/MPI Emdpont. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h | 1 + drivers/scsi/mpt3sas/mpt3sas_base.h | 1 + drivers/scsi/mpt3sas/mpt3sas_scsih.c | 14 ++++++++++++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h b/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h index ee11710..0ad88de 100644 --- a/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h +++ b/drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h @@ -524,6 +524,7 @@ typedef struct _MPI2_CONFIG_REPLY { #define MPI2_MFGPAGE_DEVID_SAS2308_1 (0x0086) #define MPI2_MFGPAGE_DEVID_SAS2308_2 (0x0087) #define MPI2_MFGPAGE_DEVID_SAS2308_3 (0x006E) +#define MPI2_MFGPAGE_DEVID_SAS2308_MPI_EP (0x02B0) /*MPI v2.5 SAS products */ #define MPI25_MFGPAGE_DEVID_SAS3004 (0x0096) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h index 789bc42..897394d 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.h +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h @@ -1336,6 +1336,7 @@ struct MPT3SAS_ADAPTER { u32 ring_buffer_offset; u32 ring_buffer_sz; u8 is_warpdrive; + u8 is_mcpu_endpoint; u8 hide_ir_msg; u8 mfg_pg10_hide_flag; u8 hide_drives; diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index 74fca18..bde3c6f 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -10335,6 +10335,7 @@ _scsih_determine_hba_mpi_version(struct pci_dev *pdev) case MPI2_MFGPAGE_DEVID_SAS2308_1: case MPI2_MFGPAGE_DEVID_SAS2308_2: case MPI2_MFGPAGE_DEVID_SAS2308_3: + case MPI2_MFGPAGE_DEVID_SAS2308_MPI_EP: return MPI2_VERSION; case MPI25_MFGPAGE_DEVID_SAS3004: case MPI25_MFGPAGE_DEVID_SAS3008: @@ -10412,11 +10413,18 @@ _scsih_probe(struct pci_dev *pdev, const struct pci_device_id *id) ioc->hba_mpi_version_belonged = hba_mpi_version; ioc->id = mpt2_ids++; sprintf(ioc->driver_name, "%s", MPT2SAS_DRIVER_NAME); - if (pdev->device == MPI2_MFGPAGE_DEVID_SSS6200) { + switch (pdev->device) { + case MPI2_MFGPAGE_DEVID_SSS6200: ioc->is_warpdrive = 1; ioc->hide_ir_msg = 1; - } else + break; + case MPI2_MFGPAGE_DEVID_SAS2308_MPI_EP: + ioc->is_mcpu_endpoint = 1; + break; + default: ioc->mfg_pg10_hide_flag = MFG_PAGE10_EXPOSE_ALL_DISKS; + break; + } break; case MPI25_VERSION: case MPI26_VERSION: @@ -10845,6 +10853,8 @@ static const struct pci_device_id mpt3sas_pci_table[] = { PCI_ANY_ID, PCI_ANY_ID }, { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2308_3, PCI_ANY_ID, PCI_ANY_ID }, + { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SAS2308_MPI_EP, + PCI_ANY_ID, PCI_ANY_ID }, /* SSS6200 */ { MPI2_MFGPAGE_VENDORID_LSI, MPI2_MFGPAGE_DEVID_SSS6200, PCI_ANY_ID, PCI_ANY_ID },