public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
	Russell King <rmk@arm.linux.org.uk>
Subject: Re: [PATCH 1/3] pata_pdc202xx_old: fix UDMA mode for Promise UDMA33 cards
Date: Sat, 13 Feb 2010 17:39:40 -0500	[thread overview]
Message-ID: <4B772A2C.4050009@garzik.org> (raw)
In-Reply-To: <20100213133553.11564.95723.sendpatchset@localhost>

On 02/13/2010 08:35 AM, Bartlomiej Zolnierkiewicz wrote:
> From: Bartlomiej Zolnierkiewicz<bzolnier@gmail.com>
> Subject: [PATCH] pata_pdc202xx_old: fix UDMA mode for Promise UDMA33 cards
>
> On Monday 04 January 2010 02:30:24 pm Russell King wrote:
>
>> Found the problem - getting rid of the read of the alt status register
>> after the command has been written fixes the UDMA CRC errors on write:
>>
>> @@ -676,7 +676,8 @@ void ata_sff_exec_command(struct ata_port *ap, const struct
>> ata_taskfile *tf)
>>          DPRINTK("ata%u: cmd 0x%X\n", ap->print_id, tf->command);
>>
>>          iowrite8(tf->command, ap->ioaddr.command_addr);
>> -       ata_sff_pause(ap);
>> +       ndelay(400);
>> +//     ata_sff_pause(ap);
>>   }
>>   EXPORT_SYMBOL_GPL(ata_sff_exec_command);
>>
>>
>> This rather makes sense.  The PDC20247 handles the UDMA part of the
>> protocol.  It has no way to tell the PDC20246 to wait while it suspends
>> UDMA, so that a normal register access can take place - the 246 ploughs
>> on with the register access without any regard to the state of the 247.
>>
>> If the drive immediately starts the UDMA protocol after a write to the
>> command register (as it probably will for the DMA WRITE command), then
>> we'll be accessing the taskfile in the middle of the UDMA setup, which
>> can't be good.  It's certainly a violation of the ATA specs.
>
> Fix it by adding custom ->sff_exec_command method for UDMA33 chipsets.
>
> Debugged-by: Russell King<rmk@arm.linux.org.uk>
> Signed-off-by: Bartlomiej Zolnierkiewicz<bzolnier@gmail.com>
> ---
>   drivers/ata/pata_pdc202xx_old.c |   13 ++++++++++++-
>   1 file changed, 12 insertions(+), 1 deletion(-)

applied



  reply	other threads:[~2010-02-13 22:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-13 13:35 [git patches] atang tree: fix UDMA mode for older Promise controllers Bartlomiej Zolnierkiewicz
2010-02-13 13:35 ` [PATCH 1/3] pata_pdc202xx_old: fix UDMA mode for Promise UDMA33 cards Bartlomiej Zolnierkiewicz
2010-02-13 22:39   ` Jeff Garzik [this message]
2010-02-13 13:35 ` [PATCH 2/3] pata_pdc202xx_old: fix UDMA mode for PDC2026x chipsets Bartlomiej Zolnierkiewicz
2010-02-13 13:44   ` Bartlomiej Zolnierkiewicz
2010-02-13 22:44     ` Jeff Garzik
2010-02-13 13:36 ` [PATCH 3/3] pata_pdc202xx_old: update documentation Bartlomiej Zolnierkiewicz

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=4B772A2C.4050009@garzik.org \
    --to=jeff@garzik.org \
    --cc=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    /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