LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 14/15] ide: rework the code for selecting the best DMA transfer mode
Date: Thu, 19 Apr 2007 23:46:55 +0400 [thread overview]
Message-ID: <4627C72F.3070300@ru.mvista.com> (raw)
In-Reply-To: <4627C5D1.5010602@ru.mvista.com>
Hello, I wrote:
>> Bartlomiej Zolnierkiewicz wrote:
>>> [PATCH] ide: rework the code for selecting the best DMA transfer mode
>>> Depends on the "ide: fix UDMA/MWDMA/SWDMA masks" patch.
>> I'm now trying to rewrite hpt366.c to benefit more from these
>> patches...
>> and alas, this very patch seems to be breaking filtering (at least) in
>> this driver. :-]
>>> Index: b/drivers/ide/ide-dma.c
>>> ===================================================================
>>> --- a/drivers/ide/ide-dma.c
>>> +++ b/drivers/ide/ide-dma.c
>>> @@ -705,6 +705,80 @@ int ide_use_dma(ide_drive_t *drive)
>>>
>>> EXPORT_SYMBOL_GPL(ide_use_dma);
>>>
>>> +static const u8 xfer_mode_bases[] = {
>>> + XFER_UDMA_0,
>>> + XFER_MW_DMA_0,
>>> + XFER_SW_DMA_0,
>>> +};
>>> +
>>> +static unsigned int ide_get_mode_mask(ide_drive_t *drive, u8 base)
>>> +{
>>> + struct hd_driveid *id = drive->id;
>>> + ide_hwif_t *hwif = drive->hwif;
>>> + unsigned int mask = 0;
>>> +
>>> + switch(base) {
>>> + case XFER_UDMA_0:
>>> + if ((id->field_valid & 4) == 0)
>>> + break;
>>> +
>>> + mask = id->dma_ultra & hwif->ultra_mask;
>>> +
>>> + if (hwif->udma_filter)
>>> + mask &= hwif->udma_filter(drive);
>>> +
>>> + if ((mask & 0x78) && (eighty_ninty_three(drive) == 0))
>>> + mask &= 0x07;
>
>
>> Note the subtle difference between the old and new behavior: the old
>> driver code was applying UltraDMA filter *after*
>> the cable type limit, and the new code does it *before*.
> Was there any particular reason to change that order?
Ah, I see. Cable-reduced mask can't be passed back to driver's filter. This needs changing.
MBR, Sergei
next prev parent reply other threads:[~2007-04-19 19:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-03 13:53 [PATCH 11/15] ide: make ide_hwif_t.ide_dma_{host_off,off_quietly} void Bartlomiej Zolnierkiewicz
2007-02-03 13:53 ` [PATCH 12/15] ide: make ide_hwif_t.ide_dma_host_on void Bartlomiej Zolnierkiewicz
2007-02-19 22:20 ` Olaf Hering
2007-02-19 23:21 ` Bartlomiej Zolnierkiewicz
2007-02-03 13:53 ` [PATCH 13/15] ide: fix UDMA/MWDMA/SWDMA masks Bartlomiej Zolnierkiewicz
2007-02-03 13:53 ` [PATCH 14/15] ide: rework the code for selecting the best DMA transfer mode Bartlomiej Zolnierkiewicz
2007-04-19 19:31 ` Sergei Shtylyov
2007-04-19 19:41 ` Sergei Shtylyov
2007-04-19 19:46 ` Sergei Shtylyov [this message]
2007-04-20 15:03 ` Sergei Shtylyov
2007-04-20 18:00 ` Sergei Shtylyov
2007-04-23 22:25 ` Bartlomiej Zolnierkiewicz
-- strict thread matches above, loose matches on Subject: below --
2007-01-19 0:30 [PATCH 0/15] IDE quilt tree updated Bartlomiej Zolnierkiewicz
2007-01-19 0:32 ` [PATCH 14/15] ide: rework the code for selecting the best DMA transfer mode Bartlomiej Zolnierkiewicz
2007-01-22 19:48 ` Sergei Shtylyov
[not found] ` <58cb370e0702021207o435f39cdsf3abb0d55829fc45@mail.gmail.com>
2007-02-02 23:57 ` Bartlomiej Zolnierkiewicz
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=4627C72F.3070300@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: [PATCH 14/15] ide: rework the code for selecting the best DMA transfer mode' \
/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
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).