lkml.org 
[lkml]   [2004]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[Patch 3/5] xbox: block certain PCI devices
From
When probing certain devices or busses on the Xbox, the system may hang.
Therefore, we need to blacklist certain busses.

You can also download this patch at:
http://linux.g-rave.nl/patches/patch-xbox-pci_workaround.diff
---

direct.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+)

diff -u -r --new-file linux-2.6.9-rc3/arch/i386/pci/direct.c
linux-2.6.9-rc3-ed0/arch/i386/pci/direct.c
--- linux-2.6.9-rc3/arch/i386/pci/direct.c 2004-09-30 05:04:23.000000000
+0200
+++ linux-2.6.9-rc3-ed0/arch/i386/pci/direct.c 2004-10-09
19:49:54.677610000 +0200
@@ -20,6 +20,22 @@
if (!value || (bus > 255) || (devfn > 255) || (reg > 255))
return -EINVAL;

+#ifdef CONFIG_X86_XBOX
+ /*
+ * Workaround for the Microsoft Xbox:
+ * Prevent it from tampering with some devices.
+ */
+ if ((bus == 0) && !PCI_SLOT(devfn) &&
+ ((PCI_FUNC(devfn) == 1) || (PCI_FUNC(devfn) == 2)))
+ return -EINVAL;
+
+ if ((bus == 1) && (PCI_SLOT(devfn) || PCI_FUNC(devfn)))
+ return -EINVAL;
+
+ if (bus >= 2)
+ return -EINVAL;
+#endif
+
spin_lock_irqsave(&pci_config_lock, flags);

outl(PCI_CONF1_ADDRESS(bus, devfn, reg), 0xCF8);
-
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/
\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.037 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site