From: Sergei Shtylylov <sshtylyov@ru.mvista.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-ide@vger.kernel.org,
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] IDE: always release DMA engine
Date: Wed, 29 Mar 2006 23:31:53 +0400 [thread overview]
Message-ID: <442AE0A9.7090106@ru.mvista.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 304 bytes --]
Hail.
Release the DMA engine for the custom mapping IDE drivers also (for
example, siimage.c does allocate it in both I/O-mapped and custom-mapped
modes). Remove useless code from the error path of ide_allocate_dma_engine().
WBR, Sergei
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
[-- Attachment #2: IDE-always-release-DMA-engine.patch --]
[-- Type: text/plain, Size: 1035 bytes --]
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index c481be8..92e9088 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -811,15 +811,14 @@ static int ide_release_iomio_dma(ide_hwi
/*
* Needed for allowing full modular support of ide-driver
*/
-int ide_release_dma (ide_hwif_t *hwif)
+int ide_release_dma(ide_hwif_t *hwif)
{
+ ide_release_dma_engine(hwif);
+
if (hwif->mmio == 2)
return 1;
- if (hwif->chipset == ide_etrax100)
- return 1;
-
- ide_release_dma_engine(hwif);
- return ide_release_iomio_dma(hwif);
+ else
+ return ide_release_iomio_dma(hwif);
}
static int ide_allocate_dma_engine(ide_hwif_t *hwif)
@@ -831,10 +830,9 @@ static int ide_allocate_dma_engine(ide_h
if (hwif->dmatable_cpu)
return 0;
- printk(KERN_ERR "%s: -- Error, unable to allocate%s DMA table(s).\n",
- hwif->cds->name, !hwif->dmatable_cpu ? " CPU" : "");
+ printk(KERN_ERR "%s: -- Error, unable to allocate DMA table.\n",
+ hwif->cds->name);
- ide_release_dma_engine(hwif);
return 1;
}
reply other threads:[~2006-03-29 19:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=442AE0A9.7090106@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=akpm@osdl.org \
--cc=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.