Lines Matching refs:table
192 void __sg_free_table(struct sg_table *table, unsigned int max_ents, in __sg_free_table() argument
198 if (unlikely(!table->sgl)) in __sg_free_table()
201 sgl = table->sgl; in __sg_free_table()
202 while (table->orig_nents) { in __sg_free_table()
203 unsigned int alloc_size = table->orig_nents; in __sg_free_table()
221 table->orig_nents -= sg_size; in __sg_free_table()
230 table->sgl = NULL; in __sg_free_table()
239 void sg_free_table(struct sg_table *table) in sg_free_table() argument
241 __sg_free_table(table, SG_MAX_SINGLE_ALLOC, false, sg_kfree); in sg_free_table()
266 int __sg_alloc_table(struct sg_table *table, unsigned int nents, in __sg_alloc_table() argument
276 memset(table, 0, sizeof(*table)); in __sg_alloc_table()
312 table->nents = ++table->orig_nents; in __sg_alloc_table()
318 table->nents = table->orig_nents += sg_size; in __sg_alloc_table()
327 table->sgl = sg; in __sg_alloc_table()
355 int sg_alloc_table(struct sg_table *table, unsigned int nents, gfp_t gfp_mask) in sg_alloc_table() argument
359 ret = __sg_alloc_table(table, nents, SG_MAX_SINGLE_ALLOC, in sg_alloc_table()
362 __sg_free_table(table, SG_MAX_SINGLE_ALLOC, 0, sg_kfree); in sg_alloc_table()