提交 fc0fdd9a 编写于 作者: R Raghava Aditya Renukunta 提交者: Martin K. Petersen

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: NRaghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 b5a475e9
...@@ -1860,7 +1860,7 @@ static void aac_set_safw_attr_all_targets(struct aac_dev *dev, ...@@ -1860,7 +1860,7 @@ static void aac_set_safw_attr_all_targets(struct aac_dev *dev,
* Execute a CISS REPORT PHYS LUNS and process the results into * Execute a CISS REPORT PHYS LUNS and process the results into
* the current hba_map. * 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 rcode = -ENOMEM;
int datasize; int datasize;
...@@ -1898,6 +1898,16 @@ int aac_get_safw_ciss_luns(struct aac_dev *dev, int rescan) ...@@ -1898,6 +1898,16 @@ int aac_get_safw_ciss_luns(struct aac_dev *dev, int rescan)
return rcode; 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) int aac_get_adapter_info(struct aac_dev* dev)
{ {
struct fib* fibptr; struct fib* fibptr;
...@@ -2001,10 +2011,8 @@ int aac_get_adapter_info(struct aac_dev* dev) ...@@ -2001,10 +2011,8 @@ int aac_get_adapter_info(struct aac_dev* dev)
} }
if (!dev->sync_mode && dev->sa_firmware && if (!dev->sync_mode && dev->sa_firmware &&
dev->supplement_adapter_info.virt_device_bus != 0xffff) { dev->supplement_adapter_info.virt_device_bus != 0xffff)
/* Thor SA Firmware -> CISS_REPORT_PHYSICAL_LUNS */ rcode = aac_setup_safw_adapter(dev, AAC_INIT);
rcode = aac_get_safw_ciss_luns(dev, AAC_INIT);
}
if (!dev->in_reset) { if (!dev->in_reset) {
char buffer[16]; char buffer[16];
......
...@@ -2639,7 +2639,7 @@ static inline int aac_adapter_check_health(struct aac_dev *dev) ...@@ -2639,7 +2639,7 @@ static inline int aac_adapter_check_health(struct aac_dev *dev)
int aac_acquire_irq(struct aac_dev *dev); int aac_acquire_irq(struct aac_dev *dev);
void aac_free_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 *); const char *aac_driverinfo(struct Scsi_Host *);
void aac_fib_vector_assign(struct aac_dev *dev); void aac_fib_vector_assign(struct aac_dev *dev);
struct fib *aac_fib_alloc(struct aac_dev *dev); struct fib *aac_fib_alloc(struct aac_dev *dev);
......
...@@ -1945,7 +1945,7 @@ static void aac_handle_sa_aif(struct aac_dev *dev, struct fib *fibptr) ...@@ -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++) for (target = 0; target < AAC_MAX_TARGETS; target++)
dev->hba_map[bus][target].new_devtype = 0; 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); aac_resolve_luns(dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册