From a4c97c95ce9263caad4353aa50d273d89e6b6a25 Mon Sep 17 00:00:00 2001 From: beveloper Date: Sat, 27 Jul 2002 00:38:12 +0000 Subject: [PATCH] Fix the problem that resulted in a invisible shell on my system. We were disabling the PCI to PCI bridge which is the connection to the AGP port on my system, and made an error when trying to enable it again. Fixed now! git-svn-id: file:///srv/svn/repos/haiku/trunk/current@470 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/core/addons/bus_managers/pci/pci.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/kernel/core/addons/bus_managers/pci/pci.c b/src/kernel/core/addons/bus_managers/pci/pci.c index 9b769b207b..6d96fabf70 100755 --- a/src/kernel/core/addons/bus_managers/pci/pci.c +++ b/src/kernel/core/addons/bus_managers/pci/pci.c @@ -836,7 +836,7 @@ static void print_pir_table(struct pir_table *tbl) */ static void pci_bridge(uint8 bus, uint8 dev, uint8 func) { - uint16 command = 0; + uint16 command; uint8 mybus; struct pci_device *pcid; struct pci_bus *pcib; @@ -861,17 +861,17 @@ static void pci_bridge(uint8 bus, uint8 dev, uint8 func) pcii = (pci_info*)kmalloc(sizeof(pci_info)); if (!pcii) - return; + goto pci_bridge_skip_infolist; pcid = (struct pci_device*)kmalloc(sizeof(struct pci_device)); if (!pcid) { kfree(pcii); - return; + goto pci_bridge_skip_infolist; } pcib = (struct pci_bus *)kmalloc(sizeof(struct pci_bus)); if (!pcib) { kfree(pcii); kfree(pcid); - return; + goto pci_bridge_skip_infolist; } pcid->info = pcii; @@ -920,10 +920,12 @@ static void pci_bridge(uint8 bus, uint8 dev, uint8 func) pci_busses = pcib; } - command |= 0x03; - write_pci_config(mybus, dev, func, PCI_command, 2, command); - show_pci_details(pcii); + +pci_bridge_skip_infolist: + + command |= 0x03; + write_pci_config(bus, dev, func, PCI_command, 2, command); return; }