public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] VIA IRQ quirk for 2.6.12-rc5
@ 2005-05-27  8:21 Len Brown
  2005-05-27  8:53 ` [PATCH] ACPI build fix " Len Brown
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Len Brown @ 2005-05-27  8:21 UTC (permalink / raw)
  To: torvalds-3NddpPZAyC0
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	bjorn.helgaas-VXdhtT5mjnY

Linus,
Please apply this patch to 2.6.12-rc5.
It fixes a 2.6.11 regression in the VIA IRQ quirk
on machines with mixed vendor chip-sets.

thanks,
Len


Delete quirk_via_bridge(), restore quirk_via_irqpic() --
but now improved to be invoked upon device ENABLE, and
now only for VIA devices -- not all devices behind VIA bridges.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
Signed-off-by: Len Brown <len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Andrew Morton <akpm-3NddpPZAyC0@public.gmane.org>


diff -uprN -X dontdiff linux-2.6.12-rc5.orig/arch/i386/pci/irq.c linux-2.6.12-rc5/arch/i386/pci/irq.c
--- linux-2.6.12-rc5.orig/arch/i386/pci/irq.c	2005-05-27 01:42:45.000000000 -0400
+++ linux-2.6.12-rc5/arch/i386/pci/irq.c	2005-05-27 02:31:41.000000000 -0400
@@ -1029,7 +1029,6 @@ void pcibios_penalize_isa_irq(int irq)
 static int pirq_enable_irq(struct pci_dev *dev)
 {
 	u8 pin;
-	extern int via_interrupt_line_quirk;
 	struct pci_dev *temp_dev;
 
 	pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
@@ -1084,10 +1083,6 @@ static int pirq_enable_irq(struct pci_de
 		printk(KERN_WARNING "PCI: No IRQ known for interrupt pin %c of device %s.%s\n",
 		       'A' + pin, pci_name(dev), msg);
 	}
-	/* VIA bridges use interrupt line for apic/pci steering across
-	   the V-Link */
-	else if (via_interrupt_line_quirk)
-		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq & 15);
 	return 0;
 }
 
diff -uprN -X dontdiff linux-2.6.12-rc5.orig/drivers/acpi/pci_irq.c linux-2.6.12-rc5/drivers/acpi/pci_irq.c
--- linux-2.6.12-rc5.orig/drivers/acpi/pci_irq.c	2005-05-27 01:43:08.000000000 -0400
+++ linux-2.6.12-rc5/drivers/acpi/pci_irq.c	2005-05-27 02:31:41.000000000 -0400
@@ -391,7 +391,6 @@ acpi_pci_irq_enable (
 	u8			pin = 0;
 	int			edge_level = ACPI_LEVEL_SENSITIVE;
 	int			active_high_low = ACPI_ACTIVE_LOW;
-	extern int		via_interrupt_line_quirk;
 	char			*link = NULL;
 
 	ACPI_FUNCTION_TRACE("acpi_pci_irq_enable");
@@ -444,9 +443,6 @@ acpi_pci_irq_enable (
 		}
  	}
 
-	if (via_interrupt_line_quirk)
-		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq & 15);
-
 	dev->irq = acpi_register_gsi(irq, edge_level, active_high_low);
 
 	printk(KERN_INFO PREFIX "PCI Interrupt %s[%c] -> ",
diff -uprN -X dontdiff linux-2.6.12-rc5.orig/drivers/pci/quirks.c linux-2.6.12-rc5/drivers/pci/quirks.c
--- linux-2.6.12-rc5.orig/drivers/pci/quirks.c	2005-05-27 01:43:34.000000000 -0400
+++ linux-2.6.12-rc5/drivers/pci/quirks.c	2005-05-27 02:35:27.000000000 -0400
@@ -18,6 +18,7 @@
 #include <linux/pci.h>
 #include <linux/init.h>
 #include <linux/delay.h>
+#include <linux/acpi.h>
 #include "pci.h"
 
 /* Deal with broken BIOS'es that neglect to enable passive release,
@@ -467,9 +468,6 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AM
  * non-x86 architectures (yes Via exists on PPC among other places),
  * we must mask the PCI_INTERRUPT_LINE value versus 0xf to get
  * interrupts delivered properly.
- *
- * TODO: When we have device-specific interrupt routers,
- * quirk_via_irqpic will go away from quirks.
  */
 
 /*
@@ -494,6 +492,29 @@ static void __devinit quirk_via_acpi(str
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C586_3,	quirk_via_acpi );
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C686_4,	quirk_via_acpi );
 
+static void __devinit quirk_via_irqpic(struct pci_dev *dev)
+{
+	u8 irq, new_irq;
+
+#ifdef CONFIG_X86_IO_APIC
+	if (nr_ioapics && !skip_ioapic_setup)
+		return;
+#endif
+#ifdef CONFIG_ACPI
+	if (acpi_irq_model != ACPI_IRQ_MODEL_PIC)
+		return;
+#endif
+	new_irq = dev->irq & 0xf;
+	pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
+	if (new_irq != irq) {
+		printk(KERN_INFO "PCI: Via PIC IRQ fixup for %s, from %d to %d\n",
+			pci_name(dev), irq, new_irq);
+		udelay(15);	/* unknown if delay really needed */
+		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq);
+	}
+}
+DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_irqpic);
+
 /*
  * PIIX3 USB: We have to disable USB interrupts that are
  * hardwired to PIRQD# and may be shared with an
@@ -683,19 +704,6 @@ static void __init quirk_disable_pxb(str
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82454NX,	quirk_disable_pxb );
 
-/*
- *	VIA northbridges care about PCI_INTERRUPT_LINE
- */
-int via_interrupt_line_quirk;
-
-static void __devinit quirk_via_bridge(struct pci_dev *pdev)
-{
-	if(pdev->devfn == 0) {
-		printk(KERN_INFO "PCI: Via IRQ fixup\n");
-		via_interrupt_line_quirk = 1;
-	}
-}
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,	PCI_ANY_ID,                     quirk_via_bridge );
 
 /*
  *	Serverworks CSB5 IDE does not fully support native mode
diff -uprN -X dontdiff linux-2.6.12-rc5.orig/include/linux/acpi.h linux-2.6.12-rc5/include/linux/acpi.h
--- linux-2.6.12-rc5.orig/include/linux/acpi.h	2005-05-27 01:44:10.000000000 -0400
+++ linux-2.6.12-rc5/include/linux/acpi.h	2005-05-27 02:47:04.000000000 -0400
@@ -25,6 +25,8 @@
 #ifndef _LINUX_ACPI_H
 #define _LINUX_ACPI_H
 
+#ifdef	CONFIG_ACPI
+
 #ifndef _LINUX
 #define _LINUX
 #endif
@@ -533,4 +535,5 @@ static inline int acpi_get_pxm(acpi_hand
 
 extern int pnpacpi_disabled;
 
-#endif /*_LINUX_ACPI_H*/
+#endif	/* CONFIG_ACPI */
+#endif	/*_LINUX_ACPI_H*/


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] ACPI build fix for 2.6.12-rc5
  2005-05-27  8:21 [PATCH] VIA IRQ quirk for 2.6.12-rc5 Len Brown
@ 2005-05-27  8:53 ` Len Brown
  2005-05-27 10:48   ` Alexander Nyberg
       [not found]   ` <20050527085326.GA29767-g3qfMnKXm6l/wjb6y0L7XlrsPObopucw0e7PPNI6Mm0@public.gmane.org>
  2005-05-27 10:27 ` [PATCH] VIA IRQ quirk " Alexander Nyberg
       [not found] ` <20050527082150.GA24428-g3qfMnKXm6l/wjb6y0L7XlrsPObopucw0e7PPNI6Mm0@public.gmane.org>
  2 siblings, 2 replies; 8+ messages in thread
