2006-10-01 01:23:24

by Jeff Garzik

[permalink] [raw]
Subject: zoran driver breaks 'make all{yes,mod}config'

Current linux-2.6.git doesn't build anymore:

CC [M] drivers/media/video/zoran_driver.o
drivers/media/video/zoran_driver.c: In function ?setup_fbuffer?:
drivers/media/video/zoran_driver.c:1519: error: ?PCIAGP_FAIL? undeclared
(first use in this function)
drivers/media/video/zoran_driver.c:1519: error: (Each undeclared
identifier is reported only once
drivers/media/video/zoran_driver.c:1519: error: for each function it
appears in.)

Same build breakage in bt484, saa7134.

The PCIAGP_FAIL symbol doesn't exist anywhere.


2006-10-01 02:33:17

by Linus Torvalds

[permalink] [raw]
Subject: Re: zoran driver breaks 'make all{yes,mod}config'



On Sun, 1 Oct 2006, Eric Rannaud wrote:
>
> Indeed, the following -mm patch from Alan Cox is missing:
> pci-quirks-update.patch

Please don't send on patches with authorship information destroyed, and
without adding the proper sign-offs.. (It also looks like you destroyed
white-space, so it wouldn't apply even if it was otherwise valid).

Linus

2006-10-01 01:41:31

by Eric Rannaud

[permalink] [raw]
Subject: Re: zoran driver breaks 'make all{yes,mod}config'

Indeed, the following -mm patch from Alan Cox is missing:
pci-quirks-update.patch


-- (should be the most recent) --
From: Alan Cox
This fixes two things

Firstly someone mistakenly used "errata" for the singular. This causes
Dave Woodhouse to emit diagnostics whenever the string is read, and so
should be fixed.

Secondly the AMD AGP tunnel has an erratum which causes hangs if you try
and do direct PCI to AGP transfers in some cases. We have a flag for
PCI/PCI failures but we need a different flag for this really as in this
case we don't want to stop PCI/PCI transfers using things like IOAT and
the new RAID offload work.

I'll post some updates to make proper use of the PCIAGP flag in the
media/video drivers to Mauro.

Signed-off-by: Alan Cox <[email protected]>

diff -u --new-file --recursive --exclude-from /usr/src/exclude
linux.vanilla-2.6.18-rc6-mm1/drivers/pci/quirks.c
linux-2.6.18-rc6-mm1/drivers/pci/quirks.c
--- linux.vanilla-2.6.18-rc6-mm1/drivers/pci/quirks.c 2006-09-11
17:00:17.000000000 +0100
+++ linux-2.6.18-rc6-mm1/drivers/pci/quirks.c 2006-09-13
15:09:15.000000000 +0100
@@ -93,8 +93,21 @@
pci_pci_problems |= PCIPCI_FAIL;
}
}
+
+static void __devinit quirk_nopciamd(struct pci_dev *dev)
+{
+ u8 rev;
+ pci_read_config_byte(dev, 0x08, &rev);
+ if (rev == 0x13) {
+ /* Erratum 24 */
+ printk(KERN_INFO "Chipset erratum: Disabling direct
PCI/AGP transfers.\n");
+ pci_pci_problems |= PCIAGP_FAIL;
+ }
+}
+
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5597,
quirk_nopcipci );
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_496,
quirk_nopcipci );
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD,
PCI_DEVICE_ID_AMD_8151_0, quirk_nopciamd );

/*
* Triton requires workarounds to be used by the drivers
@@ -561,7 +574,7 @@
* is currently marked NoFix
*
* We have multiple reports of hangs with this chipset that went away with
- * noapic specified. For the moment we assume its the errata. We may be wrong
+ * noapic specified. For the moment we assume its the erratum. We may be wrong
* of course. However the advice is demonstrably good even if so..
*/
static void __devinit quirk_amd_ioapic(struct pci_dev *dev)
@@ -570,7 +583,7 @@

pci_read_config_byte(dev, PCI_REVISION_ID, &rev);
if (rev >= 0x02) {
- printk(KERN_WARNING "I/O APIC: AMD Errata #22 may be
present. In the event of instability try\n");
+ printk(KERN_WARNING "I/O APIC: AMD Erratum #22 may be
present. In the event of instability try\n");
printk(KERN_WARNING " : booting with the
\"noapic\" option.\n");
}
}
diff -u --new-file --recursive --exclude-from /usr/src/exclude
linux.vanilla-2.6.18-rc6-mm1/include/linux/pci.h
linux-2.6.18-rc6-mm1/include/linux/pci.h
--- linux.vanilla-2.6.18-rc6-mm1/include/linux/pci.h 2006-09-11
17:00:24.000000000 +0100
+++ linux-2.6.18-rc6-mm1/include/linux/pci.h 2006-09-13
12:11:46.000000000 +0100
@@ -875,12 +875,13 @@
void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev);

extern int pci_pci_problems;
-#define PCIPCI_FAIL 1
+#define PCIPCI_FAIL 1 /* No PCI PCI DMA */
#define PCIPCI_TRITON 2
#define PCIPCI_NATOMA 4
#define PCIPCI_VIAETBF 8
#define PCIPCI_VSFX 16
-#define PCIPCI_ALIMAGIK 32
+#define PCIPCI_ALIMAGIK 32 /* Need low latency setting */
+#define PCIAGP_FAIL 64 /* No PCI to AGP DMA */

#endif /* __KERNEL__ */
#endif /* LINUX_PCI_H */
--

2006-10-01 15:21:17

by Alan

[permalink] [raw]
Subject: Re: zoran driver breaks 'make all{yes,mod}config'

Ar Sad, 2006-09-30 am 21:23 -0400, ysgrifennodd Jeff Garzik:
> drivers/media/video/zoran_driver.c:1519: error: for each function it
> appears in.)
>
> Same build breakage in bt484, saa7134.
>
> The PCIAGP_FAIL symbol doesn't exist anywhere.

As far as I can tell Andrew pushed the PCIAGP_FAIL change to Greg and
the other dependant changes went to Linus. Just needs the PCIAGP_FAIL
change pushing to Linus tree.

Alan