From: Sasikumar Chandrasekaran <sasikumar.pc@broadcom.com>
To: jejb@kernel.org, hch@infradead.org
Cc: linux-scsi@vger.kernel.org, Sathya.Prakash@broadcom.com,
linux-kernel@vger.kernel.org, christopher.owens@broadcom.com,
kiran-kumar.kasturi@broadcom.com, thenzl@redhat.com,
sasikumar.pc@broadcom.com
Subject: [PATCH V4 01/11] megaraid_sas: Add new pci device Ids for SAS3.5 Generic Megaraid Controllers
Date: Tue, 6 Dec 2016 18:00:10 -0500 [thread overview]
Message-ID: <1481065220-18431-2-git-send-email-sasikumar.pc@broadcom.com> (raw)
In-Reply-To: <1481065220-18431-1-git-send-email-sasikumar.pc@broadcom.com>
This patch contains new pci device ids for SAS3.5 Generic Megaraid Controllers
V4: Removed the not supported PCI Device Ids
Signed-off-by: Sasikumar Chandrasekaran <sasikumar.pc@broadcom.com>
---
drivers/scsi/megaraid/megaraid_sas.h | 8 +++++++-
drivers/scsi/megaraid/megaraid_sas_base.c | 14 +++++++++++++-
drivers/scsi/megaraid/megaraid_sas_fusion.c | 30 ++++++++++++++++++++++-------
3 files changed, 43 insertions(+), 9 deletions(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index 0d2625b..72e16c2 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -56,6 +56,11 @@
#define PCI_DEVICE_ID_LSI_INTRUDER_24 0x00cf
#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_HARPOON 0x0016
+#define PCI_DEVICE_ID_LSI_TOMCAT 0x0017
+#define PCI_DEVICE_ID_LSI_VENTURA_4PORT 0x001B
+#define PCI_DEVICE_ID_LSI_CRUSADER_4PORT 0x001C
/*
* Intel HBA SSDIDs
@@ -1478,7 +1483,7 @@ struct megasas_register_set {
u32 inbound_high_queue_port ; /*00C4h*/
- u32 reserved_5; /*00C8h*/
+ u32 inbound_single_queue_port; /*00C8h*/
u32 res_6[11]; /*CCh*/
u32 host_diag;
u32 seq_offset;
@@ -2143,6 +2148,7 @@ struct megasas_instance {
u8 is_rdpq;
bool dev_handle;
bool fw_sync_cache_support;
+ bool is_ventura;
};
struct MR_LD_VF_MAP {
u32 size;
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 5462676..efccf98 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -155,6 +155,12 @@ static int megasas_register_aen(struct megasas_instance *instance,
/* Intruder 24 port*/
{PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_CUTLASS_52)},
{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_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)},
+ {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_CRUSADER_4PORT)},
{}
};
@@ -5723,6 +5729,12 @@ static int megasas_probe_one(struct pci_dev *pdev,
instance->pdev = pdev;
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->is_ventura = true;
case PCI_DEVICE_ID_LSI_FUSION:
case PCI_DEVICE_ID_LSI_PLASMA:
case PCI_DEVICE_ID_LSI_INVADER:
@@ -5747,7 +5759,7 @@ static int megasas_probe_one(struct pci_dev *pdev,
if ((instance->pdev->device == PCI_DEVICE_ID_LSI_FUSION) ||
(instance->pdev->device == PCI_DEVICE_ID_LSI_PLASMA))
fusion->adapter_type = THUNDERBOLT_SERIES;
- else
+ else if (!instance->is_ventura)
fusion->adapter_type = INVADER_SERIES;
}
break;
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 24778ba..8d7a397 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -189,15 +189,29 @@ inline void megasas_return_cmd_fusion(struct megasas_instance *instance,
*/
static void
megasas_fire_cmd_fusion(struct megasas_instance *instance,
- union MEGASAS_REQUEST_DESCRIPTOR_UNION *req_desc)
+ union MEGASAS_REQUEST_DESCRIPTOR_UNION *req_desc, bool is_32bit)
{
+ struct megasas_register_set __iomem *regs = instance->reg_set;
+ unsigned long flags;
+
+ if (is_32bit)
+ writel(le32_to_cpu(req_desc->u.low),
+ &(regs)->inbound_single_queue_port);
+ else if (instance->is_ventura) {
+ spin_lock_irqsave(&instance->hba_lock, flags);
+ writel(le32_to_cpu(req_desc->u.low),
+ &(regs)->inbound_low_queue_port);
+ writel(le32_to_cpu(req_desc->u.high),
+ &(regs)->inbound_high_queue_port);
+ mmiowb();
+ spin_unlock_irqrestore(&instance->hba_lock, flags);
+ } else {
#if defined(writeq) && defined(CONFIG_64BIT)
u64 req_data = (((u64)le32_to_cpu(req_desc->u.high) << 32) |
le32_to_cpu(req_desc->u.low));
writeq(req_data, &instance->reg_set->inbound_low_queue_port);
#else
- unsigned long flags;
spin_lock_irqsave(&instance->hba_lock, flags);
writel(le32_to_cpu(req_desc->u.low),
@@ -207,6 +221,7 @@ inline void megasas_return_cmd_fusion(struct megasas_instance *instance,
mmiowb();
spin_unlock_irqrestore(&instance->hba_lock, flags);
#endif
+ }
}
/**
@@ -850,7 +865,7 @@ static int megasas_create_sg_sense_fusion(struct megasas_instance *instance)
break;
}
- megasas_fire_cmd_fusion(instance, &req_desc);
+ megasas_fire_cmd_fusion(instance, &req_desc, false);
wait_and_poll(instance, cmd, MFI_POLL_TIMEOUT_SECS);
@@ -2224,7 +2239,7 @@ static void megasas_build_ld_nonrw_fusion(struct megasas_instance *instance,
*/
atomic_inc(&instance->fw_outstanding);
- megasas_fire_cmd_fusion(instance, req_desc);
+ megasas_fire_cmd_fusion(instance, req_desc, instance->is_ventura);
return 0;
}
@@ -2595,7 +2610,7 @@ irqreturn_t megasas_isr_fusion(int irq, void *devp)
return DCMD_NOT_FIRED;
}
- megasas_fire_cmd_fusion(instance, req_desc);
+ megasas_fire_cmd_fusion(instance, req_desc, instance->is_ventura);
return DCMD_SUCCESS;
}
@@ -2888,7 +2903,8 @@ void megasas_refire_mgmt_cmd(struct megasas_instance *instance)
cpu_to_le32(MR_DCMD_SYSTEM_PD_MAP_GET_INFO)))
&& !(cmd_mfi->flags & DRV_DCMD_SKIP_REFIRE);
if (refire_cmd)
- megasas_fire_cmd_fusion(instance, req_desc);
+ megasas_fire_cmd_fusion(instance, req_desc,
+ instance->is_ventura);
else
megasas_return_cmd(instance, cmd_mfi);
}
@@ -3067,7 +3083,7 @@ static int megasas_track_scsiio(struct megasas_instance *instance,
mr_request->tmReqFlags.isTMForLD = 1;
init_completion(&cmd_fusion->done);
- megasas_fire_cmd_fusion(instance, req_desc);
+ megasas_fire_cmd_fusion(instance, req_desc, instance->is_ventura);
timeleft = wait_for_completion_timeout(&cmd_fusion->done, 50 * HZ);
--
1.8.3.1
next prev parent reply other threads:[~2016-12-06 23:00 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 23:00 [PATCH V4 00/11] megaraid_sas: Updates for scsi-next Sasikumar Chandrasekaran
2016-12-06 23:00 ` Sasikumar Chandrasekaran [this message]
2016-12-08 15:17 ` [PATCH V4 01/11] megaraid_sas: Add new pci device Ids for SAS3.5 Generic Megaraid Controllers Tomas Henzl
2016-12-06 23:00 ` [PATCH V4 02/11] megaraid_sas: 128 MSIX Support Sasikumar Chandrasekaran
2016-12-08 15:34 ` Tomas Henzl
2016-12-14 21:43 ` Sasikumar PC
2016-12-20 1:50 ` Sasikumar PC
2016-12-20 14:16 ` Tomas Henzl
2016-12-06 23:00 ` [PATCH V4 03/11] megaraid_sas: EEDP Escape Mode Support for SAS3.5 Generic Megaraid Controllers Sasikumar Chandrasekaran
2016-12-08 15:35 ` Tomas Henzl
2016-12-06 23:00 ` [PATCH V4 04/11] megaraid_sas: SAS3.5 Generic Megaraid Controllers Stream Detection and IO Coalescing Sasikumar Chandrasekaran
2016-12-08 16:00 ` Tomas Henzl
2016-12-12 16:38 ` Tomas Henzl
2016-12-14 22:07 ` Sasikumar PC
2016-12-06 23:00 ` [PATCH V4 05/11] megaraid_sas: SAS3.5 Generic Megaraid Controllers Fast Path for RAID 1/10 Writes Sasikumar Chandrasekaran
2016-12-09 10:54 ` Tomas Henzl
2016-12-06 23:00 ` [PATCH V4 06/11] megaraid_sas: Dynamic Raid Map Changes for SAS3.5 Generic Megaraid Controllers Sasikumar Chandrasekaran
2016-12-09 12:55 ` Tomas Henzl
2016-12-14 21:49 ` Sasikumar PC
2016-12-20 1:51 ` Sasikumar PC
2016-12-20 14:20 ` Tomas Henzl
2016-12-20 14:22 ` Sasikumar PC
2016-12-06 23:00 ` [PATCH V4 07/11] megaraid_sas: Add the Support for SAS3.5 Generic Megaraid Controllers Capabilities Sasikumar Chandrasekaran
2016-12-09 13:05 ` Tomas Henzl
2016-12-09 13:13 ` Tomas Henzl
2016-12-14 21:52 ` Sasikumar PC
2016-12-06 23:00 ` [PATCH V4 08/11] megaraid_sas: Enable or Disable Fast path based on the PCI Threshold Bandwidth Sasikumar Chandrasekaran
2016-12-09 13:58 ` Tomas Henzl
2016-12-14 21:54 ` Sasikumar PC
2016-12-15 15:10 ` Tomas Henzl
2016-12-20 1:51 ` Sasikumar PC
2016-12-20 15:12 ` Tomas Henzl
2016-12-06 23:00 ` [PATCH V4 09/11] megaraid_sas: ldio_outstanding variable is not decremented in completion path Sasikumar Chandrasekaran
2016-12-09 14:01 ` Tomas Henzl
2016-12-06 23:00 ` [PATCH V4 10/11] megaraid_sas: Implement the PD Map support for SAS3.5 Generic Megaraid Controllers Sasikumar Chandrasekaran
2016-12-09 14:07 ` Tomas Henzl
2016-12-06 23:00 ` [PATCH V4 11/11] megaraid_sas: driver version upgrade Sasikumar Chandrasekaran
2016-12-09 14:07 ` Tomas Henzl
2016-12-07 7:31 ` [PATCH V4 00/11] megaraid_sas: Updates for scsi-next Christoph Hellwig
2016-12-11 14:04 ` Sasikumar PC
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1481065220-18431-2-git-send-email-sasikumar.pc@broadcom.com \
--to=sasikumar.pc@broadcom.com \
--cc=Sathya.Prakash@broadcom.com \
--cc=christopher.owens@broadcom.com \
--cc=hch@infradead.org \
--cc=jejb@kernel.org \
--cc=kiran-kumar.kasturi@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=thenzl@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).