From: Len Brown @ 2005-05-27  8:53 UTC (permalink / raw)
  To: torvalds; +Cc: acpi-devel, linux-kernel

Linus,
Please apply this CONFIG_ACPI=n build fix to 2.6.12-rc5

thanks,
Len

Fix 2.6.12 CONFIG_ACPI=n build regression.
CONFIG_ACPI_BOOT shall be set only if CONFIG_ACPI.

Signed-off-by: Len Brown <len.brown@intel.com>

--- linux-2.6.12-rc5/drivers/acpi/Kconfig.orig	2005-05-27 04:34:21.000000000 -0400
+++ linux-2.6.12-rc5/drivers/acpi/Kconfig	2005-05-27 04:07:52.000000000 -0400
@@ -40,13 +40,12 @@ config ACPI
 	  available at:
 	  <http://www.acpi.info>
 
+if ACPI
+
 config ACPI_BOOT
 	bool
-	depends on ACPI || X86_HT
 	default y
 
-if ACPI
-
 config ACPI_INTERPRETER
 	bool
 	depends on !IA64_SGI_SN

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] VIA IRQ quirk for 2.6.12-rc5
       [not found] ` <20050527082150.GA24428-g3qfMnKXm6l/wjb6y0L7XlrsPObopucw0e7PPNI6Mm0@public.gmane.org>
@ 2005-05-27 10:09   ` Alan Cox
       [not found]     ` <1117188546.5730.175.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
  2005-05-27 15:47   ` Sergio Monteiro Basto
  1 sibling, 1 reply; 8+ messages in thread
