33 #include <linux/slab.h>
58 int err, pbl_virt, pbl_index,
i;
72 pbe_count = (c2dev->
req_vq.msg_size -
91 count =
min(pbe_count, pbl_depth);
99 if (count == pbl_depth) {
112 wr->hdr.context = (
unsigned long) vq_req;
124 for (i = 0; i <
count; i++) {
138 if (count <= pbe_count) {
164 err = c2_errno(reply);
172 #define C2_PBL_MAX_DEPTH 131072
186 if (!va || !length || !addr_list || !pbl_depth)
213 wr->
hdr.context = (
unsigned long) vq_req;
221 pbe_count = (c2dev->
req_vq.msg_size -
224 if (pbl_depth <= pbe_count) {
235 count =
min(pbl_depth, pbe_count);
241 for (i = 0; i <
count; i++) {
276 if ((err = c2_errno(reply))) {
293 err = send_pbl_messages(c2dev,
295 (
unsigned long) &addr_list[i],
336 wr.
hdr.context = (
u64) (
unsigned long) vq_req;
371 err = c2_errno(reply);