From patchwork Thu Oct 19 09:48:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shivasharan Srikanteshwara X-Patchwork-Id: 10016267 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 7185960215 for ; Thu, 19 Oct 2017 09:50:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 509FF28C6D for ; Thu, 19 Oct 2017 09:50:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 42FCC28CB5; Thu, 19 Oct 2017 09:50:09 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 4D3FB28C6D for ; Thu, 19 Oct 2017 09:50:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752565AbdJSJuG (ORCPT ); Thu, 19 Oct 2017 05:50:06 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:44856 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752212AbdJSJuD (ORCPT ); Thu, 19 Oct 2017 05:50:03 -0400 Received: by mail-pf0-f195.google.com with SMTP id x7so6205014pfa.1 for ; Thu, 19 Oct 2017 02:50:03 -0700 (PDT) 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=zFcbBYvbusbCccFzWXPJ2UKaXuRpLpACQvVFwaCXets=; b=cPeYiA4oQ4e046zPD7UynVtGgiiTrMl3f5KgDihqhQ6bHE5eNx4y/Uamw2N37THJ3q ewWw9ASYk6scyhGZ/KAEEuz8V57NW78qJeI/A+cMVycKa8JyklKZvzAw7FYMe3WaFL74 jJOjHQ6vcCsppZtYb9tiVhZdZFQX28EpLZuxQ= 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=zFcbBYvbusbCccFzWXPJ2UKaXuRpLpACQvVFwaCXets=; b=amueuEigIdWBlrTHHjDAukHc/WnPYvtUttXkvuKLrgSAqJCczVP/3sFlq/vxCVwetW 7sCQvhZ+Bm70nQQE+pmEztzpfTQ+KC/lUr0MJllklTHfkAgwI91dlvYfFdiT8vxYDYo7 RquA8igAx2DAASNTdYIXItE7i8frQt8g90YbWbFLRK7cQ9nnBQCD/7wSttO8YMIUSua8 5nwInYaNUKmjmwRbC3M15H1dAex5v1DhuieSL2eyRypA2o99HbjgiQS1OGWvPSzBLhqD 7h+hzJNjADOrEUtCn2oo84Ift7bf3MCwIjcFcvN1RXPT9DUJ7QwDPenGFWOn7xsO4+yP vlsQ== X-Gm-Message-State: AMCzsaUXBvUgzeFMh/HmDaJXhw9GXN0NGHFtNidsEfz7XUGBJxNP9sba 96H4H8zzMkNJLStHAhBcbSBYYb4K X-Google-Smtp-Source: ABhQp+QfobZQi8pneFS5Dgn6dnYanb/zjSUJG4Px56O/le8vjGz5GHivwO3gmdXHoRX+IUm5BO3YHw== X-Received: by 10.99.63.199 with SMTP id m190mr891384pga.239.1508406602661; Thu, 19 Oct 2017 02:50:02 -0700 (PDT) Received: from dhcp-135-24-192-142.localdomain ([192.19.239.250]) by smtp.gmail.com with ESMTPSA id e84sm27202885pfd.1.2017.10.19.02.50.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Oct 2017 02:50:01 -0700 (PDT) From: Shivasharan S To: linux-scsi@vger.kernel.org Cc: kashyap.desai@broadcom.com, sumit.saxena@broadcom.com, Shivasharan S Subject: [PATCH 02/19] megaraid_sas: Add support for Crusader controllers Date: Thu, 19 Oct 2017 02:48:49 -0700 Message-Id: <1508406546-25944-3-git-send-email-shivasharan.srikanteshwara@broadcom.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1508406546-25944-1-git-send-email-shivasharan.srikanteshwara@broadcom.com> References: <1508406546-25944-1-git-send-email-shivasharan.srikanteshwara@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 support for PCI VID/DID 0x1000/0x0015 based MegaRAID controllers. Since the DID 0x0015 conflicts with DELL PERC5 controllers, add vendor ID based check specific for DELL PERC5. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h | 1 + drivers/scsi/megaraid/megaraid_sas_base.c | 51 ++++++++++++++++++------------- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index 90b9b5d7f0f8..3f20273b115b 100644 --- a/drivers/scsi/megaraid/megaraid_sas.h +++ b/drivers/scsi/megaraid/megaraid_sas.h @@ -57,6 +57,7 @@ #define PCI_DEVICE_ID_LSI_CUTLASS_52 0x0052 #define PCI_DEVICE_ID_LSI_CUTLASS_53 0x0053 #define PCI_DEVICE_ID_LSI_VENTURA 0x0014 +#define PCI_DEVICE_ID_LSI_CRUSADER 0x0015 #define PCI_DEVICE_ID_LSI_HARPOON 0x0016 #define PCI_DEVICE_ID_LSI_TOMCAT 0x0017 #define PCI_DEVICE_ID_LSI_VENTURA_4PORT 0x001B diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 2f9955c6c2af..eba627ccd041 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -161,6 +161,7 @@ static struct pci_device_id megasas_pci_table[] = { {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_CUTLASS_53)}, /* VENTURA */ {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_VENTURA)}, + {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_CRUSADER)}, {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_HARPOON)}, {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_TOMCAT)}, {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_VENTURA_4PORT)}, @@ -5980,29 +5981,35 @@ megasas_set_dma_mask(struct pci_dev *pdev) */ static inline void megasas_set_adapter_type(struct megasas_instance *instance) { - switch (instance->pdev->device) { - case PCI_DEVICE_ID_LSI_VENTURA: - case PCI_DEVICE_ID_LSI_HARPOON: - case PCI_DEVICE_ID_LSI_TOMCAT: - case PCI_DEVICE_ID_LSI_VENTURA_4PORT: - case PCI_DEVICE_ID_LSI_CRUSADER_4PORT: - instance->adapter_type = VENTURA_SERIES; - break; - case PCI_DEVICE_ID_LSI_FUSION: - case PCI_DEVICE_ID_LSI_PLASMA: - instance->adapter_type = THUNDERBOLT_SERIES; - break; - case PCI_DEVICE_ID_LSI_INVADER: - case PCI_DEVICE_ID_LSI_INTRUDER: - case PCI_DEVICE_ID_LSI_INTRUDER_24: - case PCI_DEVICE_ID_LSI_CUTLASS_52: - case PCI_DEVICE_ID_LSI_CUTLASS_53: - case PCI_DEVICE_ID_LSI_FURY: - instance->adapter_type = INVADER_SERIES; - break; - default: /* For all other supported controllers */ + if ((instance->pdev->vendor == PCI_VENDOR_ID_DELL) && + (instance->pdev->device == PCI_DEVICE_ID_DELL_PERC5)) { instance->adapter_type = MFI_SERIES; - break; + } else { + switch (instance->pdev->device) { + case PCI_DEVICE_ID_LSI_VENTURA: + case PCI_DEVICE_ID_LSI_CRUSADER: + case PCI_DEVICE_ID_LSI_HARPOON: + case PCI_DEVICE_ID_LSI_TOMCAT: + case PCI_DEVICE_ID_LSI_VENTURA_4PORT: + case PCI_DEVICE_ID_LSI_CRUSADER_4PORT: + instance->adapter_type = VENTURA_SERIES; + break; + case PCI_DEVICE_ID_LSI_FUSION: + case PCI_DEVICE_ID_LSI_PLASMA: + instance->adapter_type = THUNDERBOLT_SERIES; + break; + case PCI_DEVICE_ID_LSI_INVADER: + case PCI_DEVICE_ID_LSI_INTRUDER: + case PCI_DEVICE_ID_LSI_INTRUDER_24: + case PCI_DEVICE_ID_LSI_CUTLASS_52: + case PCI_DEVICE_ID_LSI_CUTLASS_53: + case PCI_DEVICE_ID_LSI_FURY: + instance->adapter_type = INVADER_SERIES; + break; + default: /* For all other supported controllers */ + instance->adapter_type = MFI_SERIES; + break; + } } }