All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Hancock <hancockrwd@gmail.com>
To: Russell King <rmk@arm.linux.org.uk>
Cc: linux-ide@vger.kernel.org
Subject: Re: 2.6.32: Promise UDMA33 card refuses to work in UDMA mode
Date: Sat, 02 Jan 2010 21:08:00 -0600	[thread overview]
Message-ID: <4B400A10.3000103@gmail.com> (raw)
In-Reply-To: <20100103002314.GA16528@flint.arm.linux.org.uk>

On 01/02/2010 06:23 PM, Russell King wrote:
> Okay, things have moved on, but not very much.
>
> I've pulled the card out of the ARM machine, and its now in an x86
> desktop, where, with 2.6.33-rc2 it behaves in exactly the same way.
> That is:
>
> - with libata
>    - UDMA reads work fine, every time.
>    - UDMA writes always fail with a CRC error.
>
>    Note: there appears to be an additional libata bug here: when the
>    speed gets knocked down to PIO mode, the block IO request is failed
>    with *no* PIO retries.  Subsequent IO requests succeed.  This means
>    that if you're using MD raid, your drive unnecessarily gets marked
>    as failed - not nice when things are actually still operational,
>    which can be seen by the other MD raid partitions on the drive
>    behaving just fine in PIO mode.

libata doesn't attempt any retries internally, that's up to the upper 
layers. If they're marking the array as failed after one failed request 
without any retries, that's presumably either intentional or a bug in 
the MD layer..

>
>    An additional note: it seems that libata reads the ATA taskfile
>    back from the drive on every command completion, successful or not -
>    there are at least 30 IO accesses between any two ATA commands.
>    Is there any reason for that?

It shouldn't be reading the entire taskfile back after completion unless 
it failed or it's marked as requiring result taskfile (ATA passthru 
commands or internal commands, i.e. during probing). You're seeing this 
on normal read/write commands?

