The patch titled Fix DMA on Dreamcast has been added to the -mm tree. Its filename is fix-dma-on-dreamcast.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: Fix DMA on Dreamcast From: "Adrian McMenamin" <adrianmcmenamin@xxxxxxxxx> -ENOCHANGELOG Signed-off by: Adrian McMenamin <adrian@xxxxxxxxxxxxxxxxx> Cc: Paul Mundt <lethal@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/sh/drivers/dma/dma-api.c | 11 ++++++----- include/asm-sh/dma.h | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff -puN arch/sh/drivers/dma/dma-api.c~fix-dma-on-dreamcast arch/sh/drivers/dma/dma-api.c --- a/arch/sh/drivers/dma/dma-api.c~fix-dma-on-dreamcast +++ a/arch/sh/drivers/dma/dma-api.c @@ -31,8 +31,8 @@ struct dma_info *get_dma_info(unsigned i * the channel is. */ list_for_each_entry(info, ®istered_dmac_list, list) { - if ((chan < info->first_channel_nr) || - (chan >= info->first_channel_nr + info->nr_channels)) + if ((chan < info->first_vchannel_nr) || + (chan >= info->first_vchannel_nr + info->nr_channels)) continue; return info; @@ -82,7 +82,7 @@ struct dma_channel *get_dma_channel(unsi for (i = 0; i < info->nr_channels; i++) { channel = &info->channels[i]; - if (channel->chan == chan) + if (channel->chan == (chan - info->first_vchannel_nr)) return channel; } @@ -183,6 +183,7 @@ int dmac_search_free_channel(const char return result; atomic_set(&channel->busy, 1); + return channel->chan; } @@ -194,7 +195,6 @@ int request_dma(unsigned int chan, const struct dma_channel *channel = { 0 }; struct dma_info *info = get_dma_info(chan); int result; - channel = get_dma_channel(chan); if (atomic_xchg(&channel->busy, 1)) return -EBUSY; @@ -369,6 +369,7 @@ int register_dmac(struct dma_info *info) } total_channels = get_nr_channels(); + info->first_vchannel_nr = total_channels; for (i = 0; i < info->nr_channels; i++) { struct dma_channel *chan = &info->channels[i]; @@ -387,7 +388,7 @@ int register_dmac(struct dma_info *info) } list_add(&info->list, ®istered_dmac_list); - + return 0; } EXPORT_SYMBOL(register_dmac); diff -puN include/asm-sh/dma.h~fix-dma-on-dreamcast include/asm-sh/dma.h --- a/include/asm-sh/dma.h~fix-dma-on-dreamcast +++ a/include/asm-sh/dma.h @@ -111,6 +111,7 @@ struct dma_info { struct list_head list; int first_channel_nr; + int first_vchannel_nr; }; struct dma_chan_caps { _ Patches currently in -mm which might be from adrianmcmenamin@xxxxxxxxx are fix-dma-on-dreamcast.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html