diff options
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/hvc_iucv.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/char/hvc_iucv.c b/drivers/char/hvc_iucv.c index 21681a81cc3..37b0542a4ee 100644 --- a/drivers/char/hvc_iucv.c +++ b/drivers/char/hvc_iucv.c | |||
@@ -139,6 +139,8 @@ struct hvc_iucv_private *hvc_iucv_get_private(uint32_t num) | |||
139 | * | 139 | * |
140 | * This function allocates a new struct iucv_tty_buffer element and, optionally, | 140 | * This function allocates a new struct iucv_tty_buffer element and, optionally, |
141 | * allocates an internal data buffer with the specified size @size. | 141 | * allocates an internal data buffer with the specified size @size. |
142 | * The internal data buffer is always allocated with GFP_DMA which is | ||
143 | * required for receiving and sending data with IUCV. | ||
142 | * Note: The total message size arises from the internal buffer size and the | 144 | * Note: The total message size arises from the internal buffer size and the |
143 | * members of the iucv_tty_msg structure. | 145 | * members of the iucv_tty_msg structure. |
144 | * The function returns NULL if memory allocation has failed. | 146 | * The function returns NULL if memory allocation has failed. |
@@ -154,7 +156,7 @@ static struct iucv_tty_buffer *alloc_tty_buffer(size_t size, gfp_t flags) | |||
154 | 156 | ||
155 | if (size > 0) { | 157 | if (size > 0) { |
156 | bufp->msg.length = MSG_SIZE(size); | 158 | bufp->msg.length = MSG_SIZE(size); |
157 | bufp->mbuf = kmalloc(bufp->msg.length, flags); | 159 | bufp->mbuf = kmalloc(bufp->msg.length, flags | GFP_DMA); |
158 | if (!bufp->mbuf) { | 160 | if (!bufp->mbuf) { |
159 | mempool_free(bufp, hvc_iucv_mempool); | 161 | mempool_free(bufp, hvc_iucv_mempool); |
160 | return NULL; | 162 | return NULL; |
@@ -237,7 +239,7 @@ static int hvc_iucv_write(struct hvc_iucv_private *priv, | |||
237 | if (!rb->mbuf) { /* message not yet received ... */ | 239 | if (!rb->mbuf) { /* message not yet received ... */ |
238 | /* allocate mem to store msg data; if no memory is available | 240 | /* allocate mem to store msg data; if no memory is available |
239 | * then leave the buffer on the list and re-try later */ | 241 | * then leave the buffer on the list and re-try later */ |
240 | rb->mbuf = kmalloc(rb->msg.length, GFP_ATOMIC); | 242 | rb->mbuf = kmalloc(rb->msg.length, GFP_ATOMIC | GFP_DMA); |
241 | if (!rb->mbuf) | 243 | if (!rb->mbuf) |
242 | return -ENOMEM; | 244 | return -ENOMEM; |
243 | 245 | ||