linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	linux-ide@vger.kernel.org, akpm@osdl.org, jeff@garzik.org
Subject: Re: [PATCH] pata_cmd64x: Set up MWDMA modes properly
Date: Sat, 11 Aug 2007 23:37:48 +0200	[thread overview]
Message-ID: <200708112337.48458.bzolnier@gmail.com> (raw)
In-Reply-To: <46BE1452.4010603@ru.mvista.com>

On Saturday 11 August 2007, Sergei Shtylyov wrote:
> Hello.
> 
> Alan Cox wrote:
> 
> > Set the MWDMA timing by updating the correct registers. Split the PIO
> > path as this is mostly shared code. Wants testing.
> 
>     Cool! So much simpler than my fix to the old IDE driver...
> 
> > Signed-off-by: Alan Cox <alan@redhat.com>
> 
> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> 
> > diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.23rc1-mm1/drivers/ata/pata_cmd64x.c linux-2.6.23rc1-mm1/drivers/ata/pata_cmd64x.c
> > --- linux.vanilla-2.6.23rc1-mm1/drivers/ata/pata_cmd64x.c	2007-07-26 15:01:52.000000000 +0100
> > +++ linux-2.6.23rc1-mm1/drivers/ata/pata_cmd64x.c	2007-08-08 11:52:23.000000000 +0100
> [...]
> > @@ -117,8 +118,9 @@
> >  	int arttim = arttim_port[ap->port_no][adev->devno];
> >  	int drwtim = drwtim_port[ap->port_no][adev->devno];
> >  
> > -
> > -	if (ata_timing_compute(adev, adev->pio_mode, &t, T, 0) < 0) {
> > +	/* ata_timing_compute is smart and will produce timings for MWDMA
> > +	   that don't violate the drives PIO capabilities. */
> > +	if (ata_timing_compute(adev, mode, &t, T, 0) < 0) {
> >  		printk(KERN_ERR DRV_NAME ": mode computation failed.\n");
> >  		return;
> >  	}
> 
>     That function rocks (except I didn't get what the address setup timings 
> mean to SW/MW DMA)...

JFYI: this function was "borrowed" from drivers/ide/ide-timing.h,
you can use it in IDE host drivers as well... ;)

Bart

  parent reply	other threads:[~2007-08-11 21:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-08 13:33 [PATCH] pata_cmd64x: Set up MWDMA modes properly Alan Cox
2007-08-11 19:56 ` Sergei Shtylyov
2007-08-11 20:44   ` Alan Cox
2007-08-17 15:39     ` Sergei Shtylyov
2007-08-11 21:37   ` Bartlomiej Zolnierkiewicz [this message]
2007-08-17 15:41     ` Sergei Shtylyov
  -- strict thread matches above, loose matches on Subject: below --
2007-08-09 23:09 Mikael Pettersson
2007-08-09 23:21 ` Alan Cox

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=200708112337.48458.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jeff@garzik.org \
    --cc=linux-ide@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).