int status = 0;
struct fib * fibptr;
- if (!(fibptr = fib_alloc(dev)))
+ if (!(fibptr = aac_fib_alloc(dev)))
return -ENOMEM;
- fib_init(fibptr);
+ aac_fib_init(fibptr);
{
struct aac_get_config_status *dinfo;
dinfo = (struct aac_get_config_status *) fib_data(fibptr);
dinfo->count = cpu_to_le32(sizeof(((struct aac_get_config_status_resp *)NULL)->data));
}
- status = fib_send(ContainerCommand,
+ status = aac_fib_send(ContainerCommand,
fibptr,
sizeof (struct aac_get_config_status),
FsaNormal,
status = -EINVAL;
}
}
- fib_complete(fibptr);
+ aac_fib_complete(fibptr);
/* Send a CT_COMMIT_CONFIG to enable discovery of devices */
if (status >= 0) {
if (commit == 1) {
struct aac_commit_config * dinfo;
- fib_init(fibptr);
+ aac_fib_init(fibptr);
dinfo = (struct aac_commit_config *) fib_data(fibptr);
dinfo->command = cpu_to_le32(VM_ContainerConfig);
dinfo->type = cpu_to_le32(CT_COMMIT_CONFIG);
- status = fib_send(ContainerCommand,
+ status = aac_fib_send(ContainerCommand,
fibptr,
sizeof (struct aac_commit_config),
FsaNormal,
1, 1,
NULL, NULL);
- fib_complete(fibptr);
+ aac_fib_complete(fibptr);
} else if (commit == 0) {
printk(KERN_WARNING
"aac_get_config_status: Foreign device configurations are being ignored\n");
}
}
- fib_free(fibptr);
+ aac_fib_free(fibptr);
return status;
}
instance = dev->scsi_host_ptr->unique_id;
- if (!(fibptr = fib_alloc(dev)))
+ if (!(fibptr = aac_fib_alloc(dev)))
return -ENOMEM;
- fib_init(fibptr);
+ aac_fib_init(fibptr);
dinfo = (struct aac_get_container_count *) fib_data(fibptr);
dinfo->command = cpu_to_le32(VM_ContainerConfig);
dinfo->type = cpu_to_le32(CT_GET_CONTAINER_COUNT);
- status = fib_send(ContainerCommand,
+ status = aac_fib_send(ContainerCommand,
fibptr,
sizeof (struct aac_get_container_count),
FsaNormal,
if (status >= 0) {
dresp = (struct aac_get_container_count_resp *)fib_data(fibptr);
maximum_num_containers = le32_to_cpu(dresp->ContainerSwitchEntries);
- fib_complete(fibptr);
+ aac_fib_complete(fibptr);
}
if (maximum_num_containers < MAXIMUM_NUM_CONTAINERS)
fsa_dev_ptr = (struct fsa_dev_info *) kmalloc(
sizeof(*fsa_dev_ptr) * maximum_num_containers, GFP_KERNEL);
if (!fsa_dev_ptr) {
- fib_free(fibptr);
+ aac_fib_free(fibptr);
return -ENOMEM;
}
memset(fsa_dev_ptr, 0, sizeof(*fsa_dev_ptr) * maximum_num_containers);
fsa_dev_ptr[index].devname[0] = '\0';
- fib_init(fibptr);
+ aac_fib_init(fibptr);
dinfo = (struct aac_query_mount *) fib_data(fibptr);
dinfo->command = cpu_to_le32(VM_NameServe);
dinfo->count = cpu_to_le32(index);
dinfo->type = cpu_to_le32(FT_FILESYS);
- status = fib_send(ContainerCommand,
+ status = aac_fib_send(ContainerCommand,
fibptr,
sizeof (struct aac_query_mount),
FsaNormal,
dinfo->count = cpu_to_le32(index);
dinfo->type = cpu_to_le32(FT_FILESYS);
- if (fib_send(ContainerCommand,
+ if (aac_fib_send(ContainerCommand,
fibptr,
sizeof(struct aac_query_mount),
FsaNormal,
if (le32_to_cpu(dresp->mnt[0].state) & FSCS_READONLY)
fsa_dev_ptr[index].ro = 1;
}
- fib_complete(fibptr);
+ aac_fib_complete(fibptr);
/*
* If there are no more containers, then stop asking.
*/
break;
}
}
- fib_free(fibptr);
+ aac_fib_free(fibptr);
return status;
}
scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_GOOD;
- fib_complete(fibptr);
- fib_free(fibptr);
+ aac_fib_complete(fibptr);
+ aac_fib_free(fibptr);
scsicmd->scsi_done(scsicmd);
}
dev = (struct aac_dev *)scsicmd->device->host->hostdata;
- if (!(cmd_fibcontext = fib_alloc(dev)))
+ if (!(cmd_fibcontext = aac_fib_alloc(dev)))
return -ENOMEM;
- fib_init(cmd_fibcontext);
+ aac_fib_init(cmd_fibcontext);
dinfo = (struct aac_get_name *) fib_data(cmd_fibcontext);
dinfo->command = cpu_to_le32(VM_ContainerConfig);
dinfo->cid = cpu_to_le32(cid);
dinfo->count = cpu_to_le32(sizeof(((struct aac_get_name_resp *)NULL)->data));
- status = fib_send(ContainerCommand,
+ status = aac_fib_send(ContainerCommand,
cmd_fibcontext,
sizeof (struct aac_get_name),
FsaNormal,
if (status == -EINPROGRESS)
return 0;
- printk(KERN_WARNING "aac_get_container_name: fib_send failed with status: %d.\n", status);
- fib_complete(cmd_fibcontext);
- fib_free(cmd_fibcontext);
+ printk(KERN_WARNING "aac_get_container_name: aac_fib_send failed with status: %d.\n", status);
+ aac_fib_complete(cmd_fibcontext);
+ aac_fib_free(cmd_fibcontext);
return -1;
}
/**
- * probe_container - query a logical volume
+ * aac_probe_container - query a logical volume
* @dev: device to query
* @cid: container identifier
*
* 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;
int status;
fsa_dev_ptr = dev->fsa_dev;
instance = dev->scsi_host_ptr->unique_id;
- if (!(fibptr = fib_alloc(dev)))
+ if (!(fibptr = aac_fib_alloc(dev)))
return -ENOMEM;
- fib_init(fibptr);
+ aac_fib_init(fibptr);
dinfo = (struct aac_query_mount *)fib_data(fibptr);
dinfo->count = cpu_to_le32(cid);
dinfo->type = cpu_to_le32(FT_FILESYS);
- status = fib_send(ContainerCommand,
+ status = aac_fib_send(ContainerCommand,
fibptr,
sizeof(struct aac_query_mount),
FsaNormal,
1, 1,
NULL, NULL);
if (status < 0) {
- printk(KERN_WARNING "aacraid: probe_container query failed.\n");
+ printk(KERN_WARNING "aacraid: aac_probe_container query failed.\n");
goto error;
}
dinfo->count = cpu_to_le32(cid);
dinfo->type = cpu_to_le32(FT_FILESYS);
- if (fib_send(ContainerCommand,
+ if (aac_fib_send(ContainerCommand,
fibptr,
sizeof(struct aac_query_mount),
FsaNormal,
}
error:
- fib_complete(fibptr);
- fib_free(fibptr);
+ aac_fib_complete(fibptr);
+ aac_fib_free(fibptr);
return status;
}
struct aac_bus_info *command;
struct aac_bus_info_response *bus_info;
- if (!(fibptr = fib_alloc(dev)))
+ if (!(fibptr = aac_fib_alloc(dev)))
return -ENOMEM;
- fib_init(fibptr);
+ aac_fib_init(fibptr);
info = (struct aac_adapter_info *) fib_data(fibptr);
memset(info,0,sizeof(*info));
- rcode = fib_send(RequestAdapterInfo,
+ rcode = aac_fib_send(RequestAdapterInfo,
fibptr,
sizeof(*info),
FsaNormal,
NULL);
if (rcode < 0) {
- fib_complete(fibptr);
- fib_free(fibptr);
+ aac_fib_complete(fibptr);
+ aac_fib_free(fibptr);
return rcode;
}
memcpy(&dev->adapter_info, info, sizeof(*info));
if (dev->adapter_info.options & AAC_OPT_SUPPLEMENT_ADAPTER_INFO) {
struct aac_supplement_adapter_info * info;
- fib_init(fibptr);
+ aac_fib_init(fibptr);
info = (struct aac_supplement_adapter_info *) fib_data(fibptr);
memset(info,0,sizeof(*info));
- rcode = fib_send(RequestSupplementAdapterInfo,
+ rcode = aac_fib_send(RequestSupplementAdapterInfo,
fibptr,
sizeof(*info),
FsaNormal,
* GetBusInfo
*/
- fib_init(fibptr);
+ aac_fib_init(fibptr);
bus_info = (struct aac_bus_info_response *) fib_data(fibptr);
command->MethodId = cpu_to_le32(1);
command->CtlCmd = cpu_to_le32(GetBusInfo);
- rcode = fib_send(ContainerCommand,
+ rcode = aac_fib_send(ContainerCommand,
fibptr,
sizeof (*bus_info),
FsaNormal,
}
}
- fib_complete(fibptr);
- fib_free(fibptr);
+ aac_fib_complete(fibptr);
+ aac_fib_free(fibptr);
return rcode;
}
? sizeof(scsicmd->sense_buffer)
: sizeof(dev->fsa_dev[cid].sense_data));
}
- fib_complete(fibptr);
- fib_free(fibptr);
+ aac_fib_complete(fibptr);
+ aac_fib_free(fibptr);
scsicmd->scsi_done(scsicmd);
}
/*
* Alocate and initialize a Fib
*/
- if (!(cmd_fibcontext = fib_alloc(dev))) {
+ if (!(cmd_fibcontext = aac_fib_alloc(dev))) {
return -1;
}
- fib_init(cmd_fibcontext);
+ aac_fib_init(cmd_fibcontext);
if (dev->raw_io_interface) {
struct aac_raw_io *readcmd;
/*
* Now send the Fib to the adapter
*/
- status = fib_send(ContainerRawIo,
+ status = aac_fib_send(ContainerRawIo,
cmd_fibcontext,
fibsize,
FsaNormal,
/*
* Now send the Fib to the adapter
*/
- status = fib_send(ContainerCommand64,
+ status = aac_fib_send(ContainerCommand64,
cmd_fibcontext,
fibsize,
FsaNormal,
/*
* Now send the Fib to the adapter
*/
- status = fib_send(ContainerCommand,
+ status = aac_fib_send(ContainerCommand,
cmd_fibcontext,
fibsize,
FsaNormal,
if (status == -EINPROGRESS)
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
*/
scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_TASK_SET_FULL;
scsicmd->scsi_done(scsicmd);
- fib_complete(cmd_fibcontext);
- fib_free(cmd_fibcontext);
+ aac_fib_complete(cmd_fibcontext);
+ aac_fib_free(cmd_fibcontext);
return 0;
}
/*
* 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->scsi_done(scsicmd);
return 0;
}
- fib_init(cmd_fibcontext);
+ aac_fib_init(cmd_fibcontext);
if (dev->raw_io_interface) {
struct aac_raw_io *writecmd;
/*
* Now send the Fib to the adapter
*/
- status = fib_send(ContainerRawIo,
+ status = aac_fib_send(ContainerRawIo,
cmd_fibcontext,
fibsize,
FsaNormal,
/*
* Now send the Fib to the adapter
*/
- status = fib_send(ContainerCommand64,
+ status = aac_fib_send(ContainerCommand64,
cmd_fibcontext,
fibsize,
FsaNormal,
/*
* Now send the Fib to the adapter
*/
- status = fib_send(ContainerCommand,
+ status = aac_fib_send(ContainerCommand,
cmd_fibcontext,
fibsize,
FsaNormal,
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
*/
scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_TASK_SET_FULL;
scsicmd->scsi_done(scsicmd);
- fib_complete(cmd_fibcontext);
- fib_free(cmd_fibcontext);
+ aac_fib_complete(cmd_fibcontext);
+ aac_fib_free(cmd_fibcontext);
return 0;
}
sizeof(cmd->sense_buffer)));
}
- fib_complete(fibptr);
- fib_free(fibptr);
+ aac_fib_complete(fibptr);
+ aac_fib_free(fibptr);
cmd->scsi_done(cmd);
}
* Allocate and initialize a Fib
*/
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;
- fib_init(cmd_fibcontext);
+ aac_fib_init(cmd_fibcontext);
synchronizecmd = fib_data(cmd_fibcontext);
synchronizecmd->command = cpu_to_le32(VM_ContainerConfig);
/*
* Now send the Fib to the adapter
*/
- status = fib_send(ContainerCommand,
+ status = aac_fib_send(ContainerCommand,
cmd_fibcontext,
sizeof(struct aac_synchronize),
FsaNormal,
return 0;
printk(KERN_WARNING
- "aac_synchronize: fib_send failed with status: %d.\n", status);
- fib_complete(cmd_fibcontext);
- fib_free(cmd_fibcontext);
+ "aac_synchronize: aac_fib_send failed with status: %d.\n", status);
+ aac_fib_complete(cmd_fibcontext);
+ aac_fib_free(cmd_fibcontext);
return SCSI_MLQUEUE_HOST_BUSY;
}
case READ_CAPACITY:
case TEST_UNIT_READY:
spin_unlock_irq(host->host_lock);
- probe_container(dev, cid);
+ aac_probe_container(dev, cid);
if ((fsa_dev_ptr[cid].valid & 1) == 0)
fsa_dev_ptr[cid].valid = 0;
spin_lock_irq(host->host_lock);
*/
scsicmd->result |= le32_to_cpu(srbreply->scsi_status);
- fib_complete(fibptr);
- fib_free(fibptr);
+ aac_fib_complete(fibptr);
+ aac_fib_free(fibptr);
scsicmd->scsi_done(scsicmd);
}
/*
* 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;
}
- fib_init(cmd_fibcontext);
+ aac_fib_init(cmd_fibcontext);
srbcmd = (struct aac_srb*) fib_data(cmd_fibcontext);
srbcmd->function = cpu_to_le32(SRBF_ExecuteScsi);
/*
* Now send the Fib to the adapter
*/
- status = fib_send(ScsiPortCommand64, cmd_fibcontext,
+ status = aac_fib_send(ScsiPortCommand64, cmd_fibcontext,
fibsize, FsaNormal, 0, 1,
(fib_callback) aac_srb_callback,
(void *) scsicmd);
/*
* 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);
}
/*
return 0;
}
- printk(KERN_WARNING "aac_srb: fib_send failed with status: %d\n", status);
- fib_complete(cmd_fibcontext);
- fib_free(cmd_fibcontext);
+ printk(KERN_WARNING "aac_srb: aac_fib_send failed with status: %d\n", status);
+ aac_fib_complete(cmd_fibcontext);
+ aac_fib_free(cmd_fibcontext);
return -1;
}
}
/**
- * fib_map_free - free the fib objects
+ * aac_fib_map_free - free the fib objects
* @dev: Adapter to free
*
* Free the PCI mappings and the memory allocated for FIB blocks
* 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);
}
/**
- * fib_setup - setup the fibs
+ * aac_fib_setup - setup the fibs
* @dev: Adapter to set up
*
* Allocate the PCI space for the fibs, map it and then intialise the
* 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 hw_fib *hw_fib_va;
}
/**
- * fib_alloc - allocate a fib
+ * aac_fib_alloc - allocate a fib
* @dev: Adapter to allocate the fib for
*
* Allocate a fib from the adapter fib pool. If the pool is empty we
* return NULL.
*/
-struct fib * fib_alloc(struct aac_dev *dev)
+struct fib *aac_fib_alloc(struct aac_dev *dev)
{
struct fib * fibptr;
unsigned long flags;
}
/**
- * fib_free - free a fib
+ * aac_fib_free - free a fib
* @fibptr: fib to free up
*
* Frees up a fib and places it on the appropriate queue
* (either free or timed out)
*/
-void fib_free(struct fib * fibptr)
+void aac_fib_free(struct fib *fibptr)
{
unsigned long flags;
fibptr->dev->timeout_fib = fibptr;
} else {
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,
le32_to_cpu(fibptr->hw_fib->header.XferState));
}
}
/**
- * fib_init - initialise a fib
+ * aac_fib_init - initialise a fib
* @fibptr: The fib to initialize
*
* 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;
*/
/**
- * fib_send - send a fib to the adapter
+ * aac_fib_send - send a fib to the adapter
* @command: Command to send
* @fibptr: The fib
* @size: Size of fib data area
* 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 hw_fib * hw_fib = fibptr->hw_fib;
q->numpending++;
*(q->headers.producer) = cpu_to_le32(index + 1);
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))
aac_adapter_notify(dev, AdapNormCmdQueue);
}
list_del(&fibptr->queue);
spin_unlock_irqrestore(q->lock, qflags);
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"
"update mother board BIOS or consider utilizing one of\n"
"the SAFE mode kernel options (acpi, apic etc)\n");
}
/**
- * fib_adapter_complete - complete adapter issued fib
+ * aac_fib_adapter_complete - complete adapter issued fib
* @fibptr: fib to complete
* @size: size of fib
*
* 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 aac_dev * dev = fibptr->dev;
}
else
{
- printk(KERN_WARNING "fib_adapter_complete: Unknown xferstate detected.\n");
+ printk(KERN_WARNING "aac_fib_adapter_complete: Unknown xferstate detected.\n");
BUG();
}
return 0;
}
/**
- * fib_complete - fib completion handler
+ * aac_fib_complete - fib completion handler
* @fib: FIB to complete
*
* 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;
if (!dev || !dev->scsi_host_ptr)
return;
/*
- * force reload of disk info via probe_container
+ * force reload of disk info via aac_probe_container
*/
if ((device_config_needed == CHANGE)
&& (dev->fsa_dev[container].valid == 1))
dev->fsa_dev[container].valid = 2;
if ((device_config_needed == CHANGE) ||
(device_config_needed == ADD))
- probe_container(dev, container);
+ aac_probe_container(dev, container);
device = scsi_device_lookup(dev->scsi_host_ptr,
CONTAINER_TO_CHANNEL(container),
CONTAINER_TO_ID(container),
/* Handle Driver Notify Events */
aac_handle_aif(dev, fib);
*(__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 {
struct list_head *entry;
/* The u32 here is important and intended. We are using
* Set the status of this FIB
*/
*(__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);
/* Free up the remaining resources */
hw_fib_p = hw_fib_pool;