From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: ide patches
Date: Tue, 24 Jul 2007 08:00:25 +1000 [thread overview]
Message-ID: <1185228025.5439.139.camel@localhost.localdomain> (raw)
In-Reply-To: <200707232322.22129.bzolnier@gmail.com>
On Mon, 2007-07-23 at 23:22 +0200, Bartlomiej Zolnierkiewicz wrote:
> Hi,
>
> Thanks for reviewing and testing this patch series.
>
> On Monday 23 July 2007, Benjamin Herrenschmidt wrote:
> >
> > > 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. It's not the case with
> > > 2.6.22 from my quick tests. The problem is that ide_config_drive_speed
> > > disables DMA, but only re-enables it when setting a DMA speed. I think
>
> The problem is that _many_ chipsets don't support separate PIO and DMA
> timings so disabling DMA while programming chipset for PIO timings is a
> necessity for them.
Disabling while programming is fine with me. The problem is that we
don't restore DMA after programming the PIO timings.
Yes, but we still need to address it as it's a regression for ide-pmac
when moving to the generic ide_config_drive_speed.
> > > - For some reason, nowadays, hdparm -p /dev/hda will not autotune, but
> > > will set PIO 0 (hdparm -p 255 /dev/hda will autotune). Might be a bug in
> > > whatever hdparm version I have here.
>
> Since -p 255 works fine it would indicate a hdparm issue.
Yup. All hdparm's around do that, I need to find out when it actually
broke (if it did, but I -think- that early versions used to autotune
with just -p).
> > > - Some userland scripts installed on debian as part of the pbbuttonsd
> > > package are doing hdaprm -p /dev/device on all IDE devices at boot.
> >
> > In the meantime, that patch applied on top of your latest series fixes
> > the PIO setting in the driver to send the correct mode value in
>
> Looks fine.
>
> Could you please rebase it on top of the fixed "ide-pmac: PIO mode setup
> fixes" patch, remove debugging printks and add description/Signed-off-by?
Sure.
> Also since the patch series has been tested please verify that your concerns
> wrt patches #4, #8 and #10 are still valid.
I've been using that weird machine without problems at boot, but I still
need to test actual hotplug of the media bay, this is usually when the
shit hits the fan. It's quite possible that some of the fixes you did to
ide_config_drive_speed() (or other changes around) are also fixing that
problem, it used to look a lot like a heisenbug back then. However, I'm
still annoyed that with all current debian or ubuntu distro, you'll end
up with DMA disabled at boot because of those pbbuttons scripts.
> > pmac_ide_set_pio_mode(). I still object to your patch serie at this
> > point because hdparm -p N should not, imho, cause DMA to be disabled.
>
> If this change indeed causes some serious problem which breaks userland on
> ppc (that can't be workarounded otherwise) we may add a new ->host_flags
> flag and special hack to ide-io.c::do_special(), something like:
>
> ...
> int keep_dma = drive->using_dma;
> ...
> ide_set_pio(drive, req_pio);
> ...
> if (hwif->host_flags & IDE_HFLAG_SET_PIO_MODE_KEEP_DMA) {
> if (keep_dma)
> hwif->ide_dma_on(drive);
> }
> ...
>
> which should preserve the old behavior.
Yea, please.
> I will respin patch #11 with necessary changes if needed.
>
> > I really believe that the kernel should keep track separately of PIO and
> > DMA speeds.
>
> Agreed.
Excellent, we all agree :-)
Cheers,
Ben.
next prev parent reply other threads:[~2007-07-23 22:00 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 [this message]
2007-07-29 10:48 ` Sergei Shtylyov
2007-07-29 14:39 ` Bartlomiej Zolnierkiewicz
2007-07-23 13:16 ` Sergei Shtylyov
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=1185228025.5439.139.camel@localhost.localdomain \
--to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox