• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/lib/

Lines Matching refs:sg

17  * @sg:		The current sg entry
20 * Usually the next entry will be @sg@ + 1, but if this sg element is part
25 struct scatterlist *sg_next(struct scatterlist *sg)
28 BUG_ON(sg->sg_magic != SG_MAGIC);
30 if (sg_is_last(sg))
33 sg++;
34 if (unlikely(sg_is_chain(sg)))
35 sg = sg_chain_ptr(sg);
37 return sg;
60 struct scatterlist *sg, *ret = NULL;
63 for_each_sg(sgl, sg, nents, i)
64 ret = sg;
81 * If this is part of a chained sg table, sg_mark_end() should be
100 * sg_init_one - Initialize a single entry sg list
101 * @sg: SG entry
106 void sg_init_one(struct scatterlist *sg, const void *buf, unsigned int buflen)
108 sg_init_table(sg, 1);
109 sg_set_buf(sg, buf, buflen);
136 static void sg_kfree(struct scatterlist *sg, unsigned int nents)
139 kmemleak_free(sg);
140 free_page((unsigned long) sg);
142 kfree(sg);
146 * __sg_free_table - Free a previously mapped sg table
147 * @table: The sg table header to use
152 * Free an sg table previously allocated and setup with
172 * then assign 'next' to the sg table after the current one.
195 * sg_free_table - Free a previously allocated sg table
196 * @table: The mapped sg table header
206 * __sg_alloc_table - Allocate and initialize an sg table with given allocator
207 * @table: The sg table header to use
208 * @nents: Number of entries in sg list
228 struct scatterlist *sg, *prv;
250 sg = alloc_fn(alloc_size, gfp_mask);
251 if (unlikely(!sg)) {
264 sg_init_table(sg, alloc_size);
268 * If this is the first mapping, assign the sg table header.
272 sg_chain(prv, max_ents, sg);
274 table->sgl = sg;
280 sg_mark_end(&sg[sg_size - 1]);
283 * only really needed for mempool backed sg allocations (like
290 prv = sg;
298 * sg_alloc_table - Allocate and initialize an sg table
299 * @table: The sg table header to use
300 * @nents: Number of entries in sg list
304 * Allocate and initialize an sg table. If @nents@ is larger than
305 * SG_MAX_SINGLE_ALLOC a chained sg table will be setup.
322 * sg_miter_start - start mapping iteration over a sg list
323 * @miter: sg mapping iter to be started
324 * @sgl: sg list to iterate over
325 * @nents: number of sg entries
348 * @miter: sg mapping iter to proceed
361 * true if @miter contains the next mapping. false if end of sg
374 /* get to the next sg if necessary. __offset is adjusted by stop */
403 * @miter: sg mapping iter to be stopped
445 * @to_buffer: transfer direction (non zero == from an sg list to a
446 * buffer, 0 == from a buffer to an sg list