From: Sergei Shtylylov <sshtylyov@ru.mvista.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-ide@vger.kernel.org, bzolnier@gmail.com
Subject: Re: [PATCH] IDE: claim extra DMA ports regardless of channel
Date: Wed, 29 Mar 2006 00:42:21 +0400 [thread overview]
Message-ID: <44299FAD.7080006@ru.mvista.com> (raw)
In-Reply-To: <20060328124146.52dbe446.akpm@osdl.org>
Hello.
Andrew Morton wrote:
>> static int ide_iomio_dma(ide_hwif_t *hwif, unsigned long base, unsigned int ports)
>> {
>> printk(KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx",
>> - hwif->name, base, base + ports - 1);
>> + hwif->name, base, base + ports - 1);
>> +
>> if (!request_region(base, ports, hwif->name)) {
>> printk(" -- Error, ports in use.\n");
>> return 1;
>> }
>> +
>> hwif->dma_base = base;
>> - if ((hwif->cds->extra) && (hwif->channel == 0)) {
>> - request_region(base+16, hwif->cds->extra, hwif->cds->name);
>> - hwif->dma_extra = hwif->cds->extra;
>> - }
>> -
>> +
>> + if (hwif->cds->extra) {
>> + hwif->extra_base = base + (hwif->channel ? 8 : 16);
>> +
>> + if (!hwif->mate || !hwif->mate->extra_ports) {
>> + if (!request_region(hwif->extra_base,
>> + hwif->cds->extra, hwif->cds->name)) {
>> + printk(" -- Error, extra ports in use.\n");
>> + release_region(base, ports);
>> + return 1;
>> + }
>> + hwif->extra_ports = hwif->cds->extra;
>> + }
>> + }
>
>
> The printks in this function are odd. Note how it will print a
> non-newline-terminated string and then will print a newline-terminated
> string only if there was an error.
>
> Does it all come out right both when errors occur and when they do not?
Sure it does. :-)
WBR, Sergei
prev parent reply other threads:[~2006-03-28 20:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-28 19:06 [PATCH] IDE: claim extra DMA ports regardless of channel Sergei Shtylylov
2006-03-28 20:41 ` Andrew Morton
2006-03-28 20:42 ` Sergei Shtylylov [this message]
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=44299FAD.7080006@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).