Lines Matching refs:table
177 void __sg_free_table(struct sg_table *table, unsigned int max_ents, in __sg_free_table() argument
182 if (unlikely(!table->sgl)) in __sg_free_table()
185 sgl = table->sgl; in __sg_free_table()
186 while (table->orig_nents) { in __sg_free_table()
187 unsigned int alloc_size = table->orig_nents; in __sg_free_table()
205 table->orig_nents -= sg_size; in __sg_free_table()
213 table->sgl = NULL; in __sg_free_table()
222 void sg_free_table(struct sg_table *table) in sg_free_table() argument
224 __sg_free_table(table, SG_MAX_SINGLE_ALLOC, false, sg_kfree); in sg_free_table()
247 int __sg_alloc_table(struct sg_table *table, unsigned int nents, in __sg_alloc_table() argument
254 memset(table, 0, sizeof(*table)); in __sg_alloc_table()
290 table->nents = ++table->orig_nents; in __sg_alloc_table()
296 table->nents = table->orig_nents += sg_size; in __sg_alloc_table()
305 table->sgl = sg; in __sg_alloc_table()
331 int sg_alloc_table(struct sg_table *table, unsigned int nents, gfp_t gfp_mask) in sg_alloc_table() argument
335 ret = __sg_alloc_table(table, nents, SG_MAX_SINGLE_ALLOC, in sg_alloc_table()
338 __sg_free_table(table, SG_MAX_SINGLE_ALLOC, false, sg_kfree); in sg_alloc_table()