mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: alan@redhat.com
Cc: Stephan von Krawczynski <skraw@ithnet.com>, linux-kernel@vger.kernel.org
Subject: Re: 2.4.21-pre4: PDC ide driver problems with shared interrupts
Date: 05 Feb 2003 12:16:02 +0100	[thread overview]
Message-ID: <1044443761.685.44.camel@zion.wanadoo.fr> (raw)
In-Reply-To: <20030205104845.17a0553c.skraw@ithnet.com>


> Okay, I had to watch for it a bit longer and it turns out that the kernel PDC driver has a problem in this shared interrupt setup. When loads get high it seems to run into some timing problem which causes things like:
> 
> Feb  4 01:02:22 admin kernel: hde: dma_intr: status=0xd0 { Busy }
> Feb  4 01:02:22 admin kernel: 
> Feb  4 01:02:22 admin kernel: PDC202XX: Primary channel reset.
> Feb  4 01:02:22 admin kernel: ide2: reset: success
> Feb  4 01:02:23 admin kernel: hde: status error: status=0x58 { DriveReady SeekComplete DataRequest }
> Feb  4 01:02:23 admin kernel: 
> Feb  4 01:02:23 admin kernel: hde: drive not ready for command
> Feb  4 01:02:23 admin kernel: hde: status error: status=0x50 { DriveReady SeekComplete }
> Feb  4 01:02:23 admin kernel: 
> Feb  4 01:02:23 admin kernel: hde: no DRQ after issuing WRITE
> Feb  4 01:02:23 admin kernel: hde: status timeout: status=0xd0 { Busy }
> Feb  4 01:02:23 admin kernel: 

Hi Alan !

I'm trying to get some sense out of the above report as it seem to match
a problem a user reported me as well. It's interesting because it's
apparently running UP, so it's not the SMP race found by Ross. It's
definitely a problem with shared interrupt though.

I've followed the code path involved here. Basically, we had
ide_dma_intr() called while the drive was busy. This is strange for a
simple reason: Even if we got the wrong interrupt (shared interrupt),
__ide_dma_test_irq() should have returned 0, and so ide_dma_intr
shouldn't have been called.

Assuming the driver was doing basic read/write operations, I checked
the code, and while it seems that do_rw_disk() is called without
the lock held nor interrupts masked, I see no obvious race.
drive->waiting_for_dma is set before setting up the handler and
issuing the command, and while the DMA engine is indeed started
only after sending the command, it's INTR bit have been cleared
previously (I suppose it can't be stale, or can it while the DMA
haven't been started yet ? In this case we would need to take
the lock here).