From: Alan Cox @ 2005-05-27 10:09 UTC (permalink / raw)
  To: Len Brown
  Cc: torvalds-3NddpPZAyC0, Linux Kernel Mailing List,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	bjorn.helgaas-VXdhtT5mjnY

On Gwe, 2005-05-27 at 09:21, Len Brown wrote:
> Delete quirk_via_bridge(), restore quirk_via_irqpic() --
> but now improved to be invoked upon device ENABLE, and
> now only for VIA devices -- not all devices behind VIA bridges.

Properly you should apply the fixup to all VBUS devices. I've not seen a
clean way to identify which devices fall into that category but there
are public 
data sheets for many of the chips.

> +		printk(KERN_INFO "PCI: Via PIC IRQ fixup for %s, from %d to %d\n",
> +			pci_name(dev), irq, new_irq);
> +		udelay(15);	/* unknown if delay really needed */
> +		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq);

It isn't



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] VIA IRQ quirk for 2.6.12-rc5
  2005-05-27  8:21 [PATCH] VIA IRQ quirk for 2.6.12-rc5 Len Brown
  2005-05-27  8:53 ` [PATCH] ACPI build fix " Len Brown
@ 2005-05-27 10:27 ` Alexander Nyberg
       [not found] ` <20050527082150.GA24428-g3qfMnKXm6l/wjb6y0L7XlrsPObopucw0e7PPNI6Mm0@public.gmane.org>
  2 siblings, 0 replies; 8+ messages in thread
From: Alexander Nyberg @ 2005-05-27 10:27 UTC (permalink / raw)
  To: Len Brown; +Cc: acpi-devel, linux-kernel, torvalds, bjorn.helgaas

> Linus,
> Please apply this patch to 2.6.12-rc5.
> It fixes a 2.6.11 regression in the VIA IRQ quirk
> on machines with mixed vendor chip-sets.
> 
> thanks,
> Len
> 
> 
> Delete quirk_via_bridge(), restore quirk_via_irqpic() --
> but now improved to be invoked upon device ENABLE, and
> now only for VIA devices -- not all devices behind VIA bridges.

Please drop the __devinit on quirk_via_irqpic() or apply the patch I'm
putting at the bottom. Also there seems to be a completely unrelated
acpi chunk at the bottom of your patch...

quirk_via_irqpic can't be __devinit for swsuspend

Signed-off-by: Alexander Nyberg <alexn@telia.com>

Index: linux-2.6/drivers/pci/quirks.c
===================================================================
--- linux-2.6.orig/drivers/pci/quirks.c	2005-05-27 12:15:17.000000000 +0200
+++ linux-2.6/drivers/pci/quirks.c	2005-05-27 12:17:10.000000000 +0200
@@ -492,7 +492,7 @@
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C586_3,	quirk_via_acpi );
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C686_4,	quirk_via_acpi );
 
-static void __devinit quirk_via_irqpic(struct pci_dev *dev)
+static void quirk_via_irqpic(struct pci_dev *dev)
 {
 	u8 irq, new_irq;
 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ACPI build fix for 2.6.12-rc5
  2005-05-27  8:53 ` [PATCH] ACPI build fix " Len Brown
