From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: "Steven A. Falco" <sfalco@harris.com>
Cc: Jeff Garzik <jgarzik@pobox.com>,
linuxppc-dev@ozlabs.org, linux-ide@vger.kernel.org, "Sparks,
Sam" <SSparks@aclaratech.com>
Subject: Re: [PATCH] pata_of_platform: fix no irq handling
Date: Mon, 11 Aug 2008 21:07:56 +0400 [thread overview]
Message-ID: <20080811170756.GA29827@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <48A0676E.5020308@harris.com>
On Mon, Aug 11, 2008 at 12:23:10PM -0400, Steven A. Falco wrote:
> Anton Vorontsov wrote:
> > When no irq specified, pata_of_platform fills irq_res with -1,
> > which is wrong to do for two reasons:
> >
> > 1. By definition, 'no irq' should be IRQ 0, not some negative integer;
> > 2. pata_platform checks for irq_res.start > 0, but since irq_res.start
> > is unsigned type, the check will be true for `-1'.
> >
> > Reported-by: Steven A. Falco <sfalco@harris.com>
> > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> > ---
>
> Thanks! Your fix is better - I didn't really like the -1 stuff.
>
> I found this bug because I had to disable the ATA interrupt on my system
> in order to get a compact-flash card to work. I am still trying to find
> out why the interrupt doesn't work for me. Here is part of the console
> log with the interrupt enabled:
>
> Uniform Multi-Platform E-IDE driver
> ide: Assuming 33MHz system bus speed for PIO modes; override with
> idebus=xx
> Driver 'sd' needs updating - please use bus_type methods
> irq: irq_create_mapping(0xc0574900, 0x1b)
> irq: -> using host @c0574900
> irq: -> obtained virq 32
> scsi0 : pata_platform
> ata1: PATA max PIO4 mmio cmd 0x1c1000000 ctl 0x1c1000080 irq 32
> irq 32: nobody cared (try booting with the "irqpoll" option)
> Call Trace:
> [cf83fcc0] [c0005a64] show_stack+0x44/0x1ac (unreliable)
> [cf83fd00] [c00489e4] __report_bad_irq+0x34/0xb8
> [cf83fd20] [c0048cf0] note_interrupt+0x288/0x2d0
> [cf83fd50] [c0049a94] handle_level_irq+0xac/0x114
> [cf83fd60] [c0003df0] do_IRQ+0xa4/0xc8
> [cf83fd70] [c000d60c] ret_from_except+0x0/0x18
> [cf83fe30] [00000020] 0x20
> [cf83fe50] [c0003d48] do_softirq+0x54/0x58
> [cf83fe60] [c00241c0] irq_exit+0x90/0x94
> [cf83fe70] [c0003df4] do_IRQ+0xa8/0xc8
> [cf83fe80] [c000d60c] ret_from_except+0x0/0x18
> [cf83ff40] [c01b2cc0] ata_pio_task+0x48/0x104
> [cf83ff60] [c00307a0] run_workqueue+0xb8/0x148
> [cf83ff90] [c0030d54] worker_thread+0x70/0xd0
> [cf83ffd0] [c0034788] kthread+0x48/0x84
> [cf83fff0] [c000cd6c] kernel_thread+0x44/0x60
> handlers:
> [<c01b2d7c>] (ata_sff_interrupt+0x0/0x234)
> Disabling IRQ #32
>
>
> So it looks like the ATA handler was attached - not sure yet why I got
> the "nobody cared" message.
Nobody cared means that ata_sff_interrupt handler didn't notice
any IDE events, and returned zero value. This could mean that
1. IDE status read does not work. (But am I understand correctly
that IDE works well if IRQ is unspecified? Then this is hardly
an issue.)
2. IDE interrupt comes when it should not. I'd recommend to use
oscilloscope to find out what is happening there, that is, if
the drive actually deasserts its irq line after status read.
If so, than this could be a PIC problem.
What is the platform on which you're observing the issue, btw?
Just asking because recently Sam Sparks reported that he is observing
similar issue on MPC8349E-mITX-based boards, which I can't not
reproduce on my board though:
http://www.nabble.com/Compact-Flash-on-8349mITX-td18754330.html
http://www.nabble.com/Compact-flash-on-mpc8349eITX-td18777724.html
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
next prev parent reply other threads:[~2008-08-11 17:07 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <48A05152.7020508@harris.com>
2008-08-11 15:19 ` [PATCH] pata_of_platform: fix no irq handling Anton Vorontsov
2008-08-11 16:23 ` Steven A. Falco
2008-08-11 17:07 ` Anton Vorontsov [this message]
2008-08-11 22:00 ` Benjamin Herrenschmidt
2008-08-12 14:00 ` Steven A. Falco
2008-08-12 14:04 ` Anton Vorontsov
2008-08-12 14:18 ` Stefan Roese
2008-08-12 14:18 ` Sergei Shtylyov
2008-08-12 14:31 ` Anton Vorontsov
2008-08-13 21:25 ` Steven A. Falco
2008-08-11 16:29 ` Alan Cox
2008-08-11 16:36 ` Ben Dooks
2008-08-11 16:26 ` Alan Cox
2008-08-11 16:42 ` Steven A. Falco
2008-08-11 22:02 ` Benjamin Herrenschmidt
[not found] <20080925083622.GA2701@debian>
[not found] ` <48DB51C3.6040504@linux.net.cn>
2008-09-25 10:40 ` [PATCH] pata_platform struct resource signness fix Li Yang
2008-09-25 10:48 ` Anton Vorontsov
2008-09-29 4:19 ` Jeff Garzik
2008-09-29 13:32 ` [PATCH] pata_of_platform: fix no irq handling Anton Vorontsov
2008-10-06 17:26 Anton Vorontsov
2008-10-06 20:41 ` Matt Sealey
2008-10-06 21:32 ` Anton Vorontsov
2008-10-07 1:30 ` Tejun Heo
2008-10-07 9:18 ` Wang Jian
2008-10-07 9:26 ` Anton Vorontsov
2008-10-07 10:04 ` Benjamin Herrenschmidt
2008-10-07 9:37 ` Alan Cox
2008-10-08 8:40 ` David Woodhouse
2008-10-08 9:00 ` Alan Cox
2008-10-08 9:59 ` Geert Uytterhoeven
2008-10-08 10:27 ` Alan Cox
2008-10-10 17:55 ` Paul Mundt
2008-10-13 6:56 ` Tejun Heo
2008-10-13 13:27 ` Jeff Garzik
2008-10-13 13:53 ` Tejun Heo
2008-10-13 23:27 ` Benjamin Herrenschmidt
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=20080811170756.GA29827@oksana.dev.rtsoft.ru \
--to=avorontsov@ru.mvista.com \
--cc=SSparks@aclaratech.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=sfalco@harris.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;
as well as URLs for NNTP newsgroup(s).