fibptr->next = fibptr+1; /* Forward chain the fibs */
init_MUTEX_LOCKED(&fibptr->event_wait);
spin_lock_init(&fibptr->event_lock);
- hw_fib_va->header.XferState = cpu_to_le32(0xffffffff);
+ hw_fib_va->header.XferState = 0xffffffff;
hw_fib_va->header.SenderSize = cpu_to_le16(sizeof(struct hw_fib));
fibptr->hw_fib_pa = hw_fib_pa;
hw_fib_va = (struct hw_fib *)((unsigned char *)hw_fib_va + sizeof(struct hw_fib));
* Null out fields that depend on being zero at the start of
* each I/O
*/
- fibptr->hw_fib->header.XferState = cpu_to_le32(0);
+ fibptr->hw_fib->header.XferState = 0;
fibptr->callback = NULL;
fibptr->callback_data = NULL;
} else {
if (fibptr->hw_fib->header.XferState != 0) {
printk(KERN_WARNING "fib_free, XferState != 0, fibptr = 0x%p, XferState = 0x%x\n",
- (void*)fibptr, fibptr->hw_fib->header.XferState);
+ (void*)fibptr,
+ le32_to_cpu(fibptr->hw_fib->header.XferState));
}
fibptr->next = fibptr->dev->free_fib;
fibptr->dev->free_fib = fibptr;
struct hw_fib *hw_fib = fibptr->hw_fib;
if(hw_fib->header.StructType != FIB_MAGIC)
BUG();
- hw_fib->header.XferState = cpu_to_le32(0);
+ hw_fib->header.XferState = 0;
}
/*
* in the queue entry.
*/
if (map)
- entry->addr = fibptr->hw_fib_pa;
+ entry->addr = cpu_to_le32(fibptr->hw_fib_pa);
return 0;
}
struct hw_fib * hw_fib = fibptr->hw_fib;
struct aac_queue * q;
unsigned long flags = 0;
- if (!(le32_to_cpu(hw_fib->header.XferState) & HostOwned))
+ if (!(hw_fib->header.XferState & cpu_to_le32(HostOwned)))
return -EBUSY;
/*
* There are 5 cases with the wait and reponse requested flags.
* The only invalid cases are if the caller requests to wait and
* does not request a response and if the caller does not want a
- * response and the Fibis not allocated from pool. If a response
+ * response and the Fib is not allocated from pool. If a response
* is not requesed the Fib will just be deallocaed by the DPC
* routine when the response comes back from the adapter. No
* further processing will be done besides deleting the Fib. We
return(status);
}
-int aac_consumer_avail(struct aac_dev *dev, struct aac_queue * q)
-{
- return (le32_to_cpu(*q->headers.producer) != le32_to_cpu(*q->headers.consumer));
-}
-
-
/**
* aac_consumer_free - free consumer entry
* @dev: Adapter
struct hw_fib * hw_fib = fibptr->hw_fib;
struct aac_dev * dev = fibptr->dev;
unsigned long nointr = 0;
- if (le32_to_cpu(hw_fib->header.XferState) == 0)
+ if (hw_fib->header.XferState == 0)
return 0;
/*
* If we plan to do anything check the structure type first.
* Check for a fib which has already been completed
*/
- if (hw_fib->header.XferState == cpu_to_le32(0))
+ if (hw_fib->header.XferState == 0)
return 0;
/*
* If we plan to do anything check the structure type first.