scsi: aacraid: Refactor and rename to make mirror existing changes
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> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
5480aa1837
commit
b5a475e944
|
@ -1753,17 +1753,18 @@ fib_error:
|
||||||
return rcode;
|
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;
|
int rcode = -ENOMEM;
|
||||||
u16 datasize;
|
int datasize;
|
||||||
struct aac_srb_unit srbu;
|
struct aac_srb_unit srbu;
|
||||||
struct aac_srb *srbcmd;
|
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);
|
datasize = sizeof(struct aac_ciss_identify_pd);
|
||||||
identify_resp = kmalloc(datasize, GFP_KERNEL);
|
identify_reply = kmalloc(datasize, GFP_KERNEL);
|
||||||
if (!identify_resp)
|
if (!identify_reply)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
memset(&srbu, 0, sizeof(struct aac_srb_unit));
|
memset(&srbu, 0, sizeof(struct aac_srb_unit));
|
||||||
|
@ -1774,30 +1775,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[2] = (u8)((AAC_MAX_LUN + target) & 0x00FF);
|
||||||
srbcmd->cdb[6] = CISS_IDENTIFY_PHYSICAL_DEVICE;
|
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))
|
if (unlikely(rcode < 0))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (identify_resp->current_queue_depth_limit <= 0 ||
|
if (identify_reply->current_queue_depth_limit <= 0 ||
|
||||||
identify_resp->current_queue_depth_limit > 32)
|
identify_reply->current_queue_depth_limit > 32)
|
||||||
dev->hba_map[bus][target].qd_limit = 32;
|
dev->hba_map[bus][target].qd_limit = 32;
|
||||||
else
|
else
|
||||||
dev->hba_map[bus][target].qd_limit =
|
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:
|
out:
|
||||||
return rcode;
|
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
|
* @dev: aac_dev structure
|
||||||
* @phys_luns: FW information from report phys luns
|
* @phys_luns: FW information from report phys luns
|
||||||
|
* @rescan: Indicates scan type
|
||||||
*
|
*
|
||||||
* Update our hba map with the information gathered from the FW
|
* 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)
|
struct aac_ciss_phys_luns_resp *phys_luns, int rescan)
|
||||||
{
|
{
|
||||||
/* ok and extended reporting */
|
/* ok and extended reporting */
|
||||||
|
@ -1839,7 +1841,7 @@ void aac_update_hba_map(struct aac_dev *dev,
|
||||||
if (devtype != AAC_DEVTYPE_NATIVE_RAW)
|
if (devtype != AAC_DEVTYPE_NATIVE_RAW)
|
||||||
goto update_devtype;
|
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;
|
dev->hba_map[bus][target].qd_limit = 32;
|
||||||
|
|
||||||
update_devtype:
|
update_devtype:
|
||||||
|
@ -1851,14 +1853,14 @@ update_devtype:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* aac_report_phys_luns() Process topology change
|
* aac_get_safw_ciss_luns() Process topology change
|
||||||
* @dev: aac_dev structure
|
* @dev: aac_dev structure
|
||||||
* @rescan: Indicates rescan
|
* @rescan: Indicates rescan
|
||||||
*
|
*
|
||||||
* 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_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 rcode = -ENOMEM;
|
||||||
int datasize;
|
int datasize;
|
||||||
|
@ -1888,7 +1890,7 @@ int aac_report_phys_luns(struct aac_dev *dev, int rescan)
|
||||||
/* analyse data */
|
/* analyse data */
|
||||||
if (rcode >= 0 && phys_luns->resp_flag == 2) {
|
if (rcode >= 0 && phys_luns->resp_flag == 2) {
|
||||||
/* ok and extended reporting */
|
/* 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);
|
kfree(phys_luns);
|
||||||
|
@ -2001,7 +2003,7 @@ 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 */
|
/* 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) {
|
if (!dev->in_reset) {
|
||||||
|
|
|
@ -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_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 *);
|
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)
|
||||||
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_report_phys_luns(dev, AAC_RESCAN);
|
rcode = aac_get_safw_ciss_luns(dev, AAC_RESCAN);
|
||||||
|
|
||||||
aac_resolve_luns(dev);
|
aac_resolve_luns(dev);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue