Lines Matching refs:hw_fib

135 	struct hw_fib *hw_fib;  in aac_fib_setup()  local
156 hw_fib = (struct hw_fib *)((unsigned char *)dev->hw_fib_va + in aac_fib_setup()
160 hw_fib = (struct hw_fib *)((unsigned char *)hw_fib + in aac_fib_setup()
174 fibptr->hw_fib_va = hw_fib; in aac_fib_setup()
179 hw_fib->header.XferState = cpu_to_le32(0xffffffff); in aac_fib_setup()
180 hw_fib->header.SenderSize = in aac_fib_setup()
192 hw_fib = (struct hw_fib *)((unsigned char *)hw_fib + in aac_fib_setup()
315 struct hw_fib *hw_fib = fibptr->hw_fib_va; in aac_fib_init() local
317 memset(&hw_fib->header, 0, sizeof(struct aac_fibhdr)); in aac_fib_init()
318 hw_fib->header.StructType = FIB_MAGIC; in aac_fib_init()
319 hw_fib->header.Size = cpu_to_le16(fibptr->dev->max_fib_size); in aac_fib_init()
320hw_fib->header.XferState = cpu_to_le32(HostOwned | FibInitialized | FibEmpty | FastResponseCapable… in aac_fib_init()
321 hw_fib->header.u.ReceiverFibAddress = cpu_to_le32(fibptr->hw_fib_pa); in aac_fib_init()
322 hw_fib->header.SenderSize = cpu_to_le16(fibptr->dev->max_fib_size); in aac_fib_init()
335 struct hw_fib *hw_fib = fibptr->hw_fib_va; in fib_dealloc() local
336 hw_fib->header.XferState = 0; in fib_dealloc()
421 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
434 entry->size = cpu_to_le32(le16_to_cpu(hw_fib->header.Size)); in aac_queue_get()
443 entry->size = cpu_to_le32(le16_to_cpu(hw_fib->header.Size)); in aac_queue_get()
444 entry->addr = hw_fib->header.SenderFibAddress; in aac_queue_get()
446hw_fib->header.u.ReceiverFibAddress = hw_fib->header.SenderFibAddress; /* Let the adapter now whe… in aac_queue_get()
488 struct hw_fib * hw_fib = fibptr->hw_fib_va; in aac_fib_send() local
493 if (!(hw_fib->header.XferState & cpu_to_le32(HostOwned))) in aac_fib_send()
496 if (hw_fib->header.XferState & cpu_to_le32(AdapterProcessed)) in aac_fib_send()
514 hw_fib->header.XferState |= cpu_to_le32(Async | ResponseExpected); in aac_fib_send()
517 hw_fib->header.XferState |= cpu_to_le32(NoResponseExpected); in aac_fib_send()
520 hw_fib->header.XferState |= cpu_to_le32(ResponseExpected); in aac_fib_send()
527 hw_fib->header.SenderFibAddress = in aac_fib_send()
533 hw_fib->header.Handle = in aac_fib_send()
543 hw_fib->header.Command = cpu_to_le16(command); in aac_fib_send()
544 hw_fib->header.XferState |= cpu_to_le32(SentFromHost); in aac_fib_send()
548 hw_fib->header.Size = cpu_to_le16(sizeof(struct aac_fibhdr) + size); in aac_fib_send()
549 if (le16_to_cpu(hw_fib->header.Size) > le16_to_cpu(hw_fib->header.SenderSize)) { in aac_fib_send()
556 hw_fib->header.XferState |= cpu_to_le32(NormalPriority); in aac_fib_send()
573 dprintk((KERN_DEBUG " Command = %d.\n", le32_to_cpu(hw_fib->header.Command))); in aac_fib_send()
575 dprintk((KERN_DEBUG " XferState = %x.\n", le32_to_cpu(hw_fib->header.XferState))); in aac_fib_send()
873 struct hw_fib * hw_fib = fibptr->hw_fib_va; in aac_fib_adapter_complete() local
882 kfree(hw_fib); in aac_fib_adapter_complete()
886 if (hw_fib->header.XferState == 0) { in aac_fib_adapter_complete()
888 kfree(hw_fib); in aac_fib_adapter_complete()
894 if (hw_fib->header.StructType != FIB_MAGIC && in aac_fib_adapter_complete()
895 hw_fib->header.StructType != FIB_MAGIC2 && in aac_fib_adapter_complete()
896 hw_fib->header.StructType != FIB_MAGIC2_64) { in aac_fib_adapter_complete()
898 kfree(hw_fib); in aac_fib_adapter_complete()
908 if (hw_fib->header.XferState & cpu_to_le32(SentFromAdapter)) { in aac_fib_adapter_complete()
910 kfree (hw_fib); in aac_fib_adapter_complete()
913 hw_fib->header.XferState |= cpu_to_le32(HostProcessed); in aac_fib_adapter_complete()
916 if (size > le16_to_cpu(hw_fib->header.SenderSize)) in aac_fib_adapter_complete()
918 hw_fib->header.Size = cpu_to_le16(size); in aac_fib_adapter_complete()
922 aac_queue_get(dev, &index, AdapNormRespQueue, hw_fib, 1, NULL, &nointr); in aac_fib_adapter_complete()
945 struct hw_fib * hw_fib = fibptr->hw_fib_va; in aac_fib_complete() local
957 if (hw_fib->header.XferState == 0 || fibptr->done == 2) in aac_fib_complete()
963 if (hw_fib->header.StructType != FIB_MAGIC && in aac_fib_complete()
964 hw_fib->header.StructType != FIB_MAGIC2 && in aac_fib_complete()
965 hw_fib->header.StructType != FIB_MAGIC2_64) in aac_fib_complete()
974 if((hw_fib->header.XferState & cpu_to_le32(SentFromHost)) && in aac_fib_complete()
975 (hw_fib->header.XferState & cpu_to_le32(AdapterProcessed))) in aac_fib_complete()
979 else if(hw_fib->header.XferState & cpu_to_le32(SentFromHost)) in aac_fib_complete()
986 } else if(hw_fib->header.XferState & cpu_to_le32(HostOwned)) { in aac_fib_complete()
1064 struct hw_fib * hw_fib = fibptr->hw_fib_va; in aac_handle_aif() local
1065 struct aac_aifcmd * aifcmd = (struct aac_aifcmd *)hw_fib->data; in aac_handle_aif()
1740 struct hw_fib * hw_fib; in aac_check_health() local
1768 hw_fib = kzalloc(sizeof(struct hw_fib), GFP_ATOMIC); in aac_check_health()
1770 if (fib && hw_fib) { in aac_check_health()
1773 fib->hw_fib_va = hw_fib; in aac_check_health()
1778 fib->data = hw_fib->data; in aac_check_health()
1779 aif = (struct aac_aifcmd *)hw_fib->data; in aac_check_health()
1801 kfree(hw_fib); in aac_check_health()
2016 / sizeof(struct hw_fib); /* some extra */ in get_fib_count()
2028 static int fillup_pools(struct aac_dev *dev, struct hw_fib **hw_fib_pool, in fillup_pools()
2032 struct hw_fib **hw_fib_p; in fillup_pools()
2038 *(hw_fib_p) = kmalloc(sizeof(struct hw_fib), GFP_KERNEL); in fillup_pools()
2059 struct hw_fib **hw_fib_pool, in wakeup_fibctx_threads()
2062 struct hw_fib *hw_fib, in wakeup_fibctx_threads() argument
2067 struct hw_fib **hw_fib_p; in wakeup_fibctx_threads()
2070 struct hw_fib *hw_newfib; in wakeup_fibctx_threads()
2131 memcpy(hw_newfib, hw_fib, sizeof(struct hw_fib)); in wakeup_fibctx_threads()
2151 *(__le32 *)hw_fib->data = cpu_to_le32(ST_OK); in wakeup_fibctx_threads()
2159 struct hw_fib *hw_fib; in aac_process_events() local
2171 struct hw_fib **hw_fib_pool, **hw_fib_p; in aac_process_events()
2183 hw_fib = fib->hw_fib_va; in aac_process_events()
2199 fib->hw_fib_va = hw_fib; in aac_process_events()
2200 fib->data = hw_fib->data; in aac_process_events()
2206 aifcmd = (struct aac_aifcmd *) hw_fib->data; in aac_process_events()
2210 *(__le32 *)hw_fib->data = cpu_to_le32(ST_OK); in aac_process_events()
2232 hw_fib_pool = kmalloc_array(num, sizeof(struct hw_fib *), in aac_process_events()
2254 fib, hw_fib, num); in aac_process_events()