From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 10/13] sl82c105: add ->speedproc support
Date: Thu, 15 Mar 2007 22:51:18 +0100 [thread overview]
Message-ID: <200703152251.18615.bzolnier@gmail.com> (raw)
In-Reply-To: <45F86058.6090509@ru.mvista.com>
On Wednesday 14 March 2007, Sergei Shtylyov wrote:
> Hello, I wrote:
>
> >>> Bartlomiej Zolnierkiewicz wrote:
>
> >>>> [PATCH] sl82c105: add ->speedproc support
>
> >>>> * add sl82c105_tunepio() wrapper for sl82c105_tune_drive()
> >>>> (just to get the error value)
>
> >>>> * add sl82c105_tune_chipset() (->speedproc method) for setting
> >>>> transfer mode
>
> >>> Thanks for the patch!
>
> >>> > Index: b/drivers/ide/pci/sl82c105.c
>
> >>>> ===================================================================
> >>>> --- a/drivers/ide/pci/sl82c105.c
> >>>> +++ b/drivers/ide/pci/sl82c105.c
>
> > [...]
>
> >>>> @@ -114,17 +114,45 @@ static void sl82c105_tune_drive(ide_driv
> >>>> */
> >>>> drive->io_32bit = 1;
> >>>> drive->unmask = 1;
> >>>> +
> >>>> + return 0;
> >>>> +}
> >>>> +
> >>>> +static void sl82c105_tune_drive(ide_drive_t *drive, u8 pio)
> >>>> +{
> >>>> + /*
> >>>> + * TODO: find best PIO mode and set device speed here
> >>>> + * (requires adding helper function for getting PIO cycle
> >>>> time)
> >>>> + */
>
> >>> I thought we were doing it by calling ide_get_best_pio_mode() above...
>
> >> We are also using ide_get_best_pio_mode() to get PIO cycle time
> >> so we can't move it here ATM.
>
> > I've found/used quite convenient workaround for that -- return PIO
> > mode actually selected from xxx_tune_pio(), then call
> > ide_config_drive_speed() from the real tuneproc() method.
>
> Works like charm with ignoring the result, since ide_get_best_pio_mode()
> returns the same explicit mode as was passed to it -- so is good for the
> speedproc() methods also...
>
> >>>> + (void)sl82c105_tunepio(drive, pio);
>
> >>> Erm, I thought afterwards that I vainly folded one into another. I
> >>> think it's worth moving those io_32bit and unmask flag assignments
> >>> above back there... May also recast my patch. :-)
>
> >> Moving them to ->init_hwif where they belong would be even better... ;-)
>
> > Well, I wasn't sure where they belong... :-)
> > So, OK to recast that patch?
>
> Recasted it and reworked your patch atop of it (adding MWDMA 0/1 support as
> a bonus! :-) -- now need to conduct some testing on a remote target...
Great. :)
Bart
prev parent reply other threads:[~2007-03-15 21:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-10 21:09 [PATCH 10/13] sl82c105: add ->speedproc support Bartlomiej Zolnierkiewicz
2007-03-10 21:51 ` Sergei Shtylyov
2007-03-10 22:32 ` Bartlomiej Zolnierkiewicz
2007-03-12 13:13 ` Sergei Shtylyov
2007-03-14 20:51 ` Sergei Shtylyov
2007-03-15 14:22 ` Woody Suwalski
2007-03-15 17:36 ` Russell King
2007-03-15 17:40 ` Sergei Shtylyov
2007-03-15 21:51 ` Bartlomiej Zolnierkiewicz [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=200703152251.18615.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sshtylyov@ru.mvista.com \
/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).