Rev 5056 | Rev 6082 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5056 | Rev 5270 | ||
---|---|---|---|
Line 99... | Line 99... | ||
99 | BUG_ON(sg_is_chain(sg)); |
99 | BUG_ON(sg_is_chain(sg)); |
100 | #endif |
100 | #endif |
101 | return (struct page *)((sg)->page_link & ~0x3); |
101 | return (struct page *)((sg)->page_link & ~0x3); |
102 | } |
102 | } |
Line -... | Line 103... | ||
- | 103 | ||
- | 104 | /** |
|
- | 105 | * sg_set_buf - Set sg entry to point at given data |
|
- | 106 | * @sg: SG entry |
|
- | 107 | * @buf: Data |
|
- | 108 | * @buflen: Data length |
|
- | 109 | * |
|
- | 110 | **/ |
|
- | 111 | //static inline void sg_set_buf(struct scatterlist *sg, const void *buf, |
|
- | 112 | // unsigned int buflen) |
|
- | 113 | //{ |
|
- | 114 | //#ifdef CONFIG_DEBUG_SG |
|
- | 115 | // BUG_ON(!virt_addr_valid(buf)); |
|
- | 116 | //#endif |
|
- | 117 | // sg_set_page(sg, virt_to_page(buf), buflen, offset_in_page(buf)); |
|
- | 118 | //} |
|
103 | 119 | ||
104 | /* |
120 | /* |
105 | * Loop over each sg element, following the pointer to a new list if necessary |
121 | * Loop over each sg element, following the pointer to a new list if necessary |
106 | */ |
122 | */ |
107 | #define for_each_sg(sglist, sg, nr, __i) \ |
123 | #define for_each_sg(sglist, sg, nr, __i) \ |
Line 118... | Line 134... | ||
118 | * |
134 | * |
119 | **/ |
135 | **/ |
120 | static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents, |
136 | static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents, |
121 | struct scatterlist *sgl) |
137 | struct scatterlist *sgl) |
122 | { |
138 | { |
123 | #ifndef ARCH_HAS_SG_CHAIN |
139 | #ifndef CONFIG_ARCH_HAS_SG_CHAIN |
124 | BUG(); |
140 | BUG(); |
125 | #endif |
141 | #endif |
Line 126... | Line 142... | ||
126 | 142 | ||
127 | /* |
143 | /* |