All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karl Hiramoto <karl@hiramoto.org>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] PCI IRQ Pins
Date: Thu, 21 May 2009 18:19:39 +0200	[thread overview]
Message-ID: <4A157F1B.2040708@hiramoto.org> (raw)
In-Reply-To: <m3ab56g1iv.fsf@intrepid.localdomain>

Krzysztof Halasa wrote:
> Karl Hiramoto <karl@hiramoto.org> writes:
>
>   
>> Krzysztof, you mentioned clearing the IRQ in the platform code, is
>> there an example of this somewhere?
>>     
>
> Sure, e.g. in the patches I posted yesterday (not IRQ-related but
> you can do that the same way):
>
> static void __init gmlr_setup_nec(struct pci_dev *dev)
> {
> ...
> }
>
> DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_USB,
> 			 gmlr_setup_nec);
>
> Or:
> static int __init gmlr_pci_init(void)
>  {
> 	if (!machine_is_goramo_mlr())
> 		return 0;
>
> 	pci_common_init(&gmlr_hw_pci);
>
>  	if (xxx) {
> 		/* need to adjust number of USB ports on NEC chip */
> 		u32 value, addr = BIT(32 - SLOT_NEC) | 0xE0;
> 		if (!ixp4xx_pci_read(addr, NP_CMD_CONFIGREAD, &value)) {
> 			value &= ~7;
> 			value |= (hw_bits & CONFIG_HW_USB_PORTS);
> 			ixp4xx_pci_write(addr, NP_CMD_CONFIGWRITE, value);
> 		}
> 	}
> }
>
>   
>> There is a Compact flash on hda connected the the HPT371N,  looking at 
>> the IDE code it looks like the drive my not be ready,  or the drive may 
>> raise the IRQ..
>>     
>
> Non-DMA flash, I had issues with those and a VIA-based card.
>
>   
>> As soon as request_irq is called, the IRQ happens.
>>     
>
> Right. This means either the driver hasn't prepared the chip completely
> (perhaps there is some exception which isn't normally signalled?) or
> it's the other chip asking for interrupt.
>
> But
>
>   
>> irq 28: nobody cared (try booting with the "irqpoll" option)
>>     
> ...
>   
>> [<c0054bf8>] (request_threaded_irq+0x0/0xe0) from [<c01783c0>] 
>> (ide_host_register+0x444/0x60c)
>> [<c0177f7c>] (ide_host_register+0x0/0x60c) from [<c017c158>] 
>> (ide_pci_init_one+0xdc/0x10c)
>> [<c017c07c>] (ide_pci_init_one+0x0/0x10c) from [<c024cec0>] 
>> (hpt366_init_one+0x344/0x3a8)
>>  r8:c0321cac r7:c38737a0 r6:00000000 r5:c3814400 r4:c0321920
>> [<c024cb7c>] (hpt366_init_one+0x0/0x3a8) from [<c0015998>] 
>> (ide_scan_pcibus+0x50/0x124)
>>  r7:c0015948 r6:c0319330 r5:c3814400 r4:c0318fb4
>> [<c0015948>] (ide_scan_pcibus+0x0/0x124) from [<c0020290>] 
>> (do_one_initcall+0x58/0x190)
>>  r8:c0321cac r7:c0015948 r6:00000000 r5:c001c840 r4:c001c784
>> [<c0020238>] (do_one_initcall+0x0/0x190) from [<c0008744>] 
>>     
>
>   
>> handlers:
>> [<c0174bc0>] (ide_intr+0x0/0x220)
>>     
>
> And
>
>   
>> irq 28: nobody cared (try booting with the "irqpoll" option)
>>     
>
>   
>> [<c0054bf8>] (request_threaded_irq+0x0/0xe0) from [<bf0a65cc>] 
>> (ath_pci_probe+0x1a8/0x294 [ath9k])
>> [<bf0a6424>] (ath_pci_probe+0x0/0x294 [ath9k]) from [<c0152678>] 
>> (local_pci_probe+0x20/0x24)
>>     
>
>   
>> handlers:
>> [<c0174bc0>] (ide_intr+0x0/0x220)
>> [<bf09fde4>] (ath_isr+0x0/0x2cc [ath9k])
>> Disabling IRQ #28
>>     
>
> (it's ath9k and not ath5k as I previously thought).
>
> That means that both drivers (IRQ handlers) don't recognize the IRQ
> source. So either one of the drivers is very seriously broken (which
> I find hard to believe) or one of the chips generates an IRQ which isn't
> normally used (thus not checked for).
> But I would try to use a DMA-able CF first, perhaps it's the CF IRQ?
> And/or try to boot without the CF.
>   
Without the CF plugged in it also occurs.  :-(


-- 

--
Karl Hiramoto  

WARNING: multiple messages have this Message-ID (diff)
From: Karl Hiramoto <karl@hiramoto.org>
To: Krzysztof Halasa <khc@pm.waw.pl>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	"ath9k-devel@lists.ath9k.org" <ath9k-devel@lists.ath9k.org>,
	linux-arm-kernel <linux-arm-kernel@lists.arm.linux.org.uk>,
	linux-ide@vger.kernel.org
Subject: Re: PCI IRQ Pins
Date: Thu, 21 May 2009 18:19:39 +0200	[thread overview]
Message-ID: <4A157F1B.2040708@hiramoto.org> (raw)
In-Reply-To: <m3ab56g1iv.fsf@intrepid.localdomain>

Krzysztof Halasa wrote:
> Karl Hiramoto <karl@hiramoto.org> writes:
>
>   
>> Krzysztof, you mentioned clearing the IRQ in the platform code, is
>> there an example of this somewhere?
>>     
>
> Sure, e.g. in the patches I posted yesterday (not IRQ-related but
> you can do that the same way):
>
> static void __init gmlr_setup_nec(struct pci_dev *dev)
> {
> ...
> }
>
> DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_USB,
> 			 gmlr_setup_nec);
>
> Or:
> static int __init gmlr_pci_init(void)
>  {
> 	if (!machine_is_goramo_mlr())
> 		return 0;
>
> 	pci_common_init(&gmlr_hw_pci);
>
>  	if (xxx) {
> 		/* need to adjust number of USB ports on NEC chip */
> 		u32 value, addr = BIT(32 - SLOT_NEC) | 0xE0;
> 		if (!ixp4xx_pci_read(addr, NP_CMD_CONFIGREAD, &value)) {
> 			value &= ~7;
> 			value |= (hw_bits & CONFIG_HW_USB_PORTS);
> 			ixp4xx_pci_write(addr, NP_CMD_CONFIGWRITE, value);
> 		}
> 	}
> }
>
>   
>> There is a Compact flash on hda connected the the HPT371N,  looking at 
>> the IDE code it looks like the drive my not be ready,  or the drive may 
>> raise the IRQ..
>>     
>
> Non-DMA flash, I had issues with those and a VIA-based card.
>
>   
>> As soon as request_irq is called, the IRQ happens.
>>     
>
> Right. This means either the driver hasn't prepared the chip completely
> (perhaps there is some exception which isn't normally signalled?) or
> it's the other chip asking for interrupt.
>
> But
>
>   
>> irq 28: nobody cared (try booting with the "irqpoll" option)
>>     
> ...
>   
>> [<c0054bf8>] (request_threaded_irq+0x0/0xe0) from [<c01783c0>] 
>> (ide_host_register+0x444/0x60c)
>> [<c0177f7c>] (ide_host_register+0x0/0x60c) from [<c017c158>] 
>> (ide_pci_init_one+0xdc/0x10c)
>> [<c017c07c>] (ide_pci_init_one+0x0/0x10c) from [<c024cec0>] 
>> (hpt366_init_one+0x344/0x3a8)
>>  r8:c0321cac r7:c38737a0 r6:00000000 r5:c3814400 r4:c0321920
>> [<c024cb7c>] (hpt366_init_one+0x0/0x3a8) from [<c0015998>] 
>> (ide_scan_pcibus+0x50/0x124)
>>  r7:c0015948 r6:c0319330 r5:c3814400 r4:c0318fb4
>> [<c0015948>] (ide_scan_pcibus+0x0/0x124) from [<c0020290>] 
>> (do_one_initcall+0x58/0x190)
>>  r8:c0321cac r7:c0015948 r6:00000000 r5:c001c840 r4:c001c784
>> [<c0020238>] (do_one_initcall+0x0/0x190) from [<c0008744>] 
>>     
>
>   
>> handlers:
>> [<c0174bc0>] (ide_intr+0x0/0x220)
>>     
>
> And
>
>   
>> irq 28: nobody cared (try booting with the "irqpoll" option)
>>     
>
>   
>> [<c0054bf8>] (request_threaded_irq+0x0/0xe0) from [<bf0a65cc>] 
>> (ath_pci_probe+0x1a8/0x294 [ath9k])
>> [<bf0a6424>] (ath_pci_probe+0x0/0x294 [ath9k]) from [<c0152678>] 
>> (local_pci_probe+0x20/0x24)
>>     
>
>   
>> handlers:
>> [<c0174bc0>] (ide_intr+0x0/0x220)
>> [<bf09fde4>] (ath_isr+0x0/0x2cc [ath9k])
>> Disabling IRQ #28
>>     
>
> (it's ath9k and not ath5k as I previously thought).
>
> That means that both drivers (IRQ handlers) don't recognize the IRQ
> source. So either one of the drivers is very seriously broken (which
> I find hard to believe) or one of the chips generates an IRQ which isn't
> normally used (thus not checked for).
> But I would try to use a DMA-able CF first, perhaps it's the CF IRQ?
> And/or try to boot without the CF.
>   
Without the CF plugged in it also occurs.  :-(


-- 

--
Karl Hiramoto  


  reply	other threads:[~2009-05-21 16:19 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-20 11:41 [ath9k-devel] PCI IRQ Pins Karl Hiramoto
2009-05-20 12:39 ` Krzysztof Halasa
2009-05-20 20:51   ` Russell King - ARM Linux
2009-05-20 21:43     ` Krzysztof Halasa
2009-05-21  6:14       ` Karl Hiramoto
2009-05-21  6:14         ` Karl Hiramoto
2009-05-21  8:06         ` [ath9k-devel] " Karl Hiramoto
2009-05-21  8:06           ` Karl Hiramoto
2009-05-21 14:45           ` [ath9k-devel] " Sergei Shtylyov
2009-05-21 14:45             ` Sergei Shtylyov
2009-05-21 14:50             ` [ath9k-devel] " Karl Hiramoto
2009-05-21 14:50               ` Karl Hiramoto
2009-05-21 15:07               ` [ath9k-devel] " Karl Hiramoto
2009-05-21 15:07                 ` Karl Hiramoto
2009-05-21 16:43                 ` [ath9k-devel] " Krzysztof Halasa
2009-05-21 16:43                   ` Krzysztof Halasa
2009-05-21 19:12                   ` [ath9k-devel] " Karl Hiramoto
2009-05-21 19:12                     ` Karl Hiramoto
2009-05-21 16:44               ` [ath9k-devel] " Sergei Shtylyov
2009-05-21 16:44                 ` Sergei Shtylyov
2009-05-21 11:04         ` [ath9k-devel] " Krzysztof Halasa
2009-05-21 11:04           ` Krzysztof Halasa
2009-05-21 16:19           ` Karl Hiramoto [this message]
2009-05-21 16:19             ` Karl Hiramoto
2009-05-20 12:40 ` [ath9k-devel] " Michael Schwingen

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=4A157F1B.2040708@hiramoto.org \
    --to=karl@hiramoto.org \
    --cc=ath9k-devel@lists.ath9k.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.