diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/scatterlist.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index 457123171389..b2ec8421b89f 100644 --- a/include/linux/scatterlist.h +++ b/include/linux/scatterlist.h | |||
@@ -179,7 +179,11 @@ static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents, | |||
179 | #ifndef ARCH_HAS_SG_CHAIN | 179 | #ifndef ARCH_HAS_SG_CHAIN |
180 | BUG(); | 180 | BUG(); |
181 | #endif | 181 | #endif |
182 | prv[prv_nents - 1].page_link = (unsigned long) sgl | 0x01; | 182 | /* |
183 | * Set lowest bit to indicate a link pointer, and make sure to clear | ||
184 | * the termination bit if it happens to be set. | ||
185 | */ | ||
186 | prv[prv_nents - 1].page_link = ((unsigned long) sgl | 0x01) & ~0x02; | ||
183 | } | 187 | } |
184 | 188 | ||
185 | /** | 189 | /** |