From: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
To: jejb@linux.vnet.ibm.com, martin.petersen@oracle.com,
linux-scsi@vger.kernel.org
Cc: Scott.Benesh@microsemi.com, aacraid@microsemi.com,
tom.white@microsemi.com,
"Guilherme G . Piccoli" <gpiccoli@linux.vnet.ibm.com>
Subject: [PATCH 11/29] scsi: aacraid: Refactor and rename to make mirror existing changes
Date: Thu, 21 Dec 2017 09:34:02 -0800 [thread overview]
Message-ID: <20171221173420.8213-12-RaghavaAditya.Renukunta@microsemi.com> (raw)
In-Reply-To: <20171221173420.8213-1-RaghavaAditya.Renukunta@microsemi.com>
Rename variables and functions to make bmic identify, report phy luns
to make them consistent across code internal existing code bases
Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
---
drivers/scsi/aacraid/aachba.c | 36 +++++++++++++++++++-----------------
drivers/scsi/aacraid/aacraid.h | 2 +-
drivers/scsi/aacraid/commsup.c | 2 +-
3 files changed, 21 insertions(+), 19 deletions(-)
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
index 8fb0da7..d6b626d 100644
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -1756,17 +1756,18 @@ static int aac_send_safw_bmic_cmd(struct aac_dev *dev,
return rcode;
}
-static int aac_issue_bmic_identify(struct aac_dev *dev, u32 bus, u32 target)
+static int aac_issue_safw_bmic_identify(struct aac_dev *dev,
+ u32 bus, u32 target)
{
int rcode = -ENOMEM;
- u16 datasize;
+ int datasize;
struct aac_srb_unit srbu;
struct aac_srb *srbcmd;
- struct aac_ciss_identify_pd *identify_resp;
+ struct aac_ciss_identify_pd *identify_reply;
datasize = sizeof(struct aac_ciss_identify_pd);
- identify_resp = kmalloc(datasize, GFP_KERNEL);
- if (!identify_resp)
+ identify_reply = kmalloc(datasize, GFP_KERNEL);
+ if (!identify_reply)
goto out;
memset(&srbu, 0, sizeof(struct aac_srb_unit));
@@ -1777,30 +1778,31 @@ static int aac_issue_bmic_identify(struct aac_dev *dev, u32 bus, u32 target)
srbcmd->cdb[2] = (u8)((AAC_MAX_LUN + target) & 0x00FF);
srbcmd->cdb[6] = CISS_IDENTIFY_PHYSICAL_DEVICE;
- rcode = aac_send_safw_bmic_cmd(dev, &srbu, identify_resp, datasize);
+ rcode = aac_send_safw_bmic_cmd(dev, &srbu, identify_reply, datasize);
if (unlikely(rcode < 0))
goto out;
- if (identify_resp->current_queue_depth_limit <= 0 ||
- identify_resp->current_queue_depth_limit > 32)
+ if (identify_reply->current_queue_depth_limit <= 0 ||
+ identify_reply->current_queue_depth_limit > 32)
dev->hba_map[bus][target].qd_limit = 32;
else
dev->hba_map[bus][target].qd_limit =
- identify_resp->current_queue_depth_limit;
+ identify_reply->current_queue_depth_limit;
- kfree(identify_resp);
+ kfree(identify_reply);
out:
return rcode;
}
/**
- * aac_update hba_map()- update current hba map with data from FW
+ * aac_set_safw_attr_all_targets- update current hba map with data from FW
* @dev: aac_dev structure
* @phys_luns: FW information from report phys luns
+ * @rescan: Indicates scan type
*
* Update our hba map with the information gathered from the FW
*/
-void aac_update_hba_map(struct aac_dev *dev,
+static void aac_set_safw_attr_all_targets(struct aac_dev *dev,
struct aac_ciss_phys_luns_resp *phys_luns, int rescan)
{
/* ok and extended reporting */
@@ -1842,7 +1844,7 @@ void aac_update_hba_map(struct aac_dev *dev,
if (devtype != AAC_DEVTYPE_NATIVE_RAW)
goto update_devtype;
- if (aac_issue_bmic_identify(dev, bus, target) < 0)
+ if (aac_issue_safw_bmic_identify(dev, bus, target) < 0)
dev->hba_map[bus][target].qd_limit = 32;
update_devtype:
@@ -1854,14 +1856,14 @@ void aac_update_hba_map(struct aac_dev *dev,
}
/**
- * aac_report_phys_luns() Process topology change
+ * aac_get_safw_ciss_luns() Process topology change
* @dev: aac_dev structure
* @rescan Indicates rescan
*
* Execute a CISS REPORT PHYS LUNS and process the results into
* the current hba_map.
*/
-int aac_report_phys_luns(struct aac_dev *dev, int rescan)
+int aac_get_safw_ciss_luns(struct aac_dev *dev, int rescan)
{
int rcode = -ENOMEM;
int datasize;
@@ -1891,7 +1893,7 @@ int aac_report_phys_luns(struct aac_dev *dev, int rescan)
/* analyse data */
if (rcode >= 0 && phys_luns->resp_flag == 2) {
/* ok and extended reporting */
- aac_update_hba_map(dev, phys_luns, rescan);
+ aac_set_safw_attr_all_targets(dev, phys_luns, rescan);
}
kfree(phys_luns);
@@ -2004,7 +2006,7 @@ int aac_get_adapter_info(struct aac_dev* dev)
if (!dev->sync_mode && dev->sa_firmware &&
dev->supplement_adapter_info.virt_device_bus != 0xffff) {
/* Thor SA Firmware -> CISS_REPORT_PHYSICAL_LUNS */
- rcode = aac_report_phys_luns(dev, AAC_INIT);
+ rcode = aac_get_safw_ciss_luns(dev, AAC_INIT);
}
if (!dev->in_reset) {
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
index 3a20168..d81d0aa 100644
--- a/drivers/scsi/aacraid/aacraid.h
+++ b/drivers/scsi/aacraid/aacraid.h
@@ -2639,7 +2639,7 @@ static inline int aac_adapter_check_health(struct aac_dev *dev)
int aac_acquire_irq(struct aac_dev *dev);
void aac_free_irq(struct aac_dev *dev);
-int aac_report_phys_luns(struct aac_dev *dev, int rescan);
+int aac_get_safw_ciss_luns(struct aac_dev *dev, int rescan);
const char *aac_driverinfo(struct Scsi_Host *);
void aac_fib_vector_assign(struct aac_dev *dev);
struct fib *aac_fib_alloc(struct aac_dev *dev);
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c
index f70f112..82ddc74 100644
--- a/drivers/scsi/aacraid/commsup.c
+++ b/drivers/scsi/aacraid/commsup.c
@@ -1945,7 +1945,7 @@ static void aac_handle_sa_aif(struct aac_dev *dev, struct fib *fibptr)
for (target = 0; target < AAC_MAX_TARGETS; target++)
dev->hba_map[bus][target].new_devtype = 0;
- rcode = aac_report_phys_luns(dev, AAC_RESCAN);
+ rcode = aac_get_safw_ciss_luns(dev, AAC_RESCAN);
aac_resolve_luns(dev);
--
2.9.4
next prev parent reply other threads:[~2017-12-21 17:34 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-21 17:33 [PATCH 00/28] aacraid: Refactor for sas transport and bug fixes Raghava Aditya Renukunta
2017-12-21 17:33 ` [PATCH 01/29] scsi: aacraid: Fix udev inquiry race condition Raghava Aditya Renukunta
2017-12-21 17:54 ` Bart Van Assche
2017-12-27 1:22 ` Raghava Aditya Renukunta
2017-12-21 17:33 ` [PATCH 02/29] scsi: aacraid: Do not attempt abort when Fw panicked Raghava Aditya Renukunta
2017-12-21 17:33 ` [PATCH 03/29] scsi: aacraid: Fix hang in kdump Raghava Aditya Renukunta
2017-12-21 19:15 ` Guilherme G. Piccoli
2017-12-22 15:13 ` Guilherme G. Piccoli
2017-12-27 1:28 ` Raghava Aditya Renukunta
2017-12-21 17:33 ` [PATCH 04/29] scsi: aacraid: Do not remove offlined devices Raghava Aditya Renukunta
2017-12-21 17:33 ` [PATCH 05/29] scsi: aacraid: Fix ioctl reset hang Raghava Aditya Renukunta
2017-12-21 17:33 ` [PATCH 06/29] scsi: aacraid: Allow reset_host sysfs var to recover Panicked Fw Raghava Aditya Renukunta
2017-12-21 17:33 ` [PATCH 07/29] scsi: aacraid: Refactor reset_host store function Raghava Aditya Renukunta
2017-12-21 17:33 ` [PATCH 08/29] scsi: aacraid: Move code to wait for IO completion to shutdown func Raghava Aditya Renukunta
2017-12-21 17:59 ` Bart Van Assche
2017-12-22 16:26 ` Bart Van Assche
2017-12-27 1:38 ` Raghava Aditya Renukunta
2017-12-21 17:34 ` [PATCH 09/29] scsi: aacraid: Create bmic submission function from bmic identify Raghava Aditya Renukunta
2017-12-21 17:34 ` [PATCH 10/29] scsi: aacraid: Change phy luns function to use common bmic function Raghava Aditya Renukunta
2017-12-21 17:34 ` Raghava Aditya Renukunta [this message]
2017-12-21 17:34 ` [PATCH 12/29] scsi: aacraid: Add target setup helper function Raghava Aditya Renukunta
2017-12-21 17:34 ` [PATCH 13/29] scsi: aacraid: Untangle targets setup from report phy luns Raghava Aditya Renukunta
2017-12-21 17:34 ` [PATCH 14/29] scsi: aacraid: Move function around to match existing code Raghava Aditya Renukunta
2017-12-21 18:39 ` Bart Van Assche
2017-12-27 1:23 ` Raghava Aditya Renukunta
2017-12-21 17:34 ` [PATCH 15/29] scsi: aacraid: Create helper functions to get lun info Raghava Aditya Renukunta
2017-12-21 18:40 ` Bart Van Assche
2017-12-27 1:24 ` Raghava Aditya Renukunta
2017-12-21 17:34 ` [PATCH 16/29] scsi: aacraid: Save bmic phy information for each phy Raghava Aditya Renukunta
2017-12-21 17:34 ` [PATCH 17/29] scsi: aacraid: Add helper function to set queue depth Raghava Aditya Renukunta
2017-12-21 17:34 ` [PATCH 18/29] scsi: aacraid: Merge func to get container information Raghava Aditya Renukunta
2017-12-21 17:34 ` [PATCH 19/29] scsi: aacraid: Process hba and container hot plug events in single function Raghava Aditya Renukunta
2017-12-21 17:34 ` [PATCH 20/29] scsi: aacraid: Added macros to help loop through known buses and targets Raghava Aditya Renukunta
2017-12-21 17:34 ` [PATCH 21/29] scsi: aacraid: Refactor resolve luns code and scsi functions Raghava Aditya Renukunta
2017-12-21 18:42 ` Bart Van Assche
2017-12-27 1:25 ` Raghava Aditya Renukunta
2017-12-21 17:34 ` [PATCH 22/29] scsi: aacraid: Merge adapter setup with resolve luns Raghava Aditya Renukunta
2017-12-21 17:34 ` [PATCH 23/29] scsi: aacraid: Block concurrent hotplug event handling Raghava Aditya Renukunta
2017-12-21 17:34 ` [PATCH 24/29] scsi: aacraid: Use hotplug handling function in place of scsi_scan_host Raghava Aditya Renukunta
2017-12-21 17:34 ` [PATCH 25/29] scsi: aacraid: Reschedule host scan in case of failure Raghava Aditya Renukunta
2017-12-21 18:44 ` Bart Van Assche
2017-12-27 1:25 ` Raghava Aditya Renukunta
2017-12-21 17:34 ` [PATCH 26/29] scsi: aacraid: Fix hang while scanning in eh recovery Raghava Aditya Renukunta
2017-12-21 17:34 ` [PATCH 27/29] scsi: aacraid: Skip schedule rescan in case of kdump Raghava Aditya Renukunta
2017-12-21 17:34 ` [PATCH 28/29] scsi: aacraid: Remove unused rescan variable Raghava Aditya Renukunta
2017-12-21 17:34 ` [PATCH 29/29] scsi: aacraid: Remove AAC_HIDE_DISK check in queue command Raghava Aditya Renukunta
2017-12-22 15:06 ` [PATCH 00/28] aacraid: Refactor for sas transport and bug fixes Guilherme G. Piccoli
2017-12-27 1:27 ` Raghava Aditya Renukunta
2017-12-27 12:24 ` Guilherme G. Piccoli
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=20171221173420.8213-12-RaghavaAditya.Renukunta@microsemi.com \
--to=raghavaaditya.renukunta@microsemi.com \
--cc=Scott.Benesh@microsemi.com \
--cc=aacraid@microsemi.com \
--cc=gpiccoli@linux.vnet.ibm.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=tom.white@microsemi.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