blob: b0def5a2977993679cd83cbb95e35257692b071a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
From cb1ac4a749a208eb8f9995042a110134977146d2 Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@panoply-rh.(none)>
Date: Thu, 13 Mar 2008 16:16:46 +1000
Subject: [PATCH] fbdev: make entity fail if PCI claimed already.
bad kitty fbdev.
---
hw/xfree86/common/xf86Bus.c | 3 +++
hw/xfree86/common/xf86fbBus.c | 7 +++++++
2 files changed, 10 insertions(+), 0 deletions(-)
Index: xorg-server/hw/xfree86/common/xf86Bus.c
===================================================================
--- xorg-server.orig/hw/xfree86/common/xf86Bus.c
+++ xorg-server/hw/xfree86/common/xf86Bus.c
@@ -429,6 +429,9 @@
EntityInfoPtr pEnt;
int i;
+ if (entityIndex == -1)
+ return NULL;
+
if (entityIndex >= xf86NumEntities)
return NULL;
Index: xorg-server/hw/xfree86/common/xf86fbBus.c
===================================================================
--- xorg-server.orig/hw/xfree86/common/xf86fbBus.c
+++ xorg-server/hw/xfree86/common/xf86fbBus.c
@@ -58,6 +58,13 @@
{
EntityPtr p;
int num;
+
+ if (pciSlotClaimed)
+ return -1;
+#if defined(__sparc__) || defined (__sparc64__)
+ if (sbusSlotClaimed)
+ return -1;
+#endif
num = xf86AllocateEntity();
p = xf86Entities[num];
|