linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: linux-ide@vger.kernel.org, stable@kernel.org, alan@lxorguk.ukuu.org.uk
Subject: Re: [PATCH] pata_hpt{37x|3x2n}: fix timing register masks (take 2)
Date: Thu, 03 Dec 2009 02:36:23 -0500	[thread overview]
Message-ID: <4B176A77.3080606@pobox.com> (raw)
In-Reply-To: <200911272129.02616.sshtylyov@ru.mvista.com>

On 11/27/2009 01:29 PM, Sergei Shtylyov wrote:
> These drivers inherited from the older 'hpt366' IDE driver the buggy timing
> register masks in their set_piomode() metods. As a result, too low command
> cycle active time is programmed for slow PIO modes.  Quite fortunately, it's
> later "fixed up" by the set_dmamode() methods which also "helpfully" reprogram
> the command timings, usually to PIO mode 4; unfortunately, setting an UltraDMA
> mode #N also reprograms already set PIO data timings, usually to MWDMA mode #
> max(N, 2) timings...
>
> However, the drivers added some breakage of their own too:  the bit that they
> set/clear to control the FIFO is sometimes wrong -- it's actually the MSB of
> the command cycle setup time; also, setting it in DMA mode is wrong as this
> bit is only for PIO actually and clearing it for PIO modes is not needed as
> no mode in any timing table has it set...
>
> Fix all this, inverting the masks while at it, like in the 'hpt366' and
> 'pata_hpt366' drivers; bump the drivers' versions, accounting for recent
> patches that forgot to do it...
>
> Signed-off-by: Sergei Shtylyov<sshtylyov@ru.mvista.com>
> Cc: stable@kernel.org
>
> ---
> The patch is against the recent Linus' tree. It's intended to go into all
> stable kernels starting with 2.6.19, when the PATA drivers were first merged --
> the version change hunks should be dropped when merging to the older kernels...
>
>   drivers/ata/pata_hpt37x.c  |   32 +++++++++++++++-----------------
>   drivers/ata/pata_hpt3x2n.c |   17 ++++++++---------
>   2 files changed, 23 insertions(+), 26 deletions(-)

applied



      reply	other threads:[~2009-12-03  7:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-27 18:29 [PATCH] pata_hpt{37x|3x2n}: fix timing register masks (take 2) Sergei Shtylyov
2009-12-03  7:36 ` Jeff Garzik [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=4B176A77.3080606@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-ide@vger.kernel.org \
    --cc=sshtylyov@ru.mvista.com \
    --cc=stable@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;
as well as URLs for NNTP newsgroup(s).