提交 bfb35aa8 编写于 作者: M Mark Haverkamp 提交者:

[SCSI] aacraid: Update global function names

Received from Mark Salyzyn,

Reduce the possibility of namespace collision.  Prefix with aac_.
Signed-off-by: NMark Haverkamp <markh@osdl.org>
Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
上级 d8a57113
...@@ -173,10 +173,10 @@ int aac_get_config_status(struct aac_dev *dev) ...@@ -173,10 +173,10 @@ int aac_get_config_status(struct aac_dev *dev)
int status = 0; int status = 0;
struct fib * fibptr; struct fib * fibptr;
if (!(fibptr = fib_alloc(dev))) if (!(fibptr = aac_fib_alloc(dev)))
return -ENOMEM; return -ENOMEM;
fib_init(fibptr); aac_fib_init(fibptr);
{ {
struct aac_get_config_status *dinfo; struct aac_get_config_status *dinfo;
dinfo = (struct aac_get_config_status *) fib_data(fibptr); dinfo = (struct aac_get_config_status *) fib_data(fibptr);
...@@ -186,7 +186,7 @@ int aac_get_config_status(struct aac_dev *dev) ...@@ -186,7 +186,7 @@ int aac_get_config_status(struct aac_dev *dev)
dinfo->count = cpu_to_le32(sizeof(((struct aac_get_config_status_resp *)NULL)->data)); dinfo->count = cpu_to_le32(sizeof(((struct aac_get_config_status_resp *)NULL)->data));
} }
status = fib_send(ContainerCommand, status = aac_fib_send(ContainerCommand,
fibptr, fibptr,
sizeof (struct aac_get_config_status), sizeof (struct aac_get_config_status),
FsaNormal, FsaNormal,
...@@ -209,30 +209,30 @@ int aac_get_config_status(struct aac_dev *dev) ...@@ -209,30 +209,30 @@ int aac_get_config_status(struct aac_dev *dev)
status = -EINVAL; status = -EINVAL;
} }
} }
fib_complete(fibptr); aac_fib_complete(fibptr);
/* Send a CT_COMMIT_CONFIG to enable discovery of devices */ /* Send a CT_COMMIT_CONFIG to enable discovery of devices */
if (status >= 0) { if (status >= 0) {
if (commit == 1) { if (commit == 1) {
struct aac_commit_config * dinfo; struct aac_commit_config * dinfo;
fib_init(fibptr); aac_fib_init(fibptr);
dinfo = (struct aac_commit_config *) fib_data(fibptr); dinfo = (struct aac_commit_config *) fib_data(fibptr);
dinfo->command = cpu_to_le32(VM_ContainerConfig); dinfo->command = cpu_to_le32(VM_ContainerConfig);
dinfo->type = cpu_to_le32(CT_COMMIT_CONFIG); dinfo->type = cpu_to_le32(CT_COMMIT_CONFIG);
status = fib_send(ContainerCommand, status = aac_fib_send(ContainerCommand,
fibptr, fibptr,
sizeof (struct aac_commit_config), sizeof (struct aac_commit_config),
FsaNormal, FsaNormal,
1, 1, 1, 1,
NULL, NULL); NULL, NULL);
fib_complete(fibptr); aac_fib_complete(fibptr);
} else if (commit == 0) { } else if (commit == 0) {
printk(KERN_WARNING printk(KERN_WARNING
"aac_get_config_status: Foreign device configurations are being ignored\n"); "aac_get_config_status: Foreign device configurations are being ignored\n");
} }
} }
fib_free(fibptr); aac_fib_free(fibptr);
return status; return status;
} }
...@@ -255,15 +255,15 @@ int aac_get_containers(struct aac_dev *dev) ...@@ -255,15 +255,15 @@ int aac_get_containers(struct aac_dev *dev)
instance = dev->scsi_host_ptr->unique_id; instance = dev->scsi_host_ptr->unique_id;
if (!(fibptr = fib_alloc(dev))) if (!(fibptr = aac_fib_alloc(dev)))
return -ENOMEM; return -ENOMEM;
fib_init(fibptr); aac_fib_init(fibptr);
dinfo = (struct aac_get_container_count *) fib_data(fibptr); dinfo = (struct aac_get_container_count *) fib_data(fibptr);
dinfo->command = cpu_to_le32(VM_ContainerConfig); dinfo->command = cpu_to_le32(VM_ContainerConfig);
dinfo->type = cpu_to_le32(CT_GET_CONTAINER_COUNT); dinfo->type = cpu_to_le32(CT_GET_CONTAINER_COUNT);
status = fib_send(ContainerCommand, status = aac_fib_send(ContainerCommand,
fibptr, fibptr,
sizeof (struct aac_get_container_count), sizeof (struct aac_get_container_count),
FsaNormal, FsaNormal,
...@@ -272,7 +272,7 @@ int aac_get_containers(struct aac_dev *dev) ...@@ -272,7 +272,7 @@ int aac_get_containers(struct aac_dev *dev)
if (status >= 0) { if (status >= 0) {
dresp = (struct aac_get_container_count_resp *)fib_data(fibptr); dresp = (struct aac_get_container_count_resp *)fib_data(fibptr);
maximum_num_containers = le32_to_cpu(dresp->ContainerSwitchEntries); maximum_num_containers = le32_to_cpu(dresp->ContainerSwitchEntries);
fib_complete(fibptr); aac_fib_complete(fibptr);
} }
if (maximum_num_containers < MAXIMUM_NUM_CONTAINERS) if (maximum_num_containers < MAXIMUM_NUM_CONTAINERS)
...@@ -280,7 +280,7 @@ int aac_get_containers(struct aac_dev *dev) ...@@ -280,7 +280,7 @@ int aac_get_containers(struct aac_dev *dev)
fsa_dev_ptr = (struct fsa_dev_info *) kmalloc( fsa_dev_ptr = (struct fsa_dev_info *) kmalloc(
sizeof(*fsa_dev_ptr) * maximum_num_containers, GFP_KERNEL); sizeof(*fsa_dev_ptr) * maximum_num_containers, GFP_KERNEL);
if (!fsa_dev_ptr) { if (!fsa_dev_ptr) {
fib_free(fibptr); aac_fib_free(fibptr);
return -ENOMEM; return -ENOMEM;
} }
memset(fsa_dev_ptr, 0, sizeof(*fsa_dev_ptr) * maximum_num_containers); memset(fsa_dev_ptr, 0, sizeof(*fsa_dev_ptr) * maximum_num_containers);
...@@ -294,14 +294,14 @@ int aac_get_containers(struct aac_dev *dev) ...@@ -294,14 +294,14 @@ int aac_get_containers(struct aac_dev *dev)
fsa_dev_ptr[index].devname[0] = '\0'; fsa_dev_ptr[index].devname[0] = '\0';
fib_init(fibptr); aac_fib_init(fibptr);
dinfo = (struct aac_query_mount *) fib_data(fibptr); dinfo = (struct aac_query_mount *) fib_data(fibptr);
dinfo->command = cpu_to_le32(VM_NameServe); dinfo->command = cpu_to_le32(VM_NameServe);
dinfo->count = cpu_to_le32(index); dinfo->count = cpu_to_le32(index);
dinfo->type = cpu_to_le32(FT_FILESYS); dinfo->type = cpu_to_le32(FT_FILESYS);
status = fib_send(ContainerCommand, status = aac_fib_send(ContainerCommand,
fibptr, fibptr,
sizeof (struct aac_query_mount), sizeof (struct aac_query_mount),
FsaNormal, FsaNormal,
...@@ -319,7 +319,7 @@ int aac_get_containers(struct aac_dev *dev) ...@@ -319,7 +319,7 @@ int aac_get_containers(struct aac_dev *dev)
dinfo->count = cpu_to_le32(index); dinfo->count = cpu_to_le32(index);
dinfo->type = cpu_to_le32(FT_FILESYS); dinfo->type = cpu_to_le32(FT_FILESYS);
if (fib_send(ContainerCommand, if (aac_fib_send(ContainerCommand,
fibptr, fibptr,
sizeof(struct aac_query_mount), sizeof(struct aac_query_mount),
FsaNormal, FsaNormal,
...@@ -347,7 +347,7 @@ int aac_get_containers(struct aac_dev *dev) ...@@ -347,7 +347,7 @@ int aac_get_containers(struct aac_dev *dev)
if (le32_to_cpu(dresp->mnt[0].state) & FSCS_READONLY) if (le32_to_cpu(dresp->mnt[0].state) & FSCS_READONLY)
fsa_dev_ptr[index].ro = 1; fsa_dev_ptr[index].ro = 1;
} }
fib_complete(fibptr); aac_fib_complete(fibptr);
/* /*
* If there are no more containers, then stop asking. * If there are no more containers, then stop asking.
*/ */
...@@ -355,7 +355,7 @@ int aac_get_containers(struct aac_dev *dev) ...@@ -355,7 +355,7 @@ int aac_get_containers(struct aac_dev *dev)
break; break;
} }
} }
fib_free(fibptr); aac_fib_free(fibptr);
return status; return status;
} }
...@@ -413,8 +413,8 @@ static void get_container_name_callback(void *context, struct fib * fibptr) ...@@ -413,8 +413,8 @@ static void get_container_name_callback(void *context, struct fib * fibptr)
scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_GOOD; scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_GOOD;
fib_complete(fibptr); aac_fib_complete(fibptr);
fib_free(fibptr); aac_fib_free(fibptr);
scsicmd->scsi_done(scsicmd); scsicmd->scsi_done(scsicmd);
} }
...@@ -430,10 +430,10 @@ static int aac_get_container_name(struct scsi_cmnd * scsicmd, int cid) ...@@ -430,10 +430,10 @@ static int aac_get_container_name(struct scsi_cmnd * scsicmd, int cid)
dev = (struct aac_dev *)scsicmd->device->host->hostdata; dev = (struct aac_dev *)scsicmd->device->host->hostdata;
if (!(cmd_fibcontext = fib_alloc(dev))) if (!(cmd_fibcontext = aac_fib_alloc(dev)))
return -ENOMEM; return -ENOMEM;
fib_init(cmd_fibcontext); aac_fib_init(cmd_fibcontext);
dinfo = (struct aac_get_name *) fib_data(cmd_fibcontext); dinfo = (struct aac_get_name *) fib_data(cmd_fibcontext);
dinfo->command = cpu_to_le32(VM_ContainerConfig); dinfo->command = cpu_to_le32(VM_ContainerConfig);
...@@ -441,7 +441,7 @@ static int aac_get_container_name(struct scsi_cmnd * scsicmd, int cid) ...@@ -441,7 +441,7 @@ static int aac_get_container_name(struct scsi_cmnd * scsicmd, int cid)
dinfo->cid = cpu_to_le32(cid); dinfo->cid = cpu_to_le32(cid);
dinfo->count = cpu_to_le32(sizeof(((struct aac_get_name_resp *)NULL)->data)); dinfo->count = cpu_to_le32(sizeof(((struct aac_get_name_resp *)NULL)->data));
status = fib_send(ContainerCommand, status = aac_fib_send(ContainerCommand,
cmd_fibcontext, cmd_fibcontext,
sizeof (struct aac_get_name), sizeof (struct aac_get_name),
FsaNormal, FsaNormal,
...@@ -455,14 +455,14 @@ static int aac_get_container_name(struct scsi_cmnd * scsicmd, int cid) ...@@ -455,14 +455,14 @@ static int aac_get_container_name(struct scsi_cmnd * scsicmd, int cid)
if (status == -EINPROGRESS) if (status == -EINPROGRESS)
return 0; return 0;
printk(KERN_WARNING "aac_get_container_name: fib_send failed with status: %d.\n", status); printk(KERN_WARNING "aac_get_container_name: aac_fib_send failed with status: %d.\n", status);
fib_complete(cmd_fibcontext); aac_fib_complete(cmd_fibcontext);
fib_free(cmd_fibcontext); aac_fib_free(cmd_fibcontext);
return -1; return -1;
} }
/** /**
* probe_container - query a logical volume * aac_probe_container - query a logical volume
* @dev: device to query * @dev: device to query
* @cid: container identifier * @cid: container identifier
* *
...@@ -470,7 +470,7 @@ static int aac_get_container_name(struct scsi_cmnd * scsicmd, int cid) ...@@ -470,7 +470,7 @@ static int aac_get_container_name(struct scsi_cmnd * scsicmd, int cid)
* is updated in the struct fsa_dev_info structure rather than returned. * is updated in the struct fsa_dev_info structure rather than returned.
*/ */
int probe_container(struct aac_dev *dev, int cid) int aac_probe_container(struct aac_dev *dev, int cid)
{ {
struct fsa_dev_info *fsa_dev_ptr; struct fsa_dev_info *fsa_dev_ptr;
int status; int status;
...@@ -482,10 +482,10 @@ int probe_container(struct aac_dev *dev, int cid) ...@@ -482,10 +482,10 @@ int probe_container(struct aac_dev *dev, int cid)
fsa_dev_ptr = dev->fsa_dev; fsa_dev_ptr = dev->fsa_dev;
instance = dev->scsi_host_ptr->unique_id; instance = dev->scsi_host_ptr->unique_id;
if (!(fibptr = fib_alloc(dev))) if (!(fibptr = aac_fib_alloc(dev)))
return -ENOMEM; return -ENOMEM;
fib_init(fibptr); aac_fib_init(fibptr);
dinfo = (struct aac_query_mount *)fib_data(fibptr); dinfo = (struct aac_query_mount *)fib_data(fibptr);
...@@ -493,14 +493,14 @@ int probe_container(struct aac_dev *dev, int cid) ...@@ -493,14 +493,14 @@ int probe_container(struct aac_dev *dev, int cid)
dinfo->count = cpu_to_le32(cid); dinfo->count = cpu_to_le32(cid);
dinfo->type = cpu_to_le32(FT_FILESYS); dinfo->type = cpu_to_le32(FT_FILESYS);
status = fib_send(ContainerCommand, status = aac_fib_send(ContainerCommand,
fibptr, fibptr,
sizeof(struct aac_query_mount), sizeof(struct aac_query_mount),
FsaNormal, FsaNormal,
1, 1, 1, 1,
NULL, NULL); NULL, NULL);
if (status < 0) { if (status < 0) {
printk(KERN_WARNING "aacraid: probe_container query failed.\n"); printk(KERN_WARNING "aacraid: aac_probe_container query failed.\n");
goto error; goto error;
} }
...@@ -512,7 +512,7 @@ int probe_container(struct aac_dev *dev, int cid) ...@@ -512,7 +512,7 @@ int probe_container(struct aac_dev *dev, int cid)
dinfo->count = cpu_to_le32(cid); dinfo->count = cpu_to_le32(cid);
dinfo->type = cpu_to_le32(FT_FILESYS); dinfo->type = cpu_to_le32(FT_FILESYS);
if (fib_send(ContainerCommand, if (aac_fib_send(ContainerCommand,
fibptr, fibptr,
sizeof(struct aac_query_mount), sizeof(struct aac_query_mount),
FsaNormal, FsaNormal,
...@@ -535,8 +535,8 @@ int probe_container(struct aac_dev *dev, int cid) ...@@ -535,8 +535,8 @@ int probe_container(struct aac_dev *dev, int cid)
} }
error: error:
fib_complete(fibptr); aac_fib_complete(fibptr);
fib_free(fibptr); aac_fib_free(fibptr);
return status; return status;
} }
...@@ -700,14 +700,14 @@ int aac_get_adapter_info(struct aac_dev* dev) ...@@ -700,14 +700,14 @@ int aac_get_adapter_info(struct aac_dev* dev)
struct aac_bus_info *command; struct aac_bus_info *command;
struct aac_bus_info_response *bus_info; struct aac_bus_info_response *bus_info;
if (!(fibptr = fib_alloc(dev))) if (!(fibptr = aac_fib_alloc(dev)))
return -ENOMEM; return -ENOMEM;
fib_init(fibptr); aac_fib_init(fibptr);
info = (struct aac_adapter_info *) fib_data(fibptr); info = (struct aac_adapter_info *) fib_data(fibptr);
memset(info,0,sizeof(*info)); memset(info,0,sizeof(*info));
rcode = fib_send(RequestAdapterInfo, rcode = aac_fib_send(RequestAdapterInfo,
fibptr, fibptr,
sizeof(*info), sizeof(*info),
FsaNormal, FsaNormal,
...@@ -716,8 +716,8 @@ int aac_get_adapter_info(struct aac_dev* dev) ...@@ -716,8 +716,8 @@ int aac_get_adapter_info(struct aac_dev* dev)
NULL); NULL);
if (rcode < 0) { if (rcode < 0) {
fib_complete(fibptr); aac_fib_complete(fibptr);
fib_free(fibptr); aac_fib_free(fibptr);
return rcode; return rcode;
} }
memcpy(&dev->adapter_info, info, sizeof(*info)); memcpy(&dev->adapter_info, info, sizeof(*info));
...@@ -725,13 +725,13 @@ int aac_get_adapter_info(struct aac_dev* dev) ...@@ -725,13 +725,13 @@ int aac_get_adapter_info(struct aac_dev* dev)
if (dev->adapter_info.options & AAC_OPT_SUPPLEMENT_ADAPTER_INFO) { if (dev->adapter_info.options & AAC_OPT_SUPPLEMENT_ADAPTER_INFO) {
struct aac_supplement_adapter_info * info; struct aac_supplement_adapter_info * info;
fib_init(fibptr); aac_fib_init(fibptr);
info = (struct aac_supplement_adapter_info *) fib_data(fibptr); info = (struct aac_supplement_adapter_info *) fib_data(fibptr);
memset(info,0,sizeof(*info)); memset(info,0,sizeof(*info));
rcode = fib_send(RequestSupplementAdapterInfo, rcode = aac_fib_send(RequestSupplementAdapterInfo,
fibptr, fibptr,
sizeof(*info), sizeof(*info),
FsaNormal, FsaNormal,
...@@ -748,7 +748,7 @@ int aac_get_adapter_info(struct aac_dev* dev) ...@@ -748,7 +748,7 @@ int aac_get_adapter_info(struct aac_dev* dev)
* GetBusInfo * GetBusInfo
*/ */
fib_init(fibptr); aac_fib_init(fibptr);
bus_info = (struct aac_bus_info_response *) fib_data(fibptr); bus_info = (struct aac_bus_info_response *) fib_data(fibptr);
...@@ -761,7 +761,7 @@ int aac_get_adapter_info(struct aac_dev* dev) ...@@ -761,7 +761,7 @@ int aac_get_adapter_info(struct aac_dev* dev)
command->MethodId = cpu_to_le32(1); command->MethodId = cpu_to_le32(1);
command->CtlCmd = cpu_to_le32(GetBusInfo); command->CtlCmd = cpu_to_le32(GetBusInfo);
rcode = fib_send(ContainerCommand, rcode = aac_fib_send(ContainerCommand,
fibptr, fibptr,
sizeof (*bus_info), sizeof (*bus_info),
FsaNormal, FsaNormal,
...@@ -891,8 +891,8 @@ int aac_get_adapter_info(struct aac_dev* dev) ...@@ -891,8 +891,8 @@ int aac_get_adapter_info(struct aac_dev* dev)
} }
} }
fib_complete(fibptr); aac_fib_complete(fibptr);
fib_free(fibptr); aac_fib_free(fibptr);
return rcode; return rcode;
} }
...@@ -976,8 +976,8 @@ static void io_callback(void *context, struct fib * fibptr) ...@@ -976,8 +976,8 @@ static void io_callback(void *context, struct fib * fibptr)
? sizeof(scsicmd->sense_buffer) ? sizeof(scsicmd->sense_buffer)
: sizeof(dev->fsa_dev[cid].sense_data)); : sizeof(dev->fsa_dev[cid].sense_data));
} }
fib_complete(fibptr); aac_fib_complete(fibptr);
fib_free(fibptr); aac_fib_free(fibptr);
scsicmd->scsi_done(scsicmd); scsicmd->scsi_done(scsicmd);
} }
...@@ -1062,11 +1062,11 @@ static int aac_read(struct scsi_cmnd * scsicmd, int cid) ...@@ -1062,11 +1062,11 @@ static int aac_read(struct scsi_cmnd * scsicmd, int cid)
/* /*
* Alocate and initialize a Fib * Alocate and initialize a Fib
*/ */
if (!(cmd_fibcontext = fib_alloc(dev))) { if (!(cmd_fibcontext = aac_fib_alloc(dev))) {
return -1; return -1;
} }
fib_init(cmd_fibcontext); aac_fib_init(cmd_fibcontext);
if (dev->raw_io_interface) { if (dev->raw_io_interface) {
struct aac_raw_io *readcmd; struct aac_raw_io *readcmd;
...@@ -1086,7 +1086,7 @@ static int aac_read(struct scsi_cmnd * scsicmd, int cid) ...@@ -1086,7 +1086,7 @@ static int aac_read(struct scsi_cmnd * scsicmd, int cid)
/* /*
* Now send the Fib to the adapter * Now send the Fib to the adapter
*/ */
status = fib_send(ContainerRawIo, status = aac_fib_send(ContainerRawIo,
cmd_fibcontext, cmd_fibcontext,
fibsize, fibsize,
FsaNormal, FsaNormal,
...@@ -1112,7 +1112,7 @@ static int aac_read(struct scsi_cmnd * scsicmd, int cid) ...@@ -1112,7 +1112,7 @@ static int aac_read(struct scsi_cmnd * scsicmd, int cid)
/* /*
* Now send the Fib to the adapter * Now send the Fib to the adapter
*/ */
status = fib_send(ContainerCommand64, status = aac_fib_send(ContainerCommand64,
cmd_fibcontext, cmd_fibcontext,
fibsize, fibsize,
FsaNormal, FsaNormal,
...@@ -1136,7 +1136,7 @@ static int aac_read(struct scsi_cmnd * scsicmd, int cid) ...@@ -1136,7 +1136,7 @@ static int aac_read(struct scsi_cmnd * scsicmd, int cid)
/* /*
* Now send the Fib to the adapter * Now send the Fib to the adapter
*/ */
status = fib_send(ContainerCommand, status = aac_fib_send(ContainerCommand,
cmd_fibcontext, cmd_fibcontext,
fibsize, fibsize,
FsaNormal, FsaNormal,
...@@ -1153,14 +1153,14 @@ static int aac_read(struct scsi_cmnd * scsicmd, int cid) ...@@ -1153,14 +1153,14 @@ static int aac_read(struct scsi_cmnd * scsicmd, int cid)
if (status == -EINPROGRESS) if (status == -EINPROGRESS)
return 0; return 0;
printk(KERN_WARNING "aac_read: fib_send failed with status: %d.\n", status); printk(KERN_WARNING "aac_read: aac_fib_send failed with status: %d.\n", status);
/* /*
* For some reason, the Fib didn't queue, return QUEUE_FULL * For some reason, the Fib didn't queue, return QUEUE_FULL
*/ */
scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_TASK_SET_FULL; scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_TASK_SET_FULL;
scsicmd->scsi_done(scsicmd); scsicmd->scsi_done(scsicmd);
fib_complete(cmd_fibcontext); aac_fib_complete(cmd_fibcontext);
fib_free(cmd_fibcontext); aac_fib_free(cmd_fibcontext);
return 0; return 0;
} }
...@@ -1228,12 +1228,12 @@ static int aac_write(struct scsi_cmnd * scsicmd, int cid) ...@@ -1228,12 +1228,12 @@ static int aac_write(struct scsi_cmnd * scsicmd, int cid)
/* /*
* Allocate and initialize a Fib then setup a BlockWrite command * Allocate and initialize a Fib then setup a BlockWrite command
*/ */
if (!(cmd_fibcontext = fib_alloc(dev))) { if (!(cmd_fibcontext = aac_fib_alloc(dev))) {
scsicmd->result = DID_ERROR << 16; scsicmd->result = DID_ERROR << 16;
scsicmd->scsi_done(scsicmd); scsicmd->scsi_done(scsicmd);
return 0; return 0;
} }
fib_init(cmd_fibcontext); aac_fib_init(cmd_fibcontext);
if (dev->raw_io_interface) { if (dev->raw_io_interface) {
struct aac_raw_io *writecmd; struct aac_raw_io *writecmd;
...@@ -1253,7 +1253,7 @@ static int aac_write(struct scsi_cmnd * scsicmd, int cid) ...@@ -1253,7 +1253,7 @@ static int aac_write(struct scsi_cmnd * scsicmd, int cid)
/* /*
* Now send the Fib to the adapter * Now send the Fib to the adapter
*/ */
status = fib_send(ContainerRawIo, status = aac_fib_send(ContainerRawIo,
cmd_fibcontext, cmd_fibcontext,
fibsize, fibsize,
FsaNormal, FsaNormal,
...@@ -1279,7 +1279,7 @@ static int aac_write(struct scsi_cmnd * scsicmd, int cid) ...@@ -1279,7 +1279,7 @@ static int aac_write(struct scsi_cmnd * scsicmd, int cid)
/* /*
* Now send the Fib to the adapter * Now send the Fib to the adapter
*/ */
status = fib_send(ContainerCommand64, status = aac_fib_send(ContainerCommand64,
cmd_fibcontext, cmd_fibcontext,
fibsize, fibsize,
FsaNormal, FsaNormal,
...@@ -1305,7 +1305,7 @@ static int aac_write(struct scsi_cmnd * scsicmd, int cid) ...@@ -1305,7 +1305,7 @@ static int aac_write(struct scsi_cmnd * scsicmd, int cid)
/* /*
* Now send the Fib to the adapter * Now send the Fib to the adapter
*/ */
status = fib_send(ContainerCommand, status = aac_fib_send(ContainerCommand,
cmd_fibcontext, cmd_fibcontext,
fibsize, fibsize,
FsaNormal, FsaNormal,
...@@ -1322,15 +1322,15 @@ static int aac_write(struct scsi_cmnd * scsicmd, int cid) ...@@ -1322,15 +1322,15 @@ static int aac_write(struct scsi_cmnd * scsicmd, int cid)
return 0; return 0;
} }
printk(KERN_WARNING "aac_write: fib_send failed with status: %d\n", status); printk(KERN_WARNING "aac_write: aac_fib_send failed with status: %d\n", status);
/* /*
* For some reason, the Fib didn't queue, return QUEUE_FULL * For some reason, the Fib didn't queue, return QUEUE_FULL
*/ */
scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_TASK_SET_FULL; scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_TASK_SET_FULL;
scsicmd->scsi_done(scsicmd); scsicmd->scsi_done(scsicmd);
fib_complete(cmd_fibcontext); aac_fib_complete(cmd_fibcontext);
fib_free(cmd_fibcontext); aac_fib_free(cmd_fibcontext);
return 0; return 0;
} }
...@@ -1369,8 +1369,8 @@ static void synchronize_callback(void *context, struct fib *fibptr) ...@@ -1369,8 +1369,8 @@ static void synchronize_callback(void *context, struct fib *fibptr)
sizeof(cmd->sense_buffer))); sizeof(cmd->sense_buffer)));
} }
fib_complete(fibptr); aac_fib_complete(fibptr);
fib_free(fibptr); aac_fib_free(fibptr);
cmd->scsi_done(cmd); cmd->scsi_done(cmd);
} }
...@@ -1407,10 +1407,10 @@ static int aac_synchronize(struct scsi_cmnd *scsicmd, int cid) ...@@ -1407,10 +1407,10 @@ static int aac_synchronize(struct scsi_cmnd *scsicmd, int cid)
* Allocate and initialize a Fib * Allocate and initialize a Fib
*/ */
if (!(cmd_fibcontext = if (!(cmd_fibcontext =
fib_alloc((struct aac_dev *)scsicmd->device->host->hostdata))) aac_fib_alloc((struct aac_dev *)scsicmd->device->host->hostdata)))
return SCSI_MLQUEUE_HOST_BUSY; return SCSI_MLQUEUE_HOST_BUSY;
fib_init(cmd_fibcontext); aac_fib_init(cmd_fibcontext);
synchronizecmd = fib_data(cmd_fibcontext); synchronizecmd = fib_data(cmd_fibcontext);
synchronizecmd->command = cpu_to_le32(VM_ContainerConfig); synchronizecmd->command = cpu_to_le32(VM_ContainerConfig);
...@@ -1422,7 +1422,7 @@ static int aac_synchronize(struct scsi_cmnd *scsicmd, int cid) ...@@ -1422,7 +1422,7 @@ static int aac_synchronize(struct scsi_cmnd *scsicmd, int cid)
/* /*
* Now send the Fib to the adapter * Now send the Fib to the adapter
*/ */
status = fib_send(ContainerCommand, status = aac_fib_send(ContainerCommand,
cmd_fibcontext, cmd_fibcontext,
sizeof(struct aac_synchronize), sizeof(struct aac_synchronize),
FsaNormal, FsaNormal,
...@@ -1437,9 +1437,9 @@ static int aac_synchronize(struct scsi_cmnd *scsicmd, int cid) ...@@ -1437,9 +1437,9 @@ static int aac_synchronize(struct scsi_cmnd *scsicmd, int cid)
return 0; return 0;
printk(KERN_WARNING printk(KERN_WARNING
"aac_synchronize: fib_send failed with status: %d.\n", status); "aac_synchronize: aac_fib_send failed with status: %d.\n", status);
fib_complete(cmd_fibcontext); aac_fib_complete(cmd_fibcontext);
fib_free(cmd_fibcontext); aac_fib_free(cmd_fibcontext);
return SCSI_MLQUEUE_HOST_BUSY; return SCSI_MLQUEUE_HOST_BUSY;
} }
...@@ -1488,7 +1488,7 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd) ...@@ -1488,7 +1488,7 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd)
case READ_CAPACITY: case READ_CAPACITY:
case TEST_UNIT_READY: case TEST_UNIT_READY:
spin_unlock_irq(host->host_lock); spin_unlock_irq(host->host_lock);
probe_container(dev, cid); aac_probe_container(dev, cid);
if ((fsa_dev_ptr[cid].valid & 1) == 0) if ((fsa_dev_ptr[cid].valid & 1) == 0)
fsa_dev_ptr[cid].valid = 0; fsa_dev_ptr[cid].valid = 0;
spin_lock_irq(host->host_lock); spin_lock_irq(host->host_lock);
...@@ -2089,8 +2089,8 @@ static void aac_srb_callback(void *context, struct fib * fibptr) ...@@ -2089,8 +2089,8 @@ static void aac_srb_callback(void *context, struct fib * fibptr)
*/ */
scsicmd->result |= le32_to_cpu(srbreply->scsi_status); scsicmd->result |= le32_to_cpu(srbreply->scsi_status);
fib_complete(fibptr); aac_fib_complete(fibptr);
fib_free(fibptr); aac_fib_free(fibptr);
scsicmd->scsi_done(scsicmd); scsicmd->scsi_done(scsicmd);
} }
...@@ -2142,10 +2142,10 @@ static int aac_send_srb_fib(struct scsi_cmnd* scsicmd) ...@@ -2142,10 +2142,10 @@ static int aac_send_srb_fib(struct scsi_cmnd* scsicmd)
/* /*
* Allocate and initialize a Fib then setup a BlockWrite command * Allocate and initialize a Fib then setup a BlockWrite command
*/ */
if (!(cmd_fibcontext = fib_alloc(dev))) { if (!(cmd_fibcontext = aac_fib_alloc(dev))) {
return -1; return -1;
} }
fib_init(cmd_fibcontext); aac_fib_init(cmd_fibcontext);
srbcmd = (struct aac_srb*) fib_data(cmd_fibcontext); srbcmd = (struct aac_srb*) fib_data(cmd_fibcontext);
srbcmd->function = cpu_to_le32(SRBF_ExecuteScsi); srbcmd->function = cpu_to_le32(SRBF_ExecuteScsi);
...@@ -2179,7 +2179,7 @@ static int aac_send_srb_fib(struct scsi_cmnd* scsicmd) ...@@ -2179,7 +2179,7 @@ static int aac_send_srb_fib(struct scsi_cmnd* scsicmd)
/* /*
* Now send the Fib to the adapter * Now send the Fib to the adapter
*/ */
status = fib_send(ScsiPortCommand64, cmd_fibcontext, status = aac_fib_send(ScsiPortCommand64, cmd_fibcontext,
fibsize, FsaNormal, 0, 1, fibsize, FsaNormal, 0, 1,
(fib_callback) aac_srb_callback, (fib_callback) aac_srb_callback,
(void *) scsicmd); (void *) scsicmd);
...@@ -2201,7 +2201,7 @@ static int aac_send_srb_fib(struct scsi_cmnd* scsicmd) ...@@ -2201,7 +2201,7 @@ static int aac_send_srb_fib(struct scsi_cmnd* scsicmd)
/* /*
* Now send the Fib to the adapter * Now send the Fib to the adapter
*/ */
status = fib_send(ScsiPortCommand, cmd_fibcontext, fibsize, FsaNormal, 0, 1, status = aac_fib_send(ScsiPortCommand, cmd_fibcontext, fibsize, FsaNormal, 0, 1,
(fib_callback) aac_srb_callback, (void *) scsicmd); (fib_callback) aac_srb_callback, (void *) scsicmd);
} }
/* /*
...@@ -2211,9 +2211,9 @@ static int aac_send_srb_fib(struct scsi_cmnd* scsicmd) ...@@ -2211,9 +2211,9 @@ static int aac_send_srb_fib(struct scsi_cmnd* scsicmd)
return 0; return 0;
} }
printk(KERN_WARNING "aac_srb: fib_send failed with status: %d\n", status); printk(KERN_WARNING "aac_srb: aac_fib_send failed with status: %d\n", status);
fib_complete(cmd_fibcontext); aac_fib_complete(cmd_fibcontext);
fib_free(cmd_fibcontext); aac_fib_free(cmd_fibcontext);
return -1; return -1;
} }
......
...@@ -1774,16 +1774,16 @@ static inline u32 cap_to_cyls(sector_t capacity, u32 divisor) ...@@ -1774,16 +1774,16 @@ static inline u32 cap_to_cyls(sector_t capacity, u32 divisor)
struct scsi_cmnd; struct scsi_cmnd;
const char *aac_driverinfo(struct Scsi_Host *); const char *aac_driverinfo(struct Scsi_Host *);
struct fib *fib_alloc(struct aac_dev *dev); struct fib *aac_fib_alloc(struct aac_dev *dev);
int fib_setup(struct aac_dev *dev); int aac_fib_setup(struct aac_dev *dev);
void fib_map_free(struct aac_dev *dev); void aac_fib_map_free(struct aac_dev *dev);
void fib_free(struct fib * context); void aac_fib_free(struct fib * context);
void fib_init(struct fib * context); void aac_fib_init(struct fib * context);
void aac_printf(struct aac_dev *dev, u32 val); void aac_printf(struct aac_dev *dev, u32 val);
int fib_send(u16 command, struct fib * context, unsigned long size, int priority, int wait, int reply, fib_callback callback, void *ctxt); int aac_fib_send(u16 command, struct fib * context, unsigned long size, int priority, int wait, int reply, fib_callback callback, void *ctxt);
int aac_consumer_get(struct aac_dev * dev, struct aac_queue * q, struct aac_entry **entry); int aac_consumer_get(struct aac_dev * dev, struct aac_queue * q, struct aac_entry **entry);
void aac_consumer_free(struct aac_dev * dev, struct aac_queue * q, u32 qnum); void aac_consumer_free(struct aac_dev * dev, struct aac_queue * q, u32 qnum);
int fib_complete(struct fib * context); int aac_fib_complete(struct fib * context);
#define fib_data(fibctx) ((void *)(fibctx)->hw_fib->data) #define fib_data(fibctx) ((void *)(fibctx)->hw_fib->data)
struct aac_dev *aac_init_adapter(struct aac_dev *dev); struct aac_dev *aac_init_adapter(struct aac_dev *dev);
int aac_get_config_status(struct aac_dev *dev); int aac_get_config_status(struct aac_dev *dev);
...@@ -1799,11 +1799,11 @@ unsigned int aac_command_normal(struct aac_queue * q); ...@@ -1799,11 +1799,11 @@ unsigned int aac_command_normal(struct aac_queue * q);
unsigned int aac_intr_normal(struct aac_dev * dev, u32 Index); unsigned int aac_intr_normal(struct aac_dev * dev, u32 Index);
int aac_command_thread(struct aac_dev * dev); int aac_command_thread(struct aac_dev * dev);
int aac_close_fib_context(struct aac_dev * dev, struct aac_fib_context *fibctx); int aac_close_fib_context(struct aac_dev * dev, struct aac_fib_context *fibctx);
int fib_adapter_complete(struct fib * fibptr, unsigned short size); int aac_fib_adapter_complete(struct fib * fibptr, unsigned short size);
struct aac_driver_ident* aac_get_driver_ident(int devtype); struct aac_driver_ident* aac_get_driver_ident(int devtype);
int aac_get_adapter_info(struct aac_dev* dev); int aac_get_adapter_info(struct aac_dev* dev);
int aac_send_shutdown(struct aac_dev *dev); int aac_send_shutdown(struct aac_dev *dev);
int probe_container(struct aac_dev *dev, int cid); int aac_probe_container(struct aac_dev *dev, int cid);
extern int numacb; extern int numacb;
extern int acbsize; extern int acbsize;
extern char aac_driver_version[]; extern char aac_driver_version[];
...@@ -63,7 +63,7 @@ static int ioctl_send_fib(struct aac_dev * dev, void __user *arg) ...@@ -63,7 +63,7 @@ static int ioctl_send_fib(struct aac_dev * dev, void __user *arg)
unsigned size; unsigned size;
int retval; int retval;
fibptr = fib_alloc(dev); fibptr = aac_fib_alloc(dev);
if(fibptr == NULL) { if(fibptr == NULL) {
return -ENOMEM; return -ENOMEM;
} }
...@@ -73,7 +73,7 @@ static int ioctl_send_fib(struct aac_dev * dev, void __user *arg) ...@@ -73,7 +73,7 @@ static int ioctl_send_fib(struct aac_dev * dev, void __user *arg)
* First copy in the header so that we can check the size field. * First copy in the header so that we can check the size field.
*/ */
if (copy_from_user((void *)kfib, arg, sizeof(struct aac_fibhdr))) { if (copy_from_user((void *)kfib, arg, sizeof(struct aac_fibhdr))) {
fib_free(fibptr); aac_fib_free(fibptr);
return -EFAULT; return -EFAULT;
} }
/* /*
...@@ -110,13 +110,13 @@ static int ioctl_send_fib(struct aac_dev * dev, void __user *arg) ...@@ -110,13 +110,13 @@ static int ioctl_send_fib(struct aac_dev * dev, void __user *arg)
*/ */
kfib->header.XferState = 0; kfib->header.XferState = 0;
} else { } else {
retval = fib_send(le16_to_cpu(kfib->header.Command), fibptr, retval = aac_fib_send(le16_to_cpu(kfib->header.Command), fibptr,
le16_to_cpu(kfib->header.Size) , FsaNormal, le16_to_cpu(kfib->header.Size) , FsaNormal,
1, 1, NULL, NULL); 1, 1, NULL, NULL);
if (retval) { if (retval) {
goto cleanup; goto cleanup;
} }
if (fib_complete(fibptr) != 0) { if (aac_fib_complete(fibptr) != 0) {
retval = -EINVAL; retval = -EINVAL;
goto cleanup; goto cleanup;
} }
...@@ -138,7 +138,7 @@ static int ioctl_send_fib(struct aac_dev * dev, void __user *arg) ...@@ -138,7 +138,7 @@ static int ioctl_send_fib(struct aac_dev * dev, void __user *arg)
fibptr->hw_fib_pa = hw_fib_pa; fibptr->hw_fib_pa = hw_fib_pa;
fibptr->hw_fib = hw_fib; fibptr->hw_fib = hw_fib;
} }
fib_free(fibptr); aac_fib_free(fibptr);
return retval; return retval;
} }
...@@ -464,10 +464,10 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg) ...@@ -464,10 +464,10 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
/* /*
* Allocate and initialize a Fib then setup a BlockWrite command * Allocate and initialize a Fib then setup a BlockWrite command
*/ */
if (!(srbfib = fib_alloc(dev))) { if (!(srbfib = aac_fib_alloc(dev))) {
return -ENOMEM; return -ENOMEM;
} }
fib_init(srbfib); aac_fib_init(srbfib);
srbcmd = (struct aac_srb*) fib_data(srbfib); srbcmd = (struct aac_srb*) fib_data(srbfib);
...@@ -601,7 +601,7 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg) ...@@ -601,7 +601,7 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
srbcmd->count = cpu_to_le32(byte_count); srbcmd->count = cpu_to_le32(byte_count);
psg->count = cpu_to_le32(sg_indx+1); psg->count = cpu_to_le32(sg_indx+1);
status = fib_send(ScsiPortCommand64, srbfib, actual_fibsize, FsaNormal, 1, 1,NULL,NULL); status = aac_fib_send(ScsiPortCommand64, srbfib, actual_fibsize, FsaNormal, 1, 1,NULL,NULL);
} else { } else {
struct user_sgmap* upsg = &user_srbcmd->sg; struct user_sgmap* upsg = &user_srbcmd->sg;
struct sgmap* psg = &srbcmd->sg; struct sgmap* psg = &srbcmd->sg;
...@@ -649,7 +649,7 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg) ...@@ -649,7 +649,7 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
} }
srbcmd->count = cpu_to_le32(byte_count); srbcmd->count = cpu_to_le32(byte_count);
psg->count = cpu_to_le32(sg_indx+1); psg->count = cpu_to_le32(sg_indx+1);
status = fib_send(ScsiPortCommand, srbfib, actual_fibsize, FsaNormal, 1, 1, NULL, NULL); status = aac_fib_send(ScsiPortCommand, srbfib, actual_fibsize, FsaNormal, 1, 1, NULL, NULL);
} }
if (status != 0){ if (status != 0){
...@@ -684,8 +684,8 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg) ...@@ -684,8 +684,8 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
for(i=0; i <= sg_indx; i++){ for(i=0; i <= sg_indx; i++){
kfree(sg_list[i]); kfree(sg_list[i]);
} }
fib_complete(srbfib); aac_fib_complete(srbfib);
fib_free(srbfib); aac_fib_free(srbfib);
return rcode; return rcode;
} }
......
...@@ -185,17 +185,17 @@ int aac_send_shutdown(struct aac_dev * dev) ...@@ -185,17 +185,17 @@ int aac_send_shutdown(struct aac_dev * dev)
struct aac_close *cmd; struct aac_close *cmd;
int status; int status;
fibctx = fib_alloc(dev); fibctx = aac_fib_alloc(dev);
if (!fibctx) if (!fibctx)
return -ENOMEM; return -ENOMEM;
fib_init(fibctx); aac_fib_init(fibctx);
cmd = (struct aac_close *) fib_data(fibctx); cmd = (struct aac_close *) fib_data(fibctx);
cmd->command = cpu_to_le32(VM_CloseAll); cmd->command = cpu_to_le32(VM_CloseAll);
cmd->cid = cpu_to_le32(0xffffffff); cmd->cid = cpu_to_le32(0xffffffff);
status = fib_send(ContainerCommand, status = aac_fib_send(ContainerCommand,
fibctx, fibctx,
sizeof(struct aac_close), sizeof(struct aac_close),
FsaNormal, FsaNormal,
...@@ -203,8 +203,8 @@ int aac_send_shutdown(struct aac_dev * dev) ...@@ -203,8 +203,8 @@ int aac_send_shutdown(struct aac_dev * dev)
NULL, NULL); NULL, NULL);
if (status == 0) if (status == 0)
fib_complete(fibctx); aac_fib_complete(fibctx);
fib_free(fibctx); aac_fib_free(fibctx);
return status; return status;
} }
...@@ -427,7 +427,7 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev) ...@@ -427,7 +427,7 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev)
/* /*
* Initialize the list of fibs * Initialize the list of fibs
*/ */
if(fib_setup(dev)<0){ if (aac_fib_setup(dev) < 0) {
kfree(dev->queues); kfree(dev->queues);
return NULL; return NULL;
} }
......
...@@ -67,27 +67,27 @@ static int fib_map_alloc(struct aac_dev *dev) ...@@ -67,27 +67,27 @@ static int fib_map_alloc(struct aac_dev *dev)
} }
/** /**
* fib_map_free - free the fib objects * aac_fib_map_free - free the fib objects
* @dev: Adapter to free * @dev: Adapter to free
* *
* Free the PCI mappings and the memory allocated for FIB blocks * Free the PCI mappings and the memory allocated for FIB blocks
* on this adapter. * on this adapter.
*/ */
void fib_map_free(struct aac_dev *dev) void aac_fib_map_free(struct aac_dev *dev)
{ {
pci_free_consistent(dev->pdev, dev->max_fib_size * (dev->scsi_host_ptr->can_queue + AAC_NUM_MGT_FIB), dev->hw_fib_va, dev->hw_fib_pa); pci_free_consistent(dev->pdev, dev->max_fib_size * (dev->scsi_host_ptr->can_queue + AAC_NUM_MGT_FIB), dev->hw_fib_va, dev->hw_fib_pa);
} }
/** /**
* fib_setup - setup the fibs * aac_fib_setup - setup the fibs
* @dev: Adapter to set up * @dev: Adapter to set up
* *
* Allocate the PCI space for the fibs, map it and then intialise the * Allocate the PCI space for the fibs, map it and then intialise the
* fib area, the unmapped fib data and also the free list * fib area, the unmapped fib data and also the free list
*/ */
int fib_setup(struct aac_dev * dev) int aac_fib_setup(struct aac_dev * dev)
{ {
struct fib *fibptr; struct fib *fibptr;
struct hw_fib *hw_fib_va; struct hw_fib *hw_fib_va;
...@@ -134,14 +134,14 @@ int fib_setup(struct aac_dev * dev) ...@@ -134,14 +134,14 @@ int fib_setup(struct aac_dev * dev)
} }
/** /**
* fib_alloc - allocate a fib * aac_fib_alloc - allocate a fib
* @dev: Adapter to allocate the fib for * @dev: Adapter to allocate the fib for
* *
* Allocate a fib from the adapter fib pool. If the pool is empty we * Allocate a fib from the adapter fib pool. If the pool is empty we
* return NULL. * return NULL.
*/ */
struct fib * fib_alloc(struct aac_dev *dev) struct fib *aac_fib_alloc(struct aac_dev *dev)
{ {
struct fib * fibptr; struct fib * fibptr;
unsigned long flags; unsigned long flags;
...@@ -170,14 +170,14 @@ struct fib * fib_alloc(struct aac_dev *dev) ...@@ -170,14 +170,14 @@ struct fib * fib_alloc(struct aac_dev *dev)
} }
/** /**
* fib_free - free a fib * aac_fib_free - free a fib
* @fibptr: fib to free up * @fibptr: fib to free up
* *
* Frees up a fib and places it on the appropriate queue * Frees up a fib and places it on the appropriate queue
* (either free or timed out) * (either free or timed out)
*/ */
void fib_free(struct fib * fibptr) void aac_fib_free(struct fib *fibptr)
{ {
unsigned long flags; unsigned long flags;
...@@ -188,7 +188,7 @@ void fib_free(struct fib * fibptr) ...@@ -188,7 +188,7 @@ void fib_free(struct fib * fibptr)
fibptr->dev->timeout_fib = fibptr; fibptr->dev->timeout_fib = fibptr;
} else { } else {
if (fibptr->hw_fib->header.XferState != 0) { if (fibptr->hw_fib->header.XferState != 0) {
printk(KERN_WARNING "fib_free, XferState != 0, fibptr = 0x%p, XferState = 0x%x\n", printk(KERN_WARNING "aac_fib_free, XferState != 0, fibptr = 0x%p, XferState = 0x%x\n",
(void*)fibptr, (void*)fibptr,
le32_to_cpu(fibptr->hw_fib->header.XferState)); le32_to_cpu(fibptr->hw_fib->header.XferState));
} }
...@@ -199,13 +199,13 @@ void fib_free(struct fib * fibptr) ...@@ -199,13 +199,13 @@ void fib_free(struct fib * fibptr)
} }
/** /**
* fib_init - initialise a fib * aac_fib_init - initialise a fib
* @fibptr: The fib to initialize * @fibptr: The fib to initialize
* *
* Set up the generic fib fields ready for use * Set up the generic fib fields ready for use
*/ */
void fib_init(struct fib *fibptr) void aac_fib_init(struct fib *fibptr)
{ {
struct hw_fib *hw_fib = fibptr->hw_fib; struct hw_fib *hw_fib = fibptr->hw_fib;
...@@ -362,7 +362,7 @@ static int aac_queue_get(struct aac_dev * dev, u32 * index, u32 qid, struct hw_f ...@@ -362,7 +362,7 @@ static int aac_queue_get(struct aac_dev * dev, u32 * index, u32 qid, struct hw_f
*/ */
/** /**
* fib_send - send a fib to the adapter * aac_fib_send - send a fib to the adapter
* @command: Command to send * @command: Command to send
* @fibptr: The fib * @fibptr: The fib
* @size: Size of fib data area * @size: Size of fib data area
...@@ -378,7 +378,9 @@ static int aac_queue_get(struct aac_dev * dev, u32 * index, u32 qid, struct hw_f ...@@ -378,7 +378,9 @@ static int aac_queue_get(struct aac_dev * dev, u32 * index, u32 qid, struct hw_f
* response FIB is received from the adapter. * response FIB is received from the adapter.
*/ */
int fib_send(u16 command, struct fib * fibptr, unsigned long size, int priority, int wait, int reply, fib_callback callback, void * callback_data) int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size,
int priority, int wait, int reply, fib_callback callback,
void *callback_data)
{ {
struct aac_dev * dev = fibptr->dev; struct aac_dev * dev = fibptr->dev;
struct hw_fib * hw_fib = fibptr->hw_fib; struct hw_fib * hw_fib = fibptr->hw_fib;
...@@ -493,7 +495,7 @@ int fib_send(u16 command, struct fib * fibptr, unsigned long size, int priority ...@@ -493,7 +495,7 @@ int fib_send(u16 command, struct fib * fibptr, unsigned long size, int priority
q->numpending++; q->numpending++;
*(q->headers.producer) = cpu_to_le32(index + 1); *(q->headers.producer) = cpu_to_le32(index + 1);
spin_unlock_irqrestore(q->lock, qflags); spin_unlock_irqrestore(q->lock, qflags);
dprintk((KERN_DEBUG "fib_send: inserting a queue entry at index %d.\n",index)); dprintk((KERN_DEBUG "aac_fib_send: inserting a queue entry at index %d.\n",index));
if (!(nointr & aac_config.irq_mod)) if (!(nointr & aac_config.irq_mod))
aac_adapter_notify(dev, AdapNormCmdQueue); aac_adapter_notify(dev, AdapNormCmdQueue);
} }
...@@ -520,7 +522,7 @@ int fib_send(u16 command, struct fib * fibptr, unsigned long size, int priority ...@@ -520,7 +522,7 @@ int fib_send(u16 command, struct fib * fibptr, unsigned long size, int priority
list_del(&fibptr->queue); list_del(&fibptr->queue);
spin_unlock_irqrestore(q->lock, qflags); spin_unlock_irqrestore(q->lock, qflags);
if (wait == -1) { if (wait == -1) {
printk(KERN_ERR "aacraid: fib_send: first asynchronous command timed out.\n" printk(KERN_ERR "aacraid: aac_fib_send: first asynchronous command timed out.\n"
"Usually a result of a PCI interrupt routing problem;\n" "Usually a result of a PCI interrupt routing problem;\n"
"update mother board BIOS or consider utilizing one of\n" "update mother board BIOS or consider utilizing one of\n"
"the SAFE mode kernel options (acpi, apic etc)\n"); "the SAFE mode kernel options (acpi, apic etc)\n");
...@@ -624,7 +626,7 @@ void aac_consumer_free(struct aac_dev * dev, struct aac_queue *q, u32 qid) ...@@ -624,7 +626,7 @@ void aac_consumer_free(struct aac_dev * dev, struct aac_queue *q, u32 qid)
} }
/** /**
* fib_adapter_complete - complete adapter issued fib * aac_fib_adapter_complete - complete adapter issued fib
* @fibptr: fib to complete * @fibptr: fib to complete
* @size: size of fib * @size: size of fib
* *
...@@ -632,7 +634,7 @@ void aac_consumer_free(struct aac_dev * dev, struct aac_queue *q, u32 qid) ...@@ -632,7 +634,7 @@ void aac_consumer_free(struct aac_dev * dev, struct aac_queue *q, u32 qid)
* the adapter. * the adapter.
*/ */
int fib_adapter_complete(struct fib * fibptr, unsigned short size) int aac_fib_adapter_complete(struct fib *fibptr, unsigned short size)
{ {
struct hw_fib * hw_fib = fibptr->hw_fib; struct hw_fib * hw_fib = fibptr->hw_fib;
struct aac_dev * dev = fibptr->dev; struct aac_dev * dev = fibptr->dev;
...@@ -683,20 +685,20 @@ int fib_adapter_complete(struct fib * fibptr, unsigned short size) ...@@ -683,20 +685,20 @@ int fib_adapter_complete(struct fib * fibptr, unsigned short size)
} }
else else
{ {
printk(KERN_WARNING "fib_adapter_complete: Unknown xferstate detected.\n"); printk(KERN_WARNING "aac_fib_adapter_complete: Unknown xferstate detected.\n");
BUG(); BUG();
} }
return 0; return 0;
} }
/** /**
* fib_complete - fib completion handler * aac_fib_complete - fib completion handler
* @fib: FIB to complete * @fib: FIB to complete
* *
* Will do all necessary work to complete a FIB. * Will do all necessary work to complete a FIB.
*/ */
int fib_complete(struct fib * fibptr) int aac_fib_complete(struct fib *fibptr)
{ {
struct hw_fib * hw_fib = fibptr->hw_fib; struct hw_fib * hw_fib = fibptr->hw_fib;
...@@ -995,14 +997,14 @@ static void aac_handle_aif(struct aac_dev * dev, struct fib * fibptr) ...@@ -995,14 +997,14 @@ static void aac_handle_aif(struct aac_dev * dev, struct fib * fibptr)
if (!dev || !dev->scsi_host_ptr) if (!dev || !dev->scsi_host_ptr)
return; return;
/* /*
* force reload of disk info via probe_container * force reload of disk info via aac_probe_container
*/ */
if ((device_config_needed == CHANGE) if ((device_config_needed == CHANGE)
&& (dev->fsa_dev[container].valid == 1)) && (dev->fsa_dev[container].valid == 1))
dev->fsa_dev[container].valid = 2; dev->fsa_dev[container].valid = 2;
if ((device_config_needed == CHANGE) || if ((device_config_needed == CHANGE) ||
(device_config_needed == ADD)) (device_config_needed == ADD))
probe_container(dev, container); aac_probe_container(dev, container);
device = scsi_device_lookup(dev->scsi_host_ptr, device = scsi_device_lookup(dev->scsi_host_ptr,
CONTAINER_TO_CHANNEL(container), CONTAINER_TO_CHANNEL(container),
CONTAINER_TO_ID(container), CONTAINER_TO_ID(container),
...@@ -1104,7 +1106,7 @@ int aac_command_thread(struct aac_dev * dev) ...@@ -1104,7 +1106,7 @@ int aac_command_thread(struct aac_dev * dev)
/* Handle Driver Notify Events */ /* Handle Driver Notify Events */
aac_handle_aif(dev, fib); aac_handle_aif(dev, fib);
*(__le32 *)hw_fib->data = cpu_to_le32(ST_OK); *(__le32 *)hw_fib->data = cpu_to_le32(ST_OK);
fib_adapter_complete(fib, (u16)sizeof(u32)); aac_fib_adapter_complete(fib, (u16)sizeof(u32));
} else { } else {
struct list_head *entry; struct list_head *entry;
/* The u32 here is important and intended. We are using /* The u32 here is important and intended. We are using
...@@ -1241,7 +1243,7 @@ int aac_command_thread(struct aac_dev * dev) ...@@ -1241,7 +1243,7 @@ int aac_command_thread(struct aac_dev * dev)
* Set the status of this FIB * Set the status of this FIB
*/ */
*(__le32 *)hw_fib->data = cpu_to_le32(ST_OK); *(__le32 *)hw_fib->data = cpu_to_le32(ST_OK);
fib_adapter_complete(fib, sizeof(u32)); aac_fib_adapter_complete(fib, sizeof(u32));
spin_unlock_irqrestore(&dev->fib_lock, flagv); spin_unlock_irqrestore(&dev->fib_lock, flagv);
/* Free up the remaining resources */ /* Free up the remaining resources */
hw_fib_p = hw_fib_pool; hw_fib_p = hw_fib_pool;
......
...@@ -206,7 +206,7 @@ unsigned int aac_command_normal(struct aac_queue *q) ...@@ -206,7 +206,7 @@ unsigned int aac_command_normal(struct aac_queue *q)
* Set the status of this FIB * Set the status of this FIB
*/ */
*(__le32 *)hw_fib->data = cpu_to_le32(ST_OK); *(__le32 *)hw_fib->data = cpu_to_le32(ST_OK);
fib_adapter_complete(fib, sizeof(u32)); aac_fib_adapter_complete(fib, sizeof(u32));
spin_lock_irqsave(q->lock, flags); spin_lock_irqsave(q->lock, flags);
} }
} }
......
...@@ -917,7 +917,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev, ...@@ -917,7 +917,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
aac_adapter_disable_int(aac); aac_adapter_disable_int(aac);
free_irq(pdev->irq, aac); free_irq(pdev->irq, aac);
out_unmap: out_unmap:
fib_map_free(aac); aac_fib_map_free(aac);
pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, aac->comm_phys); pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, aac->comm_phys);
kfree(aac->queues); kfree(aac->queues);
iounmap(aac->regs.sa); iounmap(aac->regs.sa);
...@@ -951,7 +951,7 @@ static void __devexit aac_remove_one(struct pci_dev *pdev) ...@@ -951,7 +951,7 @@ static void __devexit aac_remove_one(struct pci_dev *pdev)
aac_send_shutdown(aac); aac_send_shutdown(aac);
aac_adapter_disable_int(aac); aac_adapter_disable_int(aac);
fib_map_free(aac); aac_fib_map_free(aac);
pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr,
aac->comm_phys); aac->comm_phys);
kfree(aac->queues); kfree(aac->queues);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册