> Results are that the drive itself just hangs and has to be powered off (resetting the box does not work). The drives worked (and works) fine in non shared-interrupt context. Controller is:
> 
> <6>PDC20268: IDE controller at PCI slot 01:02.0
> <6>PCI: Found IRQ 11 for device 01:02.0
> <6>PDC20268: chipset revision 1
> <6>PDC20268: not 100%% native mode: will probe irqs later
> <6>    ide2: BM-DMA at 0x7400-0x7407, BIOS settings: hde:pio, hdf:pio
> <6>    ide3: BM-DMA at 0x7408-0x740f, BIOS settings: hdg:pio, hdh:pio
> <4>hdc: AOPEN CD-RW CRW2440, ATAPI CD/DVD-ROM drive
> <4>hde: ST380021A, ATA DISK drive
> <4>blk: queue c034e1f8, I/O limit 4095Mb (mask 0xffffffff)
> <4>hdg: IC35L060AVER07-0, ATA DISK drive
> <4>blk: queue c034e664, I/O limit 4095Mb (mask 0xffffffff)
> <4>ide1 at 0x170-0x177,0x376 on irq 15
> <4>ide2 at 0x8800-0x8807,0x8402 on irq 11
> <4>ide3 at 0x8000-0x8007,0x7802 on irq 11
> <4>hde: host protected area => 1
> <6>hde: 156301488 sectors (80026 MB) w/2048KiB Cache, CHS=155061/16/63, UDMA(100)
> <4>hdg: host protected area => 1
> <6>hdg: 120103200 sectors (61493 MB) w/1916KiB Cache, CHS=119150/16/63, UDMA(100)
> <6>Partition check:
> <6> hde: hde1
> <6> hdg:<6> [PTBL] [7476/255/63] hdg1
> 
> Regards,
> Stephan
> 
> PS: tg3 does great! Good job, Jeff...
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
-- 
Benjamin Herrenschmidt <benh@kernel.crashing.org>

  reply	other threads:[~2003-02-05 11:06 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-02 15:18 2.4.21-pre4: tg3 " Stephan von Krawczynski
2003-02-02 16:49 ` Jeff Garzik
2003-02-02 17:09   ` Stephan von Krawczynski
2003-02-02 17:15     ` Jeff Garzik
2003-02-02 17:52   ` Stephan von Krawczynski
2003-02-02 18:28     ` Jeff Garzik
2003-02-02 18:31       ` Stephan von Krawczynski
2003-02-03 10:25       ` Stephan von Krawczynski
2003-02-05  9:48       ` 2.4.21-pre4: PDC ide " Stephan von Krawczynski
2003-02-05 11:16         ` Benjamin Herrenschmidt [this message]
2003-02-05 11:39           ` Stephan von Krawczynski
2003-02-05 12:21             ` Alan Cox
2003-02-05 12:22             ` Benjamin Herrenschmidt
2003-02-05 12:50               ` Alan Cox
2003-02-05 13:19               ` Stephan von Krawczynski
2003-02-05 12:24           ` Alan Cox
2003-02-05 16:56           ` Ross Biro
2003-02-05 17:12             ` Benjamin Herrenschmidt
2003-02-05 17:19               ` Ross Biro
2003-02-05 17:34                 ` Benjamin Herrenschmidt
2003-02-05 17:38                   ` Stephan von Krawczynski
     [not found]                     ` <1044467091.685.155.camel@zion.wanadoo.fr>
2003-02-05 17:58                       ` Stephan von Krawczynski
2003-02-05 20:00                     ` Bryan Andersen
2003-02-05 19:10                 ` Alan Cox
2003-02-06 12:20               ` Stephan von Krawczynski
2003-02-06 23:04                 ` Benjamin Herrenschmidt
2003-02-07  9:10                   ` Stephan von Krawczynski
2003-02-05 16:44 Robbert Kouprie
2003-02-05 19:45 ` Bryan Andersen
     [not found] <7b263321.0302140626.2ddb7980@posting.google.com>
2003-02-14 14:41 ` Edward King
2003-02-14 15:41   ` Benjamin Herrenschmidt
     [not found] <20030202153009$2e0d@gated-at.bofh.it>
     [not found] ` <20030205181006$107c@gated-at.bofh.it>
     [not found]   ` <20030205181006$7bb8@gated-at.bofh.it>
     [not found]     ` <20030205181006$455c@gated-at.bofh.it>
     [not found]       ` <20030205181006$5dba@gated-at.bofh.it>
     [not found]         ` <20030205181006$3358@gated-at.bofh.it>
     [not found]           ` <200302061451.h16Epl0Z001134@pc.skynet.be>
2003-02-23 14:33             ` Stephan von Krawczynski
2003-02-23 15:04               ` Arjan van de Ven
2003-02-23 17:29                 ` Stephan von Krawczynski
     [not found] <3F1C54A8.5020404@snarkhunter.com>
2003-07-22 14:44 ` Edward King
2003-07-22 18:07   ` John V. Martinez
2003-07-22 21:02     ` Edward King

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=1044443761.685.44.camel@zion.wanadoo.fr \
    --to=benh@kernel.crashing.org \
    --cc=alan@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=skraw@ithnet.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®