@ 2005-05-27 10:48   ` Alexander Nyberg
       [not found]   ` <20050527085326.GA29767-g3qfMnKXm6l/wjb6y0L7XlrsPObopucw0e7PPNI6Mm0@public.gmane.org>
  1 sibling, 0 replies; 8+ messages in thread
From: Alexander Nyberg @ 2005-05-27 10:48 UTC (permalink / raw)
  To: Len Brown; +Cc: ak, torvalds, acpi-devel, linux-kernel

fre 2005-05-27 klockan 04:53 -0400 skrev Len Brown:
> Linus,
> Please apply this CONFIG_ACPI=n build fix to 2.6.12-rc5
> 
> thanks,
> Len
> 
> Fix 2.6.12 CONFIG_ACPI=n build regression.
> CONFIG_ACPI_BOOT shall be set only if CONFIG_ACPI.
>

You can still set CONFIG_ACPI_BOOT && !CONFIG_ACPI by choosing
CONFIG_PCI => CONFIG_PCI_MMCONFIG (doesn't build very well either).

Make CONFIG_ACPI_BOOT fully depend on CONFIG_ACPI

Signed-off-by: Alexander Nyberg <alexn@telia.com>

Index: linux-2.6/arch/i386/Kconfig
===================================================================
--- linux-2.6.orig/arch/i386/Kconfig	2005-05-17 23:14:51.000000000 +0200
+++ linux-2.6/arch/i386/Kconfig	2005-05-27 12:33:42.000000000 +0200
@@ -1163,7 +1163,7 @@
 
 config PCI_MMCONFIG
 	bool
-	depends on PCI && (PCI_GOMMCONFIG || (PCI_GOANY && ACPI))
+	depends on PCI && ACPI && (PCI_GOMMCONFIG || PCI_GOANY)
 	select ACPI_BOOT
 	default y
 
Index: linux-2.6/arch/x86_64/Kconfig
===================================================================
--- linux-2.6.orig/arch/x86_64/Kconfig	2005-05-17 23:14:53.000000000 +0200
+++ linux-2.6/arch/x86_64/Kconfig	2005-05-27 12:32:59.000000000 +0200
@@ -421,7 +421,7 @@
 
 config PCI_MMCONFIG
 	bool "Support mmconfig PCI config space access"
-	depends on PCI
+	depends on PCI && ACPI
 	select ACPI_BOOT
 
 config UNORDERED_IO

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ACPI build fix for 2.6.12-rc5
       [not found]   ` <20050527085326.GA29767-g3qfMnKXm6l/wjb6y0L7XlrsPObopucw0e7PPNI6Mm0@public.gmane.org>
@ 2005-05-27 15:27     ` Linus Torvalds
  0 siblings, 0 replies; 8+ messages in thread
From: Linus Torvalds @ 2005-05-27 15:27 UTC (permalink / raw)
  To: Len Brown
  Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Kernel Mailing List,
	Alexander Nyberg



On Fri, 27 May 2005, Len Brown wrote:
>
> Linus,
> Please apply this CONFIG_ACPI=n build fix to 2.6.12-rc5

Done.

Just a quick note about the Subject line, though (and this is not 
actually particular to Len at all, it's the second email on this that I 
send out just today ;)..

Since my automated tools will take the Subject line as the changelog
entry, and in fact it gets special treatment and ends up being in
shortlogs and in the gitweb summary pages etc, I like it when the Subject
line is "clean" in the sense that it makes sense in that context.

In particular, it's good for _me_ to know that a patch is against a
certain release (and not a "-mm" tree for example), so I certainly don't
mind seeing the the patch is for "2.6.12-rc5". But once it is in the tree,
that versioning information is pointless, and sometimes even wrong (ie
maybe I ended up actually applying the patch only after I released the
next kernel, and now that very public comment just looks strange).

So unless the version is literally important for the patch itself (ie, it 
might _be_ about the version numbers in the Makefile, and you send in a 
patch that changes the all-important NAME field of a particular release), 
I actually much prefer to see these "meta-comments" inside the [] in the 
Subject line, which automatically gets pruned off by the scripts.

IOW, something like this:

	[PATCH -rc5] ACPI build fix

works well (usually the major release is obvious, which is why I shorted 
it to just that part, but it's all up to you at that point: it will be 
peeled off and just replaced with [PATCH] by the scripts).

So in general, you can have small messages for the patch recipient in
there, but don't go overboard. If it's longer than twenty characters, it 
will usually mean that the _actual_ subject line may not show fully in my 
mail index, of course..

			Linus


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] VIA IRQ quirk for 2.6.12-rc5
       [not found] ` <20050527082150.GA24428-g3qfMnKXm6l/wjb6y0L7XlrsPObopucw0e7PPNI6Mm0@public.gmane.org>
  2005-05-27 10:09   ` Alan Cox
