From: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
To: jejb@linux.vnet.ibm.com, martin.petersen@oracle.com,
linux-scsi@vger.kernel.org
Cc: David.Carroll@microsemi.com, Gana.Sridaran@microsemi.com,
Scott.Benesh@microsemi.com, Prasad.Munirathnam@microsemi.com,
RaghavaAditya.Renukunta@microsemi.com
Subject: [PATCH 18/19] aacraid: Remove reference to Series-9
Date: Sun, 7 May 2017 04:27:03 -0700 [thread overview]
Message-ID: <20170507112704.21940-19-RaghavaAditya.Renukunta@microsemi.com> (raw)
In-Reply-To: <20170507112704.21940-1-RaghavaAditya.Renukunta@microsemi.com>
Removed reference to Series-9 HBA and created arc ctrl check function.
Signed-off-by: Prasad B Munirathnam <prasad.munirathnam@microsemi.com>
Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
---
drivers/scsi/aacraid/aacraid.h | 13 ++++++++++++-
drivers/scsi/aacraid/comminit.c | 18 ++++--------------
drivers/scsi/aacraid/commsup.c | 5 +----
drivers/scsi/aacraid/linit.c | 9 ++-------
4 files changed, 19 insertions(+), 26 deletions(-)
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
index 829f3d8..58ccd2a 100644
--- a/drivers/scsi/aacraid/aacraid.h
+++ b/drivers/scsi/aacraid/aacraid.h
@@ -424,7 +424,6 @@ struct aac_ciss_identify_pd {
#define PMC_DEVICE_S6 0x28b
#define PMC_DEVICE_S7 0x28c
#define PMC_DEVICE_S8 0x28d
-#define PMC_DEVICE_S9 0x28f
#define aac_phys_to_logical(x) ((x)+1)
#define aac_logical_to_phys(x) ((x)?(x)-1:0)
@@ -2684,6 +2683,18 @@ int aac_probe_container(struct aac_dev *dev, int cid);
int _aac_rx_init(struct aac_dev *dev);
int aac_rx_select_comm(struct aac_dev *dev, int comm);
int aac_rx_deliver_producer(struct fib * fib);
+
+static inline int aac_is_src(struct aac_dev *dev)
+{
+ u16 device = dev->pdev->device;
+
+ if (device == PMC_DEVICE_S6 ||
+ device == PMC_DEVICE_S7 ||
+ device == PMC_DEVICE_S8)
+ return 1;
+ return 0;
+}
+
char * get_container_type(unsigned type);
extern int numacb;
extern char aac_driver_version[];
diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c
index 1151505..9ee025b 100644
--- a/drivers/scsi/aacraid/comminit.c
+++ b/drivers/scsi/aacraid/comminit.c
@@ -53,11 +53,8 @@ static inline int aac_is_msix_mode(struct aac_dev *dev)
{
u32 status = 0;
- if (dev->pdev->device == PMC_DEVICE_S6 ||
- dev->pdev->device == PMC_DEVICE_S7 ||
- dev->pdev->device == PMC_DEVICE_S8) {
+ if (aac_is_src(dev))
status = src_readl(dev, MUnit.OMR);
- }
return (status & AAC_INT_MODE_MSIX);
}
@@ -325,9 +322,7 @@ int aac_send_shutdown(struct aac_dev * dev)
/* FIB should be freed only after getting the response from the F/W */
if (status != -ERESTARTSYS)
aac_fib_free(fibctx);
- if ((dev->pdev->device == PMC_DEVICE_S7 ||
- dev->pdev->device == PMC_DEVICE_S8 ||
- dev->pdev->device == PMC_DEVICE_S9) &&
+ if (aac_is_src(dev) &&
dev->msi_enabled)
aac_set_intx_mode(dev);
return status;
@@ -583,9 +578,7 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev)
dev->max_fib_size = status[1] & 0xFFE0;
host->sg_tablesize = status[2] >> 16;
dev->sg_tablesize = status[2] & 0xFFFF;
- if (dev->pdev->device == PMC_DEVICE_S7 ||
- dev->pdev->device == PMC_DEVICE_S8 ||
- dev->pdev->device == PMC_DEVICE_S9) {
+ if (aac_is_src(dev)) {
if (host->can_queue > (status[3] >> 16) -
AAC_NUM_MGT_FIB)
host->can_queue = (status[3] >> 16) -
@@ -604,10 +597,7 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev)
pr_warn("numacb=%d ignored\n", numacb);
}
- if (dev->pdev->device == PMC_DEVICE_S6 ||
- dev->pdev->device == PMC_DEVICE_S7 ||
- dev->pdev->device == PMC_DEVICE_S8 ||
- dev->pdev->device == PMC_DEVICE_S9)
+ if (aac_is_src(dev))
aac_define_int_mode(dev);
/*
* Ok now init the communication subsystem
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c
index a026790..184e9cf 100644
--- a/drivers/scsi/aacraid/commsup.c
+++ b/drivers/scsi/aacraid/commsup.c
@@ -2595,10 +2595,7 @@ void aac_free_irq(struct aac_dev *dev)
int cpu;
cpu = cpumask_first(cpu_online_mask);
- if (dev->pdev->device == PMC_DEVICE_S6 ||
- dev->pdev->device == PMC_DEVICE_S7 ||
- dev->pdev->device == PMC_DEVICE_S8 ||
- dev->pdev->device == PMC_DEVICE_S9) {
+ if (aac_is_src(dev)) {
if (dev->max_msix > 1) {
for (i = 0; i < dev->max_msix; i++)
free_irq(pci_irq_vector(dev->pdev, i),
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index d933d2f..0f277df 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -1416,10 +1416,7 @@ static void __aac_shutdown(struct aac_dev * aac)
kthread_stop(aac->thread);
}
aac_adapter_disable_int(aac);
- if (aac->pdev->device == PMC_DEVICE_S6 ||
- aac->pdev->device == PMC_DEVICE_S7 ||
- aac->pdev->device == PMC_DEVICE_S8 ||
- aac->pdev->device == PMC_DEVICE_S9) {
+ if (aac_is_src(aac)) {
if (aac->max_msix > 1) {
for (i = 0; i < aac->max_msix; i++) {
free_irq(pci_irq_vector(aac->pdev, i),
@@ -1684,9 +1681,7 @@ static int aac_acquire_resources(struct aac_dev *dev)
aac_adapter_enable_int(dev);
- if ((dev->pdev->device == PMC_DEVICE_S7 ||
- dev->pdev->device == PMC_DEVICE_S8 ||
- dev->pdev->device == PMC_DEVICE_S9))
+ if (aac_is_src(dev))
aac_define_int_mode(dev);
if (dev->msi_enabled)
--
2.7.4
next prev parent reply other threads:[~2017-05-07 21:40 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-07 11:26 [PATCH 00/19] aacraid: Patchset with reset rework and misc fixes Raghava Aditya Renukunta
2017-05-07 11:26 ` [PATCH 01/19] aacraid: Remove GFP_DMA for raw srb memory Raghava Aditya Renukunta
2017-05-07 11:26 ` [PATCH 02/19] aacraid: Fix DMAR issues with iommu=pt Raghava Aditya Renukunta
2017-05-07 11:26 ` [PATCH 03/19] aacraid: Added 32 and 64 queue depth for arc natives Raghava Aditya Renukunta
2017-05-07 11:26 ` [PATCH 04/19] aacraid: Set correct Queue Depth for HBA1000 RAW disks Raghava Aditya Renukunta
2017-05-07 11:26 ` [PATCH 05/19] aacraid: Remove reset support from check_health Raghava Aditya Renukunta
2017-05-07 11:26 ` [PATCH 06/19] aacraid: Change wait time for fib completion Raghava Aditya Renukunta
2017-05-07 11:26 ` [PATCH 07/19] aacraid: Log count info of scsi cmds before reset Raghava Aditya Renukunta
2017-05-07 11:26 ` [PATCH 08/19] aacraid: Print ctrl status before eh reset Raghava Aditya Renukunta
2017-05-07 11:26 ` [PATCH 09/19] aacraid: Using single reset mask for IOP reset Raghava Aditya Renukunta
2017-05-07 11:26 ` [PATCH 10/19] aacraid: Rework " Raghava Aditya Renukunta
2017-05-07 11:26 ` [PATCH 11/19] aacraid: Add periodic checks to see IOP reset status Raghava Aditya Renukunta
2017-05-07 11:26 ` [PATCH 12/19] aacraid: Rework SOFT reset code Raghava Aditya Renukunta
2017-05-07 11:26 ` [PATCH 13/19] aacraid: Rework aac_src_restart Raghava Aditya Renukunta
2017-05-07 11:26 ` [PATCH 14/19] aacraid: Use correct function to get ctrl health Raghava Aditya Renukunta
2017-05-07 11:27 ` [PATCH 15/19] aacraid: Make sure ioctl returns on controller reset Raghava Aditya Renukunta
2017-05-07 11:27 ` [PATCH 16/19] aacraid: Enable ctrl reset for both hba and arc Raghava Aditya Renukunta
2017-05-07 11:27 ` [PATCH 17/19] aacraid : Add reset debugging statements Raghava Aditya Renukunta
2017-05-07 11:27 ` Raghava Aditya Renukunta [this message]
2017-05-07 11:27 ` [PATCH 19/19] aacraid: Update driver version to 50834 Raghava Aditya Renukunta
-- strict thread matches above, loose matches on Subject: below --
2017-05-07 13:34 [PATCH 00/19] aacraid: Patchset with reset rework and misc fixes Raghava Aditya Renukunta
2017-05-07 13:34 ` [PATCH 18/19] aacraid: Remove reference to Series-9 Raghava Aditya Renukunta
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=20170507112704.21940-19-RaghavaAditya.Renukunta@microsemi.com \
--to=raghavaaditya.renukunta@microsemi.com \
--cc=David.Carroll@microsemi.com \
--cc=Gana.Sridaran@microsemi.com \
--cc=Prasad.Munirathnam@microsemi.com \
--cc=Scott.Benesh@microsemi.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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