All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Jeff Garzik <jeff@garzik.org>,
	akpm@osdl.org, linux-ide@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pata_cmd640: CMD640 PCI support
Date: Sat, 03 Mar 2007 22:38:05 +0300	[thread overview]
Message-ID: <45E9CE9D.9030807@ru.mvista.com> (raw)
In-Reply-To: <20070303203339.6f605ac9@lxorguk.ukuu.org.uk>

Alan Cox wrote:
>>>>+    if (t.active > 16)
>>>>+        t.active = 16;
>>
>>    Erm, clamping active time is not a right thing to do. Right thing to do 
>>was to bail out. I didn't do it in the legacy driver rewrite though...

> As far as I can work out its a "can't happen"

>>>>+        pci_read_config_byte(pdev, ARTIM23, &reg);

>>    It's not even expensive, it may be just unsafe.

> You have to serialize the channels and idle both so its very expensive -
> or is that what you meant by unsafe.

    I meant that the address setup timing should always match that of a slower 
device -- *no* switching.

>>>>+    /* CMD640 detected, commiserations */
>>>>+    pci_write_config_byte(pdev, 0x5C, 0x00);

>>>magic number

>>   Indeed, completely undocumented. And I don't even see it in the legacy 
>>driver...

> Should be 0x5B which is still undocumented. Will fix that.

    Ah, that's what became DRWTIM3 in the later chips?

>>    It's used to be a well known fact (soon after Intel put that chip on their 
>>motherboards :-) that PCI0640 may return bad data on command block reads if 
>>another channel has data port I/O going on. That's why the interrupts needed 
>>to be disabled during PIO in the legacy driver (and the channels serialized).

> I was under the impression this was only the situation with the
> FIFO/readahead logic enabled, as with the RZ1000 ?

    Sorry, I mixed up with RZ1000 for the Intel's case -- memory fade. :-<

> Can you clarify that at all ?

    Yeah, it was happening with IDE prefetch of course...

> Alan

WBR, Sergei

      reply	other threads:[~2007-03-03 19:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-02 15:03 [PATCH] pata_cmd640: CMD640 PCI support Alan Cox
2007-03-02 23:26 ` Jeff Garzik
2007-03-03  0:52   ` Alan Cox
2007-03-03 17:12   ` Sergei Shtylyov
2007-03-03 20:33     ` Alan Cox
2007-03-03 19:38       ` Sergei Shtylyov [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=45E9CE9D.9030807@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jeff@garzik.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.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 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.