From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: David Miller <davem@davemloft.net>,
bzolnier@gmail.com, linux-ide@vger.kernel.org, elendil@planet.nl
Subject: Re: [PATCH] Serialize CMD643 and CMD646 to fix a hardware bug with SSD
Date: Mon, 26 Oct 2009 21:20:13 +0300 [thread overview]
Message-ID: <4AE5E85D.9060408@ru.mvista.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0910260717290.21316@hs20-bc2-1.build.redhat.com>
Hello.
Mikulas Patocka wrote:
>> Are you sure? Anyway, there's no need as we're reading the interrupt bits
>>CFR/ARTTIM23 registers first (at least in the IDE code). Look at the
>>cmd*_test_irq() methods and ide_intr().
> Maybe the BMIDE status bit is just the same as CFR/ARTTIM23 interrupt bit.
Maybe -- if it indeed gets set in PIO mode as well. In this case though,
there's quite little sense in having that bit mirrored (even twice with the
newer controllers).
>>>there is an unexpected interrupt on the inactive channel --- this should be
>>>much more safe than reading the status register. If there is an interrupt,
>>>then
>>>--- read the status of the inactive channel? (potential data corruption, but
>>>it is reported to happen only on boot).
>>>--- Or can the interrupt be acknowledged only in BM-status without touching
>>>the device? I believe yes,
>> And I believe no. BMIDE status bit doesn't acknoledge (clear, to be precise)
>>the IDE interrupts, only the status register read does.
> There are two things: IDE interrupt line set by the device (BMIDE status
> doesn't do anything with it) and chipset's INT[A-D] interrupt line --- and
> BMIDE status should clear it, at least for some chipsets.
> Some chipset documentation (not for CMD64x) thatI have says that BMIDE
> irq status is set on any interrupt regardless if it's DMA or NONDMA.
That is rather untypical behavior although some chipsets like Intel ICH
are known to do it.
> On ICH SATA (in legacy non-AHCI mode), it is even required to acknowledge
> PIO interrupts with BMIDE status, otherwise the interrupt stays pending.
>>>it shoud shut the PCI interrupt but it would leave the IDE interrupt line on
>>>(should be cleared on next command).
>> I think the negated wired-OR of both INTRQ signals serves as an -INTA
>>source, not the BMIDE status bits. At least in the general case, where the
>>BMIDE status doesn't reflect PIO mode interrupts.
> It is not as simple, INTA and BMIDE status must be postponed until the
> chip flushes its buffers and writes the DMA last byte to the memory.
I know. The delay logic only acts in the DMA case. And it doesn't have
to delay the interrupt itself, only the BMIDE status read with bit 2 set --
which is achievable by retrying the I/O transaction on PCI until the DMA
actually completes.
> I agree with you that for some chipsets BMIDE doesn't have to be signalled
> in PIO mode --- but remember that here we are talking about dealing with
> broken devices that set the interrupt line spuriously and about
> serializing chipsets --- not about all chipsets and all devices.
> So the best that can be done for such broken devices is to try to shut the
> interrupt in BMIDE register (or PCI registers in CMD64x). There is nothing
> better to do.
And we're doing it, now for the PIO case also.
> If you have serializing chipset that doesn't let you shut
> interrupt and the inactive device fires spuriously --- there is absolutely
> nothing that can be done about it.
Yes, seems so from ide_intr()...
> Mikulas
WBR, Sergei
next prev parent reply other threads:[~2009-10-26 18:20 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-21 18:55 [PATCH] Serialize CMD643 and CMD646 to fix a hardware bug with SSD Mikulas Patocka
2009-10-21 19:34 ` Mikael Pettersson
2009-10-21 23:01 ` Mikulas Patocka
2009-10-27 11:34 ` Alan Cox
2009-10-28 1:10 ` Mikulas Patocka
2009-10-21 19:39 ` Bartlomiej Zolnierkiewicz
2009-10-22 0:41 ` David Miller
2009-10-22 9:44 ` Bartlomiej Zolnierkiewicz
2009-10-22 11:00 ` David Miller
2009-10-22 11:15 ` Bartlomiej Zolnierkiewicz
2009-10-22 11:20 ` David Miller
2009-10-23 14:29 ` Mikulas Patocka
2009-10-23 14:31 ` David Miller
2009-10-23 14:44 ` Bartlomiej Zolnierkiewicz
2009-10-23 14:55 ` Mikulas Patocka
2009-10-23 15:03 ` Bartlomiej Zolnierkiewicz
2009-10-23 15:18 ` Daniela Engert
2009-10-23 16:51 ` Alan Cox
2009-10-23 17:27 ` Sergei Shtylyov
2009-10-23 18:22 ` Alan Cox
2009-10-23 18:52 ` Bartlomiej Zolnierkiewicz
2009-10-24 3:24 ` David Miller
2009-10-24 12:38 ` Bartlomiej Zolnierkiewicz
2009-10-24 12:58 ` David Miller
2009-10-24 13:13 ` Bartlomiej Zolnierkiewicz
2009-10-24 13:20 ` David Miller
2009-10-26 11:36 ` Mikulas Patocka
2009-10-26 12:18 ` Alan Cox
2009-11-05 1:25 ` [PATCH] Don't use UDMA on VIA UDMA33 controller with Transcend SSD Mikulas Patocka
2009-11-05 10:40 ` Alan Cox
2009-11-05 22:18 ` Mikulas Patocka
2009-11-05 22:46 ` Alan Cox
2009-11-05 23:19 ` Mikulas Patocka
2009-11-17 12:30 ` David Miller
2009-11-18 17:09 ` Mikulas Patocka
2009-11-18 17:22 ` Alan Cox
2009-11-18 17:32 ` David Miller
2009-11-18 17:46 ` Mikulas Patocka
2009-11-18 17:53 ` David Miller
2009-11-18 18:04 ` Mikulas Patocka
2009-11-18 17:37 ` Mikulas Patocka
2009-11-18 17:50 ` Alan Cox
2009-11-18 18:02 ` Mikulas Patocka
2011-10-11 17:12 ` Bartlomiej Zolnierkiewicz
2011-10-11 19:05 ` David Miller
2011-10-11 19:39 ` Alan Cox
2011-10-12 14:38 ` Bartlomiej Zolnierkiewicz
2011-10-12 17:59 ` Alan Cox
2011-10-13 10:35 ` Bartlomiej Zolnierkiewicz
2010-01-14 15:49 ` Bartlomiej Zolnierkiewicz
2010-01-14 19:24 ` Alan Cox
2010-01-14 20:17 ` Bartlomiej Zolnierkiewicz
2009-10-23 17:15 ` [PATCH] Serialize CMD643 and CMD646 to fix a hardware bug with SSD Alan Cox
2009-10-22 13:56 ` Alan Cox
2009-10-23 1:30 ` David Miller
2009-10-23 14:50 ` Mikulas Patocka
2009-10-23 20:50 ` Sergei Shtylyov
2009-10-26 11:30 ` Mikulas Patocka
2009-10-26 18:20 ` Sergei Shtylyov [this message]
2009-10-24 11:28 ` Frans Pop
2009-10-24 11:31 ` David Miller
2009-10-25 2:48 ` Frans Pop
2009-10-29 10:02 ` David Miller
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=4AE5E85D.9060408@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=bzolnier@gmail.com \
--cc=davem@davemloft.net \
--cc=elendil@planet.nl \
--cc=linux-ide@vger.kernel.org \
--cc=mpatocka@redhat.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 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.