summaryrefslogtreecommitdiff
path: root/drivers/scsi/aacraid
diff options
context:
space:
mode:
authorRaghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>2017-12-26 20:34:33 -0800
committerMartin K. Petersen <martin.petersen@oracle.com>2018-01-03 23:26:42 -0500
commitfc0fdd9abcc60bd207151b2c8a82dc5ee4b45226 (patch)
tree3927b1378d3ad08c7ce389f9da1eda56f4dc9aa7 /drivers/scsi/aacraid
parentb5a475e944447faa6a2110eea0419a7d2a156a0c (diff)
scsi: aacraid: Add target setup helper function
Add helper function to setup targets devices and create the base for the upcoming patches Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/aacraid')
-rw-r--r--drivers/scsi/aacraid/aachba.c18
-rw-r--r--drivers/scsi/aacraid/aacraid.h2
-rw-r--r--drivers/scsi/aacraid/commsup.c2
3 files changed, 15 insertions, 7 deletions
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
index 801aff0ba7ce..5a95883794c1 100644
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -1860,7 +1860,7 @@ update_devtype:
* Execute a CISS REPORT PHYS LUNS and process the results into
* the current hba_map.
*/
-int aac_get_safw_ciss_luns(struct aac_dev *dev, int rescan)
+static int aac_get_safw_ciss_luns(struct aac_dev *dev, int rescan)
{
int rcode = -ENOMEM;
int datasize;
@@ -1898,6 +1898,16 @@ err_out:
return rcode;
}
+static int aac_setup_safw_targets(struct aac_dev *dev, int rescan)
+{
+ return aac_get_safw_ciss_luns(dev, rescan);
+}
+
+int aac_setup_safw_adapter(struct aac_dev *dev, int rescan)
+{
+ return aac_setup_safw_targets(dev, rescan);
+}
+
int aac_get_adapter_info(struct aac_dev* dev)
{
struct fib* fibptr;
@@ -2001,10 +2011,8 @@ 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_get_safw_ciss_luns(dev, AAC_INIT);
- }
+ dev->supplement_adapter_info.virt_device_bus != 0xffff)
+ rcode = aac_setup_safw_adapter(dev, AAC_INIT);
if (!dev->in_reset) {
char buffer[16];
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
index d81d0aac3ad4..569076715070 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_get_safw_ciss_luns(struct aac_dev *dev, int rescan);
+int aac_setup_safw_adapter(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 82ddc7449518..f3077b37bea1 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_get_safw_ciss_luns(dev, AAC_RESCAN);
+ rcode = aac_setup_safw_adapter(dev, AAC_RESCAN);
aac_resolve_luns(dev);