All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
	linux-ide@vger.kernel.org
Subject: Re: ide patches
Date: Mon, 23 Jul 2007 17:16:41 +0400	[thread overview]
Message-ID: <46A4AA39.3030401@ru.mvista.com> (raw)
In-Reply-To: <1185155835.5439.91.camel@localhost.localdomain>

Hello.

Benjamin Herrenschmidt wrote:

>>>Note that with all your patches applied, it doesn't seem to auto-tune
>>>the speed at boot anymore and doesn't enable DMA. I can make it do so
>>>with hdparm -d1, in which case, for example, on this wallstreet, I get
>>>MDMA2 which is correct, however, it seems to also set PIO0 which it
>>>should set PIO4...

>>One of the problems is that you do XFER_PIO + pio in
>>pmac_ide_set_pio_mode(), which is no good. XFER_PIO is a bad constant
>>name and causes that sort of confusion :-)

    Yeah, it's #define'd as 0 in drivers/ide/ide-timings.h... :-/

>>Fix is to use XFER_PIO_0 + pio. I'll send a patch fixing that plus a few

    I think Bart will just recast his patch (as usual).

>>other things on top of yours once I've found out what's up with DMA.
>>I've enable autotune, I see it sending the 0x22 command, but hdparm
>>still claims DMA isn't enabled.

> Ok, there's a combination of things here:

>  - First, doing a set_pio from userland (hdparm -p XX) causes the kernel
> to disable DMA, which I think is incorrect.

    That's the way ide_config_drive_speed() works.

> It's not the case with 2.6.22 from my quick tests.

   Which means that PIO autotuning is broken there, i.e. that 
ide_config_drive_speed() not called from the driver's tuneproc() method.

> The problem is that ide_config_drive_speed
> disables DMA, but only re-enables it when setting a DMA speed.

    It never "re-enables" DMA. ide_dma_host_on() method is not the same as 
ide_dma_on() which actually enables DMA.

> I think
> the whole idea of having a "current speed" is bogus here, we should have
> a separate current DMA speed and current PIO speed. We should be able to
> set the PIO timings without stopping DMA, toggling DMA is a separate
> affair.

    Agreed completely.

MBR, Sergei

  parent reply	other threads:[~2007-07-23 13:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-22 18:19 [PATCH] ide-pmac: fix drive->init_speed reporting Bartlomiej Zolnierkiewicz
2007-07-22 21:50 ` Benjamin Herrenschmidt
2007-07-23 21:20   ` Bartlomiej Zolnierkiewicz
2007-07-22 23:55 ` ide patches Benjamin Herrenschmidt
2007-07-23  1:21   ` Benjamin Herrenschmidt
2007-07-23  1:57     ` Benjamin Herrenschmidt
2007-07-23  2:01       ` Benjamin Herrenschmidt
2007-07-23 13:50         ` Sergei Shtylyov
2007-07-23 21:49           ` Benjamin Herrenschmidt
2007-07-23 21:22         ` Bartlomiej Zolnierkiewicz
2007-07-23 22:00           ` Benjamin Herrenschmidt
2007-07-29 10:48           ` Sergei Shtylyov
2007-07-29 14:39             ` Bartlomiej Zolnierkiewicz
2007-07-23 13:16       ` Sergei Shtylyov [this message]
2007-07-23 21:48         ` Benjamin Herrenschmidt
2007-07-23 22:06           ` Sergei Shtylyov
2007-07-23 22:08             ` Benjamin Herrenschmidt

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=46A4AA39.3030401@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=benh@kernel.crashing.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.