hw_fib
struct hw_fib *hw_fib_va; /* also used for native */
struct hw_fib *hw_fib_va; /* also used for native cmd */
struct hw_fib *aif_base_va;
int aac_queue_get(struct aac_dev * dev, u32 * index, u32 qid, struct hw_fib * hw_fib, int wait, struct fib * fibptr, unsigned long *nonotify);
struct hw_fib *aif_fib);
memcpy(kfib, hw_fib, dev->max_fib_size);
if (hw_fib) {
fibptr->hw_fib_va = hw_fib;
if (copy_to_user(f.fib, fib->hw_fib_va, sizeof(struct hw_fib))) {
struct hw_fib * kfib;
struct hw_fib * hw_fib = (struct hw_fib *)0;
hw_fib = fibptr->hw_fib_va;
if (dev->max_fib_size != sizeof(struct hw_fib))
dev->aif_base_va = (struct hw_fib *)base;
init->r7.adapter_fib_align = cpu_to_le32(sizeof(struct hw_fib));
dev->max_fib_size = sizeof(struct hw_fib);
struct hw_fib * hw_fib = fibptr->hw_fib_va;
struct aac_aifcmd * aifcmd = (struct aac_aifcmd *)hw_fib->data;
struct hw_fib *hw_fib;
hw_fib = (struct hw_fib *)((unsigned char *)dev->hw_fib_va +
hw_fib = (struct hw_fib *)((unsigned char *)hw_fib +
fibptr->hw_fib_va = hw_fib;
hw_fib->header.XferState = cpu_to_le32(0xffffffff);
hw_fib->header.SenderSize =
hw_fib = (struct hw_fib *)((unsigned char *)hw_fib +
/ sizeof(struct hw_fib); /* some extra */
static int fillup_pools(struct aac_dev *dev, struct hw_fib **hw_fib_pool,
struct hw_fib **hw_fib_p;
*(hw_fib_p) = kmalloc_obj(struct hw_fib);
struct hw_fib **hw_fib_pool,
struct hw_fib *hw_fib,
struct hw_fib **hw_fib_p;
struct hw_fib *hw_newfib;
memcpy(hw_newfib, hw_fib, sizeof(struct hw_fib));
*(__le32 *)hw_fib->data = cpu_to_le32(ST_OK);
struct hw_fib *hw_fib;
struct hw_fib **hw_fib_pool, **hw_fib_p;
hw_fib = fib->hw_fib_va;
fib->hw_fib_va = hw_fib;
fib->data = hw_fib->data;
aifcmd = (struct aac_aifcmd *) hw_fib->data;
*(__le32 *)hw_fib->data = cpu_to_le32(ST_OK);
hw_fib_pool = kmalloc_objs(struct hw_fib *, num);
fib, hw_fib, num);
struct hw_fib *hw_fib = fibptr->hw_fib_va;
memset(&hw_fib->header, 0, sizeof(struct aac_fibhdr));
hw_fib->header.StructType = FIB_MAGIC;
hw_fib->header.Size = cpu_to_le16(fibptr->dev->max_fib_size);
hw_fib->header.XferState = cpu_to_le32(HostOwned | FibInitialized | FibEmpty | FastResponseCapable);
hw_fib->header.u.ReceiverFibAddress = cpu_to_le32(fibptr->hw_fib_pa);
hw_fib->header.SenderSize = cpu_to_le16(fibptr->dev->max_fib_size);
struct hw_fib *hw_fib = fibptr->hw_fib_va;
hw_fib->header.XferState = 0;
int aac_queue_get(struct aac_dev * dev, u32 * index, u32 qid, struct hw_fib * hw_fib, int wait, struct fib * fibptr, unsigned long *nonotify)
entry->size = cpu_to_le32(le16_to_cpu(hw_fib->header.Size));
entry->size = cpu_to_le32(le16_to_cpu(hw_fib->header.Size));
entry->addr = hw_fib->header.SenderFibAddress;
hw_fib->header.u.ReceiverFibAddress = hw_fib->header.SenderFibAddress; /* Let the adapter now where to find its data */
struct hw_fib * hw_fib = fibptr->hw_fib_va;
if (!(hw_fib->header.XferState & cpu_to_le32(HostOwned)))
if (hw_fib->header.XferState & cpu_to_le32(AdapterProcessed))
hw_fib->header.XferState |= cpu_to_le32(Async | ResponseExpected);
hw_fib->header.XferState |= cpu_to_le32(NoResponseExpected);
hw_fib->header.XferState |= cpu_to_le32(ResponseExpected);
hw_fib->header.SenderFibAddress =
hw_fib->header.Handle =
hw_fib->header.Command = cpu_to_le16(command);
hw_fib->header.XferState |= cpu_to_le32(SentFromHost);
hw_fib->header.Size = cpu_to_le16(sizeof(struct aac_fibhdr) + size);
if (le16_to_cpu(hw_fib->header.Size) > le16_to_cpu(hw_fib->header.SenderSize)) {
hw_fib->header.XferState |= cpu_to_le32(NormalPriority);
dprintk((KERN_DEBUG " Command = %d.\n", le32_to_cpu(hw_fib->header.Command)));
dprintk((KERN_DEBUG " XferState = %x.\n", le32_to_cpu(hw_fib->header.XferState)));
struct hw_fib * hw_fib = fibptr->hw_fib_va;
kfree(hw_fib);
if (hw_fib->header.XferState == 0) {
kfree(hw_fib);
if (hw_fib->header.StructType != FIB_MAGIC &&
hw_fib->header.StructType != FIB_MAGIC2 &&
hw_fib->header.StructType != FIB_MAGIC2_64) {
kfree(hw_fib);
if (hw_fib->header.XferState & cpu_to_le32(SentFromAdapter)) {
kfree (hw_fib);
hw_fib->header.XferState |= cpu_to_le32(HostProcessed);
if (size > le16_to_cpu(hw_fib->header.SenderSize))
hw_fib->header.Size = cpu_to_le16(size);
aac_queue_get(dev, &index, AdapNormRespQueue, hw_fib, 1, NULL, &nointr);
struct hw_fib * hw_fib = fibptr->hw_fib_va;
if (hw_fib->header.XferState == 0 || fibptr->done == 2)
if (hw_fib->header.StructType != FIB_MAGIC &&
hw_fib->header.StructType != FIB_MAGIC2 &&
hw_fib->header.StructType != FIB_MAGIC2_64)
if((hw_fib->header.XferState & cpu_to_le32(SentFromHost)) &&
(hw_fib->header.XferState & cpu_to_le32(AdapterProcessed)))
else if(hw_fib->header.XferState & cpu_to_le32(SentFromHost))
} else if(hw_fib->header.XferState & cpu_to_le32(HostOwned)) {
struct hw_fib * hw_fib;
index = le32_to_cpu(entry->addr) / sizeof(struct hw_fib);
hw_fib = &dev->aif_base_va[index];
fib->hw_fib_va = hw_fib;
fib->data = hw_fib->data;
*(__le32 *)hw_fib->data = cpu_to_le32(ST_OK);
sizeof(struct hw_fib)-sizeof(struct aac_fibhdr),
int isFastResponse, struct hw_fib *aif_fib)
struct hw_fib * hw_fib;
if (!(hw_fib = kzalloc_obj(struct hw_fib, GFP_ATOMIC))) {
memcpy(hw_fib, aif_fib, sizeof(struct hw_fib));
memcpy(hw_fib, (struct hw_fib *)
sizeof(struct hw_fib));
fib->hw_fib_va = hw_fib;
fib->data = hw_fib->data;
sizeof(struct hw_fib)-sizeof(struct aac_fibhdr),
struct hw_fib *hwfib = fib->hw_fib_va;
struct hw_fib * hwfib;