mirror of
https://github.com/xcat2/xNBA.git
synced 2024-12-13 23:01:31 +00:00
Improved debugging output
This commit is contained in:
parent
ed7b9109be
commit
e1a9798af4
@ -44,6 +44,7 @@ int find_isa_device ( struct isa_device *isa, struct isa_driver *driver ) {
|
||||
/* Iterate through any ISA probe addresses specified by
|
||||
* config.c, starting where we left off.
|
||||
*/
|
||||
DBG ( "ISA searching for device matching driver %s\n", driver->name );
|
||||
for ( i = isa->probe_idx ; i < isa_extra_probe_addr_count ; i++ ) {
|
||||
/* If we've already used this device, skip it */
|
||||
if ( isa->already_tried ) {
|
||||
@ -96,6 +97,7 @@ int find_isa_device ( struct isa_device *isa, struct isa_driver *driver ) {
|
||||
|
||||
notfound:
|
||||
/* No device found */
|
||||
DBG ( "ISA found no device matching driver %s\n", driver->name );
|
||||
isa->probe_idx = 0;
|
||||
return 0;
|
||||
|
||||
|
@ -473,6 +473,8 @@ int find_isapnp_device ( struct isapnp_device *isapnp,
|
||||
/* Iterate through all possible ISAPNP CSNs, starting where we
|
||||
* left off.
|
||||
*/
|
||||
DBG ( "ISAPnP searching for device matching driver %s\n",
|
||||
driver->name );
|
||||
for ( ; isapnp->csn <= isapnp_max_csn ; isapnp->csn++ ) {
|
||||
for ( ; isapnp->logdev <= 0xff ; isapnp->logdev++ ) {
|
||||
/* If we've already used this device, skip it */
|
||||
@ -499,11 +501,14 @@ int find_isapnp_device ( struct isapnp_device *isapnp,
|
||||
if ( ( isapnp->vendor_id == id->vendor_id ) &&
|
||||
( ISA_PROD_ID ( isapnp->prod_id ) ==
|
||||
ISA_PROD_ID ( id->prod_id ) ) ) {
|
||||
DBG ( "Device %s (driver %s) "
|
||||
"matches ID %s\n",
|
||||
id->name, driver->name,
|
||||
DBG ( "ISAPnP found ID %hx:%hx "
|
||||
"(\"%s\") (device %s) "
|
||||
"matching driver %s\n",
|
||||
isapnp->vendor_id,
|
||||
isapnp->prod_id,
|
||||
isa_id_string( isapnp->vendor_id,
|
||||
isapnp->prod_id ) );
|
||||
isapnp->prod_id ),
|
||||
id->name, driver->name );
|
||||
isapnp->name = id->name;
|
||||
isapnp->already_tried = 1;
|
||||
return 1;
|
||||
@ -513,6 +518,7 @@ int find_isapnp_device ( struct isapnp_device *isapnp,
|
||||
}
|
||||
|
||||
/* No device found */
|
||||
DBG ( "ISAPnP found no device matching driver %s\n", driver->name );
|
||||
isapnp->csn = 1;
|
||||
return 0;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ static char mca_magic[0]; /* guaranteed unique symbol */
|
||||
*
|
||||
*/
|
||||
static int fill_mca_device ( struct mca_device *mca ) {
|
||||
unsigned int i;
|
||||
unsigned int i, seen_non_ff;
|
||||
|
||||
/* Make sure motherboard setup is off */
|
||||
outb_p ( 0xff, MCA_MOTHERBOARD_SETUP_REG );
|
||||
@ -31,10 +31,19 @@ static int fill_mca_device ( struct mca_device *mca ) {
|
||||
outb_p ( 0x8 | ( mca->slot & 0xf ), MCA_ADAPTER_SETUP_REG );
|
||||
|
||||
/* Read the POS registers */
|
||||
seen_non_ff = 0;
|
||||
for ( i = 0 ; i < ( sizeof ( mca->pos ) / sizeof ( mca->pos[0] ) ) ;
|
||||
i++ ) {
|
||||
mca->pos[i] = inb_p ( MCA_POS_REG ( i ) );
|
||||
if ( mca->pos[i] != 0xff )
|
||||
seen_non_ff = 1;
|
||||
}
|
||||
|
||||
/* If all POS registers are 0xff, this means there's no device
|
||||
* present
|
||||
*/
|
||||
if ( ! seen_non_ff )
|
||||
return 0;
|
||||
|
||||
/* Kill all setup modes */
|
||||
outb_p ( 0, MCA_ADAPTER_SETUP_REG );
|
||||
@ -64,6 +73,7 @@ int find_mca_device ( struct mca_device *mca, struct mca_driver *driver ) {
|
||||
/* Iterate through all possible MCA slots, starting where we
|
||||
* left off
|
||||
*/
|
||||
DBG ( "MCA searching for device matching driver %s\n", driver->name );
|
||||
for ( ; mca->slot < MCA_MAX_SLOT_NR ; mca->slot++ ) {
|
||||
/* If we've already used this device, skip it */
|
||||
if ( mca->already_tried ) {
|
||||
@ -81,8 +91,9 @@ int find_mca_device ( struct mca_device *mca, struct mca_driver *driver ) {
|
||||
struct mca_id *id = &driver->ids[i];
|
||||
|
||||
if ( MCA_ID ( mca ) == id->id ) {
|
||||
DBG ( "Device %s (driver %s) matches ID %hx\n",
|
||||
id->name, driver->name, id->id );
|
||||
DBG ( "MCA found ID %hx (device %s) "
|
||||
"matching driver %s\n",
|
||||
id->name, id->id, driver->name );
|
||||
mca->name = id->name;
|
||||
mca->already_tried = 1;
|
||||
return 1;
|
||||
@ -91,6 +102,7 @@ int find_mca_device ( struct mca_device *mca, struct mca_driver *driver ) {
|
||||
}
|
||||
|
||||
/* No device found */
|
||||
DBG ( "MCA found no device matching driver %s\n", driver->name );
|
||||
mca->slot = 0;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user