Lines Matching refs:hw_fib
150 struct hw_fib *hw_fib; in aac_fib_setup() local
171 hw_fib = (struct hw_fib *)((unsigned char *)dev->hw_fib_va + in aac_fib_setup()
175 hw_fib = (struct hw_fib *)((unsigned char *)hw_fib + in aac_fib_setup()
189 fibptr->hw_fib_va = hw_fib; in aac_fib_setup()
194 hw_fib->header.XferState = cpu_to_le32(0xffffffff); in aac_fib_setup()
195 hw_fib->header.SenderSize = in aac_fib_setup()
207 hw_fib = (struct hw_fib *)((unsigned char *)hw_fib + in aac_fib_setup()
328 struct hw_fib *hw_fib = fibptr->hw_fib_va; in aac_fib_init() local
330 memset(&hw_fib->header, 0, sizeof(struct aac_fibhdr)); in aac_fib_init()
331 hw_fib->header.StructType = FIB_MAGIC; in aac_fib_init()
332 hw_fib->header.Size = cpu_to_le16(fibptr->dev->max_fib_size); in aac_fib_init()
333 …hw_fib->header.XferState = cpu_to_le32(HostOwned | FibInitialized | FibEmpty | FastResponseCapable… in aac_fib_init()
334 hw_fib->header.u.ReceiverFibAddress = cpu_to_le32(fibptr->hw_fib_pa); in aac_fib_init()
335 hw_fib->header.SenderSize = cpu_to_le16(fibptr->dev->max_fib_size); in aac_fib_init()
348 struct hw_fib *hw_fib = fibptr->hw_fib_va; in fib_dealloc() local
349 hw_fib->header.XferState = 0; in fib_dealloc()
434 int aac_queue_get(struct aac_dev * dev, u32 * index, u32 qid, struct hw_fib * hw_fib, int wait, str… in aac_queue_get() argument
447 entry->size = cpu_to_le32(le16_to_cpu(hw_fib->header.Size)); in aac_queue_get()
456 entry->size = cpu_to_le32(le16_to_cpu(hw_fib->header.Size)); in aac_queue_get()
457 entry->addr = hw_fib->header.SenderFibAddress; in aac_queue_get()
459 …hw_fib->header.u.ReceiverFibAddress = hw_fib->header.SenderFibAddress; /* Let the adapter now whe… in aac_queue_get()
501 struct hw_fib * hw_fib = fibptr->hw_fib_va; in aac_fib_send() local
506 if (!(hw_fib->header.XferState & cpu_to_le32(HostOwned))) in aac_fib_send()
509 if (hw_fib->header.XferState & cpu_to_le32(AdapterProcessed)) in aac_fib_send()
527 hw_fib->header.XferState |= cpu_to_le32(Async | ResponseExpected); in aac_fib_send()
530 hw_fib->header.XferState |= cpu_to_le32(NoResponseExpected); in aac_fib_send()
533 hw_fib->header.XferState |= cpu_to_le32(ResponseExpected); in aac_fib_send()
540 hw_fib->header.SenderFibAddress = in aac_fib_send()
546 hw_fib->header.Handle = in aac_fib_send()
556 hw_fib->header.Command = cpu_to_le16(command); in aac_fib_send()
557 hw_fib->header.XferState |= cpu_to_le32(SentFromHost); in aac_fib_send()
561 hw_fib->header.Size = cpu_to_le16(sizeof(struct aac_fibhdr) + size); in aac_fib_send()
562 if (le16_to_cpu(hw_fib->header.Size) > le16_to_cpu(hw_fib->header.SenderSize)) { in aac_fib_send()
569 hw_fib->header.XferState |= cpu_to_le32(NormalPriority); in aac_fib_send()
586 dprintk((KERN_DEBUG " Command = %d.\n", le32_to_cpu(hw_fib->header.Command))); in aac_fib_send()
588 dprintk((KERN_DEBUG " XferState = %x.\n", le32_to_cpu(hw_fib->header.XferState))); in aac_fib_send()
886 struct hw_fib * hw_fib = fibptr->hw_fib_va; in aac_fib_adapter_complete() local
895 kfree(hw_fib); in aac_fib_adapter_complete()
899 if (hw_fib->header.XferState == 0) { in aac_fib_adapter_complete()
901 kfree(hw_fib); in aac_fib_adapter_complete()
907 if (hw_fib->header.StructType != FIB_MAGIC && in aac_fib_adapter_complete()
908 hw_fib->header.StructType != FIB_MAGIC2 && in aac_fib_adapter_complete()
909 hw_fib->header.StructType != FIB_MAGIC2_64) { in aac_fib_adapter_complete()
911 kfree(hw_fib); in aac_fib_adapter_complete()
921 if (hw_fib->header.XferState & cpu_to_le32(SentFromAdapter)) { in aac_fib_adapter_complete()
923 kfree (hw_fib); in aac_fib_adapter_complete()
926 hw_fib->header.XferState |= cpu_to_le32(HostProcessed); in aac_fib_adapter_complete()
929 if (size > le16_to_cpu(hw_fib->header.SenderSize)) in aac_fib_adapter_complete()
931 hw_fib->header.Size = cpu_to_le16(size); in aac_fib_adapter_complete()
935 aac_queue_get(dev, &index, AdapNormRespQueue, hw_fib, 1, NULL, &nointr); in aac_fib_adapter_complete()
958 struct hw_fib * hw_fib = fibptr->hw_fib_va; in aac_fib_complete() local
970 if (hw_fib->header.XferState == 0 || fibptr->done == 2) in aac_fib_complete()
976 if (hw_fib->header.StructType != FIB_MAGIC && in aac_fib_complete()
977 hw_fib->header.StructType != FIB_MAGIC2 && in aac_fib_complete()
978 hw_fib->header.StructType != FIB_MAGIC2_64) in aac_fib_complete()
987 if((hw_fib->header.XferState & cpu_to_le32(SentFromHost)) && in aac_fib_complete()
988 (hw_fib->header.XferState & cpu_to_le32(AdapterProcessed))) in aac_fib_complete()
992 else if(hw_fib->header.XferState & cpu_to_le32(SentFromHost)) in aac_fib_complete()
999 } else if(hw_fib->header.XferState & cpu_to_le32(HostOwned)) { in aac_fib_complete()
1078 struct hw_fib * hw_fib = fibptr->hw_fib_va; in aac_handle_aif() local
1079 struct aac_aifcmd * aifcmd = (struct aac_aifcmd *)hw_fib->data; in aac_handle_aif()
1774 struct hw_fib * hw_fib; in aac_check_health() local
1802 hw_fib = kzalloc(sizeof(struct hw_fib), GFP_ATOMIC); in aac_check_health()
1804 if (fib && hw_fib) { in aac_check_health()
1807 fib->hw_fib_va = hw_fib; in aac_check_health()
1812 fib->data = hw_fib->data; in aac_check_health()
1813 aif = (struct aac_aifcmd *)hw_fib->data; in aac_check_health()
1835 kfree(hw_fib); in aac_check_health()
2040 / sizeof(struct hw_fib); /* some extra */ in get_fib_count()
2052 static int fillup_pools(struct aac_dev *dev, struct hw_fib **hw_fib_pool, in fillup_pools()
2056 struct hw_fib **hw_fib_p; in fillup_pools()
2062 *(hw_fib_p) = kmalloc(sizeof(struct hw_fib), GFP_KERNEL); in fillup_pools()
2083 struct hw_fib **hw_fib_pool, in wakeup_fibctx_threads()
2086 struct hw_fib *hw_fib, in wakeup_fibctx_threads() argument
2091 struct hw_fib **hw_fib_p; in wakeup_fibctx_threads()
2094 struct hw_fib *hw_newfib; in wakeup_fibctx_threads()
2155 memcpy(hw_newfib, hw_fib, sizeof(struct hw_fib)); in wakeup_fibctx_threads()
2175 *(__le32 *)hw_fib->data = cpu_to_le32(ST_OK); in wakeup_fibctx_threads()
2183 struct hw_fib *hw_fib; in aac_process_events() local
2195 struct hw_fib **hw_fib_pool, **hw_fib_p; in aac_process_events()
2207 hw_fib = fib->hw_fib_va; in aac_process_events()
2223 fib->hw_fib_va = hw_fib; in aac_process_events()
2224 fib->data = hw_fib->data; in aac_process_events()
2230 aifcmd = (struct aac_aifcmd *) hw_fib->data; in aac_process_events()
2234 *(__le32 *)hw_fib->data = cpu_to_le32(ST_OK); in aac_process_events()
2256 hw_fib_pool = kmalloc_array(num, sizeof(struct hw_fib *), in aac_process_events()
2278 fib, hw_fib, num); in aac_process_events()