>
> - with IDE
>    - locks the interrupt line, and makes the machine extremely painful -
>      about an hour to get to the point of being able to unload the
>      pdc202xx_old module.
>
> Having spent a lot of time today looking at the ATA drive, SFF DMA,
> promise IO configuration and PCI configuration registers, I can't see
> anything obviously wrong.
>
> Nevertheless, the fact is that this card does work with previous kernels
> just fine, and continues to work if I boot back to old kernels.  So,
> there is something going on which the old kernels do, which makes this
> card behave.
>
> I'm going to drop investigation of libata for the time being, and
> possibly switch to the old IDE driver to find out why its getting a
> stuck PCI interrupt.  Once the old IDE stuff works again, I'll be able
> to compare the differences between libata and IDE.
>
> On Thu, Dec 24, 2009 at 09:54:51PM +0000, Russell King wrote:
>> Some additions due to further testing:
>>
>> On Thu, Dec 24, 2009 at 06:13:00PM +0000, Russell King wrote:
>>> I tried upgrading my main machine from an old 2.6.23 kernel to 2.6.32.
>>> In doing so, I switched from IDE to ATA support.
>>
>> IDE on 2.6.32 results in "irq 24: nobody cared" for the IDE interrupt.
>> Booting back to 2.6.23 results in everything working normally again.
>>
>>> Could this be another case where the kernel should always need to write
>>> out the full task file to the drive?  I don't see any form of hardware
>>> control on the PDC20247 (which is the UDMA add-on to the PDC20246 chip)
>>> to control its mode, other than it snooping the taskfile writes.
>>
>> I tried commenting out the caching of the drive control register:
>>
>> diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
>> index bbbb1fa..ddd275a 100644
>> --- a/drivers/ata/libata-sff.c
>> +++ b/drivers/ata/libata-sff.c
>> @@ -574,12 +574,12 @@ void ata_sff_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)
>>   	struct ata_ioports *ioaddr =&ap->ioaddr;
>>   	unsigned int is_addr = tf->flags&  ATA_TFLAG_ISADDR;
>>
>> -	if (tf->ctl != ap->last_ctl) {
>> +//	if (tf->ctl != ap->last_ctl) {
>>   		if (ioaddr->ctl_addr)
>>   			iowrite8(tf->ctl, ioaddr->ctl_addr);
>>   		ap->last_ctl = tf->ctl;
>>   		ata_wait_idle(ap);
>> -	}
>> +//	}
>>
>>   	if (is_addr&&  (tf->flags&  ATA_TFLAG_LBA48)) {
>>   		WARN_ON_ONCE(!ioaddr->ctl_addr);
>>
>> This resulted in the same failure, but without the 'timeout' for the
>> second drive.  So there seems to be a separate problem in that when
>> the Promise host gets reset, the host state isn't properly updated on
>> all channels, resulting in the drive control register not being
>> written for the 'other' channel.
>>
>> --
>> Russell King
>>   Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
>>   maintainer of:
>


  reply	other threads:[~2010-01-03  3:08 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-24 18:13 2.6.32: Promise UDMA33 card refuses to work in UDMA mode Russell King
2009-12-24 21:54 ` Russell King
2010-01-03  0:23   ` Russell King
2010-01-03  3:08     ` Robert Hancock [this message]
2010-01-03 10:05       ` Russell King
2010-01-03 11:40         ` Alan Cox
2010-01-03 22:35     ` [PATCH] Fix Promise UDMA33 IDE driver (pdc202xx_old) Russell King
2010-01-04 19:14       ` Sergei Shtylyov
2010-01-05  6:26         ` David Miller
2010-01-05 17:49           ` Russell King
2010-01-05 17:52             ` Sergei Shtylyov
2010-01-03 23:46     ` 2.6.32: Promise UDMA33 card refuses to work in UDMA mode Russell King
2010-01-04 10:37       ` Alan Cox
2010-01-04 13:30         ` Russell King
2010-01-04 15:16           ` Alan Cox
2010-01-04 15:32             ` Jeff Garzik
2010-01-04 15:44               ` Russell King
2010-01-04 15:55                 ` Alan Cox
2010-01-04 16:15                   ` Russell King
2010-01-04 16:48                     ` Jeff Garzik
2010-01-04 17:16                     ` Sergei Shtylyov
2010-01-04 15:48               ` Alan Cox
2010-01-04 15:25           ` Jeff Garzik
2010-01-04 15:42             ` Russell King
2010-01-05  2:06               ` Robert Hancock
2010-01-05 11:25                 ` Alan Cox
2010-01-05 13:00                   ` Jeff Garzik
2010-01-05 13:37                     ` Alan Cox
2010-01-05 13:11                 ` Jeff Garzik
2010-01-04 15:46             ` Alan Cox
2010-01-04 16:32               ` Jeff Garzik
2010-01-04 17:02                 ` Alan Cox
2010-01-04 17:27                   ` Jeff Garzik
2010-01-04 17:30                     ` Russell King
2010-01-04 18:03                       ` Jeff Garzik
2010-01-04 18:06                         ` Russell King
2010-01-04 18:35                           ` Jeff Garzik
2010-01-04 17:38                     ` Alan Cox
2010-01-04 18:07                       ` Jeff Garzik
2010-01-04 18:29                   ` Jeff Garzik
2010-01-04 16:31           ` Bartlomiej Zolnierkiewicz
2010-01-04 17:28             ` Russell King
2010-01-04 17:39               ` Alan Cox
2010-01-04 17:46                 ` Russell King
2010-01-04 18:20                   ` Alan Cox
2010-01-04 17:49                 ` Bartlomiej Zolnierkiewicz
2010-01-05  1:03           ` Robert Hancock
2010-01-05 10:04             ` Jeff Garzik
2010-01-05 17:44             ` Russell King
2010-01-06  0:30               ` Robert Hancock

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=4B400A10.3000103@gmail.com \
    --to=hancockrwd@gmail.com \
    --cc=linux-ide@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.