Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105062
b: refs/heads/master
c: 848c536
h: refs/heads/master
v: v3
  • Loading branch information
Haavard Skinnemoen authored and Dan Williams committed Jul 8, 2008
1 parent 8ecf135 commit ba9c3ab
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4a776f0aa922a552460192c07b56f4fe9cd82632
refs/heads/master: 848c536a37b8db4e461f14ca15fe29850151c822
3 changes: 2 additions & 1 deletion trunk/drivers/dma/dmaengine.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ static void dma_client_chan_alloc(struct dma_client *client)
if (!dma_chan_satisfies_mask(chan, client->cap_mask))
continue;

desc = chan->device->device_alloc_chan_resources(chan);
desc = chan->device->device_alloc_chan_resources(
chan, client);
if (desc >= 0) {
ack = client->event_callback(client,
chan,
Expand Down
7 changes: 4 additions & 3 deletions trunk/drivers/dma/fsldma.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,8 @@ static struct fsl_desc_sw *fsl_dma_alloc_descriptor(
*
* Return - The number of descriptors allocated.
*/
static int fsl_dma_alloc_chan_resources(struct dma_chan *chan)
static int fsl_dma_alloc_chan_resources(struct dma_chan *chan,
struct dma_client *client)
{
struct fsl_dma_chan *fsl_chan = to_fsl_chan(chan);
LIST_HEAD(tmp_list);
Expand Down Expand Up @@ -819,7 +820,7 @@ static int fsl_dma_self_test(struct fsl_dma_chan *fsl_chan)

chan = &fsl_chan->common;

if (fsl_dma_alloc_chan_resources(chan) < 1) {
if (fsl_dma_alloc_chan_resources(chan, NULL) < 1) {
dev_err(fsl_chan->dev,
"selftest: Cannot alloc resources for DMA\n");
err = -ENODEV;
Expand Down Expand Up @@ -847,7 +848,7 @@ static int fsl_dma_self_test(struct fsl_dma_chan *fsl_chan)
/* Test free and re-alloc channel resources */
fsl_dma_free_chan_resources(chan);

if (fsl_dma_alloc_chan_resources(chan) < 1) {
if (fsl_dma_alloc_chan_resources(chan, NULL) < 1) {
dev_err(fsl_chan->dev,
"selftest: Cannot alloc resources for DMA\n");
err = -ENODEV;
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/dma/ioat_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,8 @@ static void ioat2_dma_massage_chan_desc(struct ioat_dma_chan *ioat_chan)
* ioat_dma_alloc_chan_resources - returns the number of allocated descriptors
* @chan: the channel to be filled out
*/
static int ioat_dma_alloc_chan_resources(struct dma_chan *chan)
static int ioat_dma_alloc_chan_resources(struct dma_chan *chan,
struct dma_client *client)
{
struct ioat_dma_chan *ioat_chan = to_ioat_chan(chan);
struct ioat_desc_sw *desc;
Expand Down Expand Up @@ -1049,7 +1050,7 @@ static int ioat_dma_self_test(struct ioatdma_device *device)
dma_chan = container_of(device->common.channels.next,
struct dma_chan,
device_node);
if (device->common.device_alloc_chan_resources(dma_chan) < 1) {
if (device->common.device_alloc_chan_resources(dma_chan, NULL) < 1) {
dev_err(&device->pdev->dev,
"selftest cannot allocate chan resource\n");
err = -ENODEV;
Expand Down
7 changes: 4 additions & 3 deletions trunk/drivers/dma/iop-adma.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,8 @@ static void iop_chan_start_null_memcpy(struct iop_adma_chan *iop_chan);
static void iop_chan_start_null_xor(struct iop_adma_chan *iop_chan);

/* returns the number of allocated descriptors */
static int iop_adma_alloc_chan_resources(struct dma_chan *chan)
static int iop_adma_alloc_chan_resources(struct dma_chan *chan,
struct dma_client *client)
{
char *hw_desc;
int idx;
Expand Down Expand Up @@ -838,7 +839,7 @@ static int __devinit iop_adma_memcpy_self_test(struct iop_adma_device *device)
dma_chan = container_of(device->common.channels.next,
struct dma_chan,
device_node);
if (iop_adma_alloc_chan_resources(dma_chan) < 1) {
if (iop_adma_alloc_chan_resources(dma_chan, NULL) < 1) {
err = -ENODEV;
goto out;
}
Expand Down Expand Up @@ -936,7 +937,7 @@ iop_adma_xor_zero_sum_self_test(struct iop_adma_device *device)
dma_chan = container_of(device->common.channels.next,
struct dma_chan,
device_node);
if (iop_adma_alloc_chan_resources(dma_chan) < 1) {
if (iop_adma_alloc_chan_resources(dma_chan, NULL) < 1) {
err = -ENODEV;
goto out;
}
Expand Down
7 changes: 4 additions & 3 deletions trunk/drivers/dma/mv_xor.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,8 @@ mv_xor_tx_submit(struct dma_async_tx_descriptor *tx)
}

/* returns the number of allocated descriptors */
static int mv_xor_alloc_chan_resources(struct dma_chan *chan)
static int mv_xor_alloc_chan_resources(struct dma_chan *chan,
struct dma_client *client)
{
char *hw_desc;
int idx;
Expand Down Expand Up @@ -938,7 +939,7 @@ static int __devinit mv_xor_memcpy_self_test(struct mv_xor_device *device)
dma_chan = container_of(device->common.channels.next,
struct dma_chan,
device_node);
if (mv_xor_alloc_chan_resources(dma_chan) < 1) {
if (mv_xor_alloc_chan_resources(dma_chan, NULL) < 1) {
err = -ENODEV;
goto out;
}
Expand Down Expand Up @@ -1033,7 +1034,7 @@ mv_xor_xor_self_test(struct mv_xor_device *device)
dma_chan = container_of(device->common.channels.next,
struct dma_chan,
device_node);
if (mv_xor_alloc_chan_resources(dma_chan) < 1) {
if (mv_xor_alloc_chan_resources(dma_chan, NULL) < 1) {
err = -ENODEV;
goto out;
}
Expand Down
3 changes: 2 additions & 1 deletion trunk/include/linux/dmaengine.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ struct dma_device {
int dev_id;
struct device *dev;

int (*device_alloc_chan_resources)(struct dma_chan *chan);
int (*device_alloc_chan_resources)(struct dma_chan *chan,
struct dma_client *client);
void (*device_free_chan_resources)(struct dma_chan *chan);

struct dma_async_tx_descriptor *(*device_prep_dma_memcpy)(
Expand Down

0 comments on commit ba9c3ab

Please sign in to comment.