@ 2005-05-27 15:47   ` Sergio Monteiro Basto
  1 sibling, 0 replies; 8+ messages in thread
From: Sergio Monteiro Basto @ 2005-05-27 15:47 UTC (permalink / raw)
  To: Len Brown
  Cc: torvalds-3NddpPZAyC0, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	bjorn.helgaas-VXdhtT5mjnY

Hi Len,

Bjorn Helgaas has updated this issue on email [ACPI] [PATCH] PCI: do VIA IRQ fixup always, not just in PIC mode (resend)

My suggestion is reopen the bug 3319 
http://bugme.osdl.org/show_bug.cgi?id=3319
for track down better this issue .

thanks, 


Len Brown wrote:

>Linus,
>Please apply this patch to 2.6.12-rc5.
>It fixes a 2.6.11 regression in the VIA IRQ quirk
>on machines with mixed vendor chip-sets.
>
>thanks,
>Len
>
>
>Delete quirk_via_bridge(), restore quirk_via_irqpic() --
>but now improved to be invoked upon device ENABLE, and
>now only for VIA devices -- not all devices behind VIA bridges.
>
>Signed-off-by: Bjorn Helgaas <bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
>Signed-off-by: Len Brown <len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>Signed-off-by: Andrew Morton <akpm-3NddpPZAyC0@public.gmane.org>
>
>
>diff -uprN -X dontdiff linux-2.6.12-rc5.orig/arch/i386/pci/irq.c linux-2.6.12-rc5/arch/i386/pci/irq.c
>--- linux-2.6.12-rc5.orig/arch/i386/pci/irq.c	2005-05-27 01:42:45.000000000 -0400
>+++ linux-2.6.12-rc5/arch/i386/pci/irq.c	2005-05-27 02:31:41.000000000 -0400
>@@ -1029,7 +1029,6 @@ void pcibios_penalize_isa_irq(int irq)
> static int pirq_enable_irq(struct pci_dev *dev)
> {
> 	u8 pin;
>-	extern int via_interrupt_line_quirk;
> 	struct pci_dev *temp_dev;
> 
> 	pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
>@@ -1084,10 +1083,6 @@ static int pirq_enable_irq(struct pci_de
> 		printk(KERN_WARNING "PCI: No IRQ known for interrupt pin %c of device %s.%s\n",
> 		       'A' + pin, pci_name(dev), msg);
> 	}
>-	/* VIA bridges use interrupt line for apic/pci steering across
>-	   the V-Link */
>-	else if (via_interrupt_line_quirk)
>-		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq & 15);
> 	return 0;
> }
> 
>diff -uprN -X dontdiff linux-2.6.12-rc5.orig/drivers/acpi/pci_irq.c linux-2.6.12-rc5/drivers/acpi/pci_irq.c
>--- linux-2.6.12-rc5.orig/drivers/acpi/pci_irq.c	2005-05-27 01:43:08.000000000 -0400
>+++ linux-2.6.12-rc5/drivers/acpi/pci_irq.c	2005-05-27 02:31:41.000000000 -0400
>@@ -391,7 +391,6 @@ acpi_pci_irq_enable (
> 	u8			pin = 0;
> 	int			edge_level = ACPI_LEVEL_SENSITIVE;
> 	int			active_high_low = ACPI_ACTIVE_LOW;
>-	extern int		via_interrupt_line_quirk;
> 	char			*link = NULL;
> 
> 	ACPI_FUNCTION_TRACE("acpi_pci_irq_enable");
>@@ -444,9 +443,6 @@ acpi_pci_irq_enable (
> 		}
>  	}
> 
>-	if (via_interrupt_line_quirk)
>-		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq & 15);
>-
> 	dev->irq = acpi_register_gsi(irq, edge_level, active_high_low);
> 
> 	printk(KERN_INFO PREFIX "PCI Interrupt %s[%c] -> ",
>diff -uprN -X dontdiff linux-2.6.12-rc5.orig/drivers/pci/quirks.c linux-2.6.12-rc5/drivers/pci/quirks.c
>--- linux-2.6.12-rc5.orig/drivers/pci/quirks.c	2005-05-27 01:43:34.000000000 -0400
>+++ linux-2.6.12-rc5/drivers/pci/quirks.c	2005-05-27 02:35:27.000000000 -0400
>@@ -18,6 +18,7 @@
> #include <linux/pci.h>
> #include <linux/init.h>
> #include <linux/delay.h>
>+#include <linux/acpi.h>
> #include "pci.h"
> 
> /* Deal with broken BIOS'es that neglect to enable passive release,
>@@ -467,9 +468,6 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AM
>  * non-x86 architectures (yes Via exists on PPC among other places),
>  * we must mask the PCI_INTERRUPT_LINE value versus 0xf to get
>  * interrupts delivered properly.
>- *
>- * TODO: When we have device-specific interrupt routers,
>- * quirk_via_irqpic will go away from quirks.
>  */
> 
> /*
>@@ -494,6 +492,29 @@ static void __devinit quirk_via_acpi(str
> DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C586_3,	quirk_via_acpi );
> DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C686_4,	quirk_via_acpi );
> 
>+static void __devinit quirk_via_irqpic(struct pci_dev *dev)
>+{
>+	u8 irq, new_irq;
>+
>+#ifdef CONFIG_X86_IO_APIC
>+	if (nr_ioapics && !skip_ioapic_setup)
>+		return;
>+#endif
>+#ifdef CONFIG_ACPI
>+	if (acpi_irq_model != ACPI_IRQ_MODEL_PIC)
>+		return;
>+#endif
>+	new_irq = dev->irq & 0xf;
>+	pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
>+	if (new_irq != irq) {
>+		printk(KERN_INFO "PCI: Via PIC IRQ fixup for %s, from %d to %d\n",
>+			pci_name(dev), irq, new_irq);
>+		udelay(15);	/* unknown if delay really needed */
>+		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq);
>+	}
>+}
>+DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_irqpic);
>+
> /*
>  * PIIX3 USB: We have to disable USB interrupts that are
>  * hardwired to PIRQD# and may be shared with an
>@@ -683,19 +704,6 @@ static void __init quirk_disable_pxb(str
> }
> DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82454NX,	quirk_disable_pxb );
> 
>-/*
>- *	VIA northbridges care about PCI_INTERRUPT_LINE
>- */
>-int via_interrupt_line_quirk;
>-
>-static void __devinit quirk_via_bridge(struct pci_dev *pdev)
>-{
>-	if(pdev->devfn == 0) {
>-		printk(KERN_INFO "PCI: Via IRQ fixup\n");
>-		via_interrupt_line_quirk = 1;
>-	}
>-}
>-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,	PCI_ANY_ID,                     quirk_via_bridge );
> 
> /*
>  *	Serverworks CSB5 IDE does not fully support native mode
>diff -uprN -X dontdiff linux-2.6.12-rc5.orig/include/linux/acpi.h linux-2.6.12-rc5/include/linux/acpi.h
>--- linux-2.6.12-rc5.orig/include/linux/acpi.h	2005-05-27 01:44:10.000000000 -0400
>+++ linux-2.6.12-rc5/include/linux/acpi.h	2005-05-27 02:47:04.000000000 -0400
>@@ -25,6 +25,8 @@
> #ifndef _LINUX_ACPI_H
> #define _LINUX_ACPI_H
> 
>+#ifdef	CONFIG_ACPI
>+
> #ifndef _LINUX
> #define _LINUX
> #endif
>@@ -533,4 +535,5 @@ static inline int acpi_get_pxm(acpi_hand
> 
> extern int pnpacpi_disabled;
> 
>-#endif /*_LINUX_ACPI_H*/
>+#endif	/* CONFIG_ACPI */
>+#endif	/*_LINUX_ACPI_H*/
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by Yahoo.
>Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
>Search APIs Find out how you can build Yahoo! directly into your own
>Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
>_______________________________________________
>Acpi-devel mailing list
>Acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>https://lists.sourceforge.net/lists/listinfo/acpi-devel
>  
>



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] VIA IRQ quirk for 2.6.12-rc5
       [not found]     ` <1117188546.5730.175.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
@ 2005-06-22 16:17       ` Bjorn Helgaas
  0 siblings, 0 replies; 8+ messages in thread
From: Bjorn Helgaas @ 2005-06-22 16:17 UTC (permalink / raw)
  To: Alan Cox
  Cc: Len Brown, torvalds-3NddpPZAyC0, Linux Kernel Mailing List,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On Friday 27 May 2005 4:09 am, Alan Cox wrote:
> On Gwe, 2005-05-27 at 09:21, Len Brown wrote:
> > Delete quirk_via_bridge(), restore quirk_via_irqpic() --
> > but now improved to be invoked upon device ENABLE, and
> > now only for VIA devices -- not all devices behind VIA bridges.
> 
> Properly you should apply the fixup to all VBUS devices. I've not seen a
> clean way to identify which devices fall into that category but there
> are public 
> data sheets for many of the chips.

Do you have any specific references?  I've browsed through the VIA specs
here: http://gkernel.sourceforge.net/specs/via/, but I haven't seen any
mention of VBUS or any notes about programming PCI_INTERRUPT_LINE.

Or do you have any contacts at VIA?  This is going to take a long time
to untangle by trial and error.


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-06-22 16:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-27  8:21 [PATCH] VIA IRQ quirk for 2.6.12-rc5 Len Brown
2005-05-27  8:53 ` [PATCH] ACPI build fix " Len Brown
2005-05-27 10:48   ` Alexander Nyberg
     [not found]   ` <20050527085326.GA29767-g3qfMnKXm6l/wjb6y0L7XlrsPObopucw0e7PPNI6Mm0@public.gmane.org>
2005-05-27 15:27     ` Linus Torvalds
2005-05-27 10:27 ` [PATCH] VIA IRQ quirk " Alexander Nyberg
     [not found] ` <20050527082150.GA24428-g3qfMnKXm6l/wjb6y0L7XlrsPObopucw0e7PPNI6Mm0@public.gmane.org>
2005-05-27 10:09   ` Alan Cox
     [not found]     ` <1117188546.5730.175.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2005-06-22 16:17       ` Bjorn Helgaas
2005-05-27 15:47   ` Sergio Monteiro Basto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox