Lines Matching refs:kfib
48 struct hw_fib * kfib; in ioctl_send_fib() local
63 kfib = fibptr->hw_fib_va; in ioctl_send_fib()
67 if (copy_from_user((void *)kfib, arg, sizeof(struct aac_fibhdr))) { in ioctl_send_fib()
76 osize = size = le16_to_cpu(kfib->header.Size) + in ioctl_send_fib()
78 if (size < le16_to_cpu(kfib->header.SenderSize)) in ioctl_send_fib()
79 size = le16_to_cpu(kfib->header.SenderSize); in ioctl_send_fib()
88 kfib = dma_alloc_coherent(&dev->pdev->dev, size, &daddr, in ioctl_send_fib()
90 if (!kfib) { in ioctl_send_fib()
98 fibptr->hw_fib_va = kfib; in ioctl_send_fib()
100 memset(((char *)kfib) + dev->max_fib_size, 0, size - dev->max_fib_size); in ioctl_send_fib()
101 memcpy(kfib, hw_fib, dev->max_fib_size); in ioctl_send_fib()
104 if (copy_from_user(kfib, arg, size)) { in ioctl_send_fib()
110 if ((osize != le16_to_cpu(kfib->header.Size) + in ioctl_send_fib()
112 || (size < le16_to_cpu(kfib->header.SenderSize))) { in ioctl_send_fib()
117 if (kfib->header.Command == cpu_to_le16(TakeABreakPt)) { in ioctl_send_fib()
123 kfib->header.XferState = 0; in ioctl_send_fib()
125 retval = aac_fib_send(le16_to_cpu(kfib->header.Command), fibptr, in ioctl_send_fib()
126 le16_to_cpu(kfib->header.Size) , FsaNormal, in ioctl_send_fib()
145 if (copy_to_user(arg, (void *)kfib, size)) in ioctl_send_fib()
149 dma_free_coherent(&dev->pdev->dev, size, kfib, in ioctl_send_fib()