diff options
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/dmaengine.c | 20 | ||||
-rw-r--r-- | drivers/dma/ioatdma.c | 10 | ||||
-rw-r--r-- | drivers/dma/ioatdma_registers.h | 2 | ||||
-rw-r--r-- | drivers/dma/iovlock.c | 2 |
4 files changed, 20 insertions, 14 deletions
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index 5829143558e1..15278044295c 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c | |||
@@ -166,8 +166,8 @@ static struct dma_chan *dma_client_chan_alloc(struct dma_client *client) | |||
166 | } | 166 | } |
167 | 167 | ||
168 | /** | 168 | /** |
169 | * dma_client_chan_free - release a DMA channel | 169 | * dma_chan_cleanup - release a DMA channel's resources |
170 | * @chan: &dma_chan | 170 | * @kref: kernel reference structure that contains the DMA channel device |
171 | */ | 171 | */ |
172 | void dma_chan_cleanup(struct kref *kref) | 172 | void dma_chan_cleanup(struct kref *kref) |
173 | { | 173 | { |
@@ -199,7 +199,7 @@ static void dma_client_chan_free(struct dma_chan *chan) | |||
199 | * dma_chans_rebalance - reallocate channels to clients | 199 | * dma_chans_rebalance - reallocate channels to clients |
200 | * | 200 | * |
201 | * When the number of DMA channel in the system changes, | 201 | * When the number of DMA channel in the system changes, |
202 | * channels need to be rebalanced among clients | 202 | * channels need to be rebalanced among clients. |
203 | */ | 203 | */ |
204 | static void dma_chans_rebalance(void) | 204 | static void dma_chans_rebalance(void) |
205 | { | 205 | { |
@@ -264,7 +264,7 @@ struct dma_client *dma_async_client_register(dma_event_callback event_callback) | |||
264 | 264 | ||
265 | /** | 265 | /** |
266 | * dma_async_client_unregister - unregister a client and free the &dma_client | 266 | * dma_async_client_unregister - unregister a client and free the &dma_client |
267 | * @client: | 267 | * @client: &dma_client to free |
268 | * | 268 | * |
269 | * Force frees any allocated DMA channels, frees the &dma_client memory | 269 | * Force frees any allocated DMA channels, frees the &dma_client memory |
270 | */ | 270 | */ |
@@ -306,7 +306,7 @@ void dma_async_client_chan_request(struct dma_client *client, | |||
306 | } | 306 | } |
307 | 307 | ||
308 | /** | 308 | /** |
309 | * dma_async_device_register - | 309 | * dma_async_device_register - registers DMA devices found |
310 | * @device: &dma_device | 310 | * @device: &dma_device |
311 | */ | 311 | */ |
312 | int dma_async_device_register(struct dma_device *device) | 312 | int dma_async_device_register(struct dma_device *device) |
@@ -348,8 +348,8 @@ int dma_async_device_register(struct dma_device *device) | |||
348 | } | 348 | } |
349 | 349 | ||
350 | /** | 350 | /** |
351 | * dma_async_device_unregister - | 351 | * dma_async_device_cleanup - function called when all references are released |
352 | * @device: &dma_device | 352 | * @kref: kernel reference object |
353 | */ | 353 | */ |
354 | static void dma_async_device_cleanup(struct kref *kref) | 354 | static void dma_async_device_cleanup(struct kref *kref) |
355 | { | 355 | { |
@@ -359,7 +359,11 @@ static void dma_async_device_cleanup(struct kref *kref) | |||
359 | complete(&device->done); | 359 | complete(&device->done); |
360 | } | 360 | } |
361 | 361 | ||
362 | void dma_async_device_unregister(struct dma_device* device) | 362 | /** |
363 | * dma_async_device_unregister - unregisters DMA devices | ||
364 | * @device: &dma_device | ||
365 | */ | ||
366 | void dma_async_device_unregister(struct dma_device *device) | ||
363 | { | 367 | { |
364 | struct dma_chan *chan; | 368 | struct dma_chan *chan; |
365 | unsigned long flags; | 369 | unsigned long flags; |
diff --git a/drivers/dma/ioatdma.c b/drivers/dma/ioatdma.c index ecad8f65d2d4..78bf46d917b7 100644 --- a/drivers/dma/ioatdma.c +++ b/drivers/dma/ioatdma.c | |||
@@ -217,7 +217,7 @@ static void ioat_dma_free_chan_resources(struct dma_chan *chan) | |||
217 | 217 | ||
218 | /** | 218 | /** |
219 | * do_ioat_dma_memcpy - actual function that initiates a IOAT DMA transaction | 219 | * do_ioat_dma_memcpy - actual function that initiates a IOAT DMA transaction |
220 | * @chan: IOAT DMA channel handle | 220 | * @ioat_chan: IOAT DMA channel handle |
221 | * @dest: DMA destination address | 221 | * @dest: DMA destination address |
222 | * @src: DMA source address | 222 | * @src: DMA source address |
223 | * @len: transaction length in bytes | 223 | * @len: transaction length in bytes |
@@ -383,7 +383,7 @@ static dma_cookie_t ioat_dma_memcpy_buf_to_pg(struct dma_chan *chan, | |||
383 | * @dest_off: offset into that page | 383 | * @dest_off: offset into that page |
384 | * @src_pg: pointer to the page to copy from | 384 | * @src_pg: pointer to the page to copy from |
385 | * @src_off: offset into that page | 385 | * @src_off: offset into that page |
386 | * @len: transaction length in bytes. This is guaranteed to not make a copy | 386 | * @len: transaction length in bytes. This is guaranteed not to make a copy |
387 | * across a page boundary. | 387 | * across a page boundary. |
388 | */ | 388 | */ |
389 | 389 | ||
@@ -407,7 +407,7 @@ static dma_cookie_t ioat_dma_memcpy_pg_to_pg(struct dma_chan *chan, | |||
407 | } | 407 | } |
408 | 408 | ||
409 | /** | 409 | /** |
410 | * ioat_dma_memcpy_issue_pending - push potentially unrecognoized appended descriptors to hw | 410 | * ioat_dma_memcpy_issue_pending - push potentially unrecognized appended descriptors to hw |
411 | * @chan: DMA channel handle | 411 | * @chan: DMA channel handle |
412 | */ | 412 | */ |
413 | 413 | ||
@@ -510,6 +510,8 @@ static void ioat_dma_memcpy_cleanup(struct ioat_dma_chan *chan) | |||
510 | * ioat_dma_is_complete - poll the status of a IOAT DMA transaction | 510 | * ioat_dma_is_complete - poll the status of a IOAT DMA transaction |
511 | * @chan: IOAT DMA channel handle | 511 | * @chan: IOAT DMA channel handle |
512 | * @cookie: DMA transaction identifier | 512 | * @cookie: DMA transaction identifier |
513 | * @done: if not %NULL, updated with last completed transaction | ||
514 | * @used: if not %NULL, updated with last used transaction | ||
513 | */ | 515 | */ |
514 | 516 | ||
515 | static enum dma_status ioat_dma_is_complete(struct dma_chan *chan, | 517 | static enum dma_status ioat_dma_is_complete(struct dma_chan *chan, |
@@ -826,7 +828,7 @@ static int __init ioat_init_module(void) | |||
826 | /* if forced, worst case is that rmmod hangs */ | 828 | /* if forced, worst case is that rmmod hangs */ |
827 | __unsafe(THIS_MODULE); | 829 | __unsafe(THIS_MODULE); |
828 | 830 | ||
829 | pci_module_init(&ioat_pci_drv); | 831 | return pci_module_init(&ioat_pci_drv); |
830 | } | 832 | } |
831 | 833 | ||
832 | module_init(ioat_init_module); | 834 | module_init(ioat_init_module); |
diff --git a/drivers/dma/ioatdma_registers.h b/drivers/dma/ioatdma_registers.h index 41a21ab2b000..a30c7349075a 100644 --- a/drivers/dma/ioatdma_registers.h +++ b/drivers/dma/ioatdma_registers.h | |||
@@ -76,7 +76,7 @@ | |||
76 | #define IOAT_CHANSTS_OFFSET 0x04 /* 64-bit Channel Status Register */ | 76 | #define IOAT_CHANSTS_OFFSET 0x04 /* 64-bit Channel Status Register */ |
77 | #define IOAT_CHANSTS_OFFSET_LOW 0x04 | 77 | #define IOAT_CHANSTS_OFFSET_LOW 0x04 |
78 | #define IOAT_CHANSTS_OFFSET_HIGH 0x08 | 78 | #define IOAT_CHANSTS_OFFSET_HIGH 0x08 |
79 | #define IOAT_CHANSTS_COMPLETED_DESCRIPTOR_ADDR 0xFFFFFFFFFFFFFFC0 | 79 | #define IOAT_CHANSTS_COMPLETED_DESCRIPTOR_ADDR 0xFFFFFFFFFFFFFFC0UL |
80 | #define IOAT_CHANSTS_SOFT_ERR 0x0000000000000010 | 80 | #define IOAT_CHANSTS_SOFT_ERR 0x0000000000000010 |
81 | #define IOAT_CHANSTS_DMA_TRANSFER_STATUS 0x0000000000000007 | 81 | #define IOAT_CHANSTS_DMA_TRANSFER_STATUS 0x0000000000000007 |
82 | #define IOAT_CHANSTS_DMA_TRANSFER_STATUS_ACTIVE 0x0 | 82 | #define IOAT_CHANSTS_DMA_TRANSFER_STATUS_ACTIVE 0x0 |
diff --git a/drivers/dma/iovlock.c b/drivers/dma/iovlock.c index 5ed327e453a2..d637555a833b 100644 --- a/drivers/dma/iovlock.c +++ b/drivers/dma/iovlock.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <asm/io.h> | 31 | #include <asm/io.h> |
32 | #include <asm/uaccess.h> | 32 | #include <asm/uaccess.h> |
33 | 33 | ||
34 | int num_pages_spanned(struct iovec *iov) | 34 | static int num_pages_spanned(struct iovec *iov) |
35 | { | 35 | { |
36 | return | 36 | return |
37 | ((PAGE_ALIGN((unsigned long)iov->iov_base + iov->iov_len) - | 37 | ((PAGE_ALIGN((unsigned long)iov->iov_base + iov->iov_len) - |