Although this should simply enable IO decoding and bus master
functionality when not set by bios, it currently crashes. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23143 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -565,6 +565,7 @@ ide_adapter_init_controller(device_node_handle node, void *user_cookie,
|
||||
pci_device device;
|
||||
ide_adapter_controller_info *controller;
|
||||
uint16 bus_master_base;
|
||||
uint16 pcicmd;
|
||||
|
||||
// get device data
|
||||
if (pnp->get_attr_uint16(node, IDE_ADAPTER_BUS_MASTER_BASE, &bus_master_base, false) != B_OK)
|
||||
@@ -577,6 +578,21 @@ ide_adapter_init_controller(device_node_handle node, void *user_cookie,
|
||||
if (controller == NULL)
|
||||
return B_NO_MEMORY;
|
||||
|
||||
#if 0
|
||||
pcicmd = pci->read_pci_config(node, PCI_command, 2);
|
||||
TRACE("PCI-IDE: adapter init: pcicmd old setting 0x%04x\n", pcicmd);
|
||||
if ((pcicmd & PCI_command_io) == 0) {
|
||||
TRACE("PCI-IDE: adapter init: enabling io decoder\n");
|
||||
pcicmd |= PCI_command_io;
|
||||
}
|
||||
if ((pcicmd & PCI_command_master) == 0) {
|
||||
TRACE("PCI-IDE: adapter init: enabling bus mastering\n");
|
||||
pcicmd |= PCI_command_master;
|
||||
}
|
||||
pci->write_pci_config(node, PCI_command, 2, pcicmd);
|
||||
TRACE("PCI-IDE: adapter init: pcicmd new setting 0x%04x\n", pci->read_pci_config(node, PCI_command, 2));
|
||||
#endif
|
||||
|
||||
controller->node = node;
|
||||
controller->pci = pci;
|
||||
controller->device = device;
|
||||
|
||||
Reference in New Issue
Block a user