Add PCI device reservation to the drivers that still missed it in the image. This along with the updated OpenSound should fix the KDLs. Hopefully the init_driver() code was identical enough I didn't make any copy-paste error.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36751 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
9ac4c6e861
commit
bbb55d159e
@ -737,6 +737,7 @@ init_driver(void)
|
||||
int ix = 0;
|
||||
void *settings_handle;
|
||||
pci_info info;
|
||||
status_t err;
|
||||
num_cards = 0;
|
||||
|
||||
PRINT(("init_driver()\n"));
|
||||
@ -788,8 +789,21 @@ init_driver(void)
|
||||
}
|
||||
memset(&cards[num_cards], 0, sizeof(auich_dev));
|
||||
cards[num_cards].info = info;
|
||||
#ifdef __HAIKU__
|
||||
if ((err = (*pci->reserve_device)(info.bus, info.device, info.function,
|
||||
DRIVER_NAME, &cards[num_cards])) < B_OK) {
|
||||
dprintf("%s: failed to reserve_device(%d, %d, %d,): %s\n",
|
||||
DRIVER_NAME, info.bus, info.device, info.function,
|
||||
strerror(err));
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
if (auich_setup(&cards[num_cards])) {
|
||||
PRINT(("Setup of auich %ld failed\n", num_cards+1));
|
||||
#ifdef __HAIKU__
|
||||
(*pci->unreserve_device)(info.bus, info.device, info.function,
|
||||
DRIVER_NAME, &cards[num_cards]);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
num_cards++;
|
||||
|
@ -576,8 +576,8 @@ status_t
|
||||
init_driver(void)
|
||||
{
|
||||
pci_info info;
|
||||
status_t err;
|
||||
int ix = 0;
|
||||
|
||||
num_cards = 0;
|
||||
|
||||
PRINT(("init_driver()\n"));
|
||||
@ -596,8 +596,21 @@ init_driver(void)
|
||||
}
|
||||
memset(&cards[num_cards], 0, sizeof(auvia_dev));
|
||||
cards[num_cards].info = info;
|
||||
#ifdef __HAIKU__
|
||||
if ((err = (*pci->reserve_device)(info.bus, info.device, info.function,
|
||||
DRIVER_NAME, &cards[num_cards])) < B_OK) {
|
||||
dprintf("%s: failed to reserve_device(%d, %d, %d,): %s\n",
|
||||
DRIVER_NAME, info.bus, info.device, info.function,
|
||||
strerror(err));
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
if (auvia_setup(&cards[num_cards])) {
|
||||
PRINT(("Setup of auvia %ld failed\n", num_cards+1));
|
||||
#ifdef __HAIKU__
|
||||
(*pci->unreserve_device)(info.bus, info.device, info.function,
|
||||
DRIVER_NAME, &cards[num_cards]);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
num_cards++;
|
||||
|
@ -548,6 +548,7 @@ init_driver(void)
|
||||
int ix=0;
|
||||
|
||||
pci_info info;
|
||||
status_t err;
|
||||
num_cards = 0;
|
||||
|
||||
if (get_module(B_PCI_MODULE_NAME, (module_info **) &pci))
|
||||
@ -590,8 +591,21 @@ init_driver(void)
|
||||
memset(&cards[num_cards], 0, sizeof(echo_dev));
|
||||
cards[num_cards].info = info;
|
||||
cards[num_cards].type = card_type;
|
||||
#ifdef __HAIKU__
|
||||
if ((err = (*pci->reserve_device)(info.bus, info.device, info.function,
|
||||
DRIVER_NAME, &cards[num_cards])) < B_OK) {
|
||||
dprintf("%s: failed to reserve_device(%d, %d, %d,): %s\n",
|
||||
DRIVER_NAME, info.bus, info.device, info.function,
|
||||
strerror(err));
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
if (echo_setup(&cards[num_cards])) {
|
||||
PRINT(("Setup of "DRIVER_NAME" %ld failed\n", num_cards+1));
|
||||
#ifdef __HAIKU__
|
||||
(*pci->unreserve_device)(info.bus, info.device, info.function,
|
||||
DRIVER_NAME, &cards[num_cards]);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
num_cards++;
|
||||
|
@ -2861,6 +2861,7 @@ init_driver(void)
|
||||
{
|
||||
void *settings_handle;
|
||||
pci_info info;
|
||||
status_t err;
|
||||
int ix = 0;
|
||||
num_cards = 0;
|
||||
|
||||
@ -2934,8 +2935,21 @@ init_driver(void)
|
||||
}
|
||||
memset(&cards[num_cards], 0, sizeof(emuxki_dev));
|
||||
cards[num_cards].info = info;
|
||||
#ifdef __HAIKU__
|
||||
if ((err = (*pci->reserve_device)(info.bus, info.device, info.function,
|
||||
DRIVER_NAME, &cards[num_cards])) < B_OK) {
|
||||
dprintf("%s: failed to reserve_device(%d, %d, %d,): %s\n",
|
||||
DRIVER_NAME, info.bus, info.device, info.function,
|
||||
strerror(err));
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
if (emuxki_setup(&cards[num_cards])) {
|
||||
PRINT(("Setup of emuxki %ld failed\n", num_cards+1));
|
||||
#ifdef __HAIKU__
|
||||
(*pci->unreserve_device)(info.bus, info.device, info.function,
|
||||
DRIVER_NAME, &cards[num_cards]);
|
||||
#endif
|
||||
} else {
|
||||
num_cards++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user