tb->buffer_size = got;
sg_init_table(tb->sg, max_sg);
+ tb->reserved_pages = kzalloc(max_sg * sizeof(struct page *), priority);
+ if (!tb->reserved_pages) {
+ kfree(tb);
+ return NULL;
+ }
+
return tb;
}
STbuffer->buffer_size = got;
if (STbuffer->cleared)
memset(page_address(STbuffer->frp[segs].page), 0, b_size);
+ STbuffer->reserved_pages[segs] = STbuffer->frp[segs].page;
segs++;
}
STbuffer->b_data = page_address(STbuffer->frp[0].page);
+ STbuffer->map_data.page_order = order;
return 1;
}
STbuffer->frp_segs = STbuffer->orig_frp_segs;
STbuffer->frp_sg_current = 0;
STbuffer->sg_segs = 0;
+ STbuffer->map_data.page_order = 0;
+ STbuffer->map_data.offset = 0;
}
if (tpnt->buffer) {
tpnt->buffer->orig_frp_segs = 0;
normalize_buffer(tpnt->buffer);
+ kfree(tpnt->buffer->reserved_pages);
kfree(tpnt->buffer);
}
int syscall_result;
struct st_request *last_SRpnt;
struct st_cmdstatus cmdstat;
+ struct page **reserved_pages;
+ struct rq_map_data map_data;
unsigned char *b_data;
unsigned short use_sg; /* zero or max number of s/g segments for this adapter */
unsigned short sg_segs; /* number of segments in s/g list */