From ed9217152781fccbb936d187ea57406d4cff13de Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Thu, 14 Apr 2005 23:32:36 +0000 Subject: [PATCH] Standardised debug messages to make it easy to get a bus scan printout (just build debugging versions of the relevant bus objects). --- src/drivers/bus/eisa.c | 2 +- src/drivers/bus/mca.c | 3 ++- src/drivers/bus/pci.c | 2 +- src/drivers/net/3c509.c | 4 ++++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/drivers/bus/eisa.c b/src/drivers/bus/eisa.c index 00656511..8b93b302 100644 --- a/src/drivers/bus/eisa.c +++ b/src/drivers/bus/eisa.c @@ -39,7 +39,7 @@ static int fill_eisa_device ( struct eisa_device *eisa ) { eisa->prod_id = ( inb ( eisa->ioaddr + EISA_PROD_ID_LO ) << 8 ) + inb ( eisa->ioaddr + EISA_PROD_ID_HI ); - DBG ( "EISA slot %d (base %#hx) ID %hx:%hx (\"%s\")\n", + DBG ( "EISA found slot %d (base %#hx) ID %hx:%hx (\"%s\")\n", eisa->slot, eisa->ioaddr, eisa->mfg_id, eisa->prod_id, isa_id_string ( eisa->mfg_id, eisa->prod_id ) ); diff --git a/src/drivers/bus/mca.c b/src/drivers/bus/mca.c index 60690ae1..cc091efa 100644 --- a/src/drivers/bus/mca.c +++ b/src/drivers/bus/mca.c @@ -39,7 +39,8 @@ static int fill_mca_device ( struct mca_device *mca ) { /* Kill all setup modes */ outb_p ( 0, MCA_ADAPTER_SETUP_REG ); - DBG ( "MCA slot %d id %hx (%hhx:%hhx:%hhx:%hhx:%hhx:%hhx:%hhx:%hhx)\n", + DBG ( "MCA found slot %d id %hx " + "(POS %hhx:%hhx:%hhx:%hhx:%hhx:%hhx:%hhx:%hhx)\n", mca->slot, MCA_ID ( mca ), mca->pos[0], mca->pos[1], mca->pos[2], mca->pos[3], mca->pos[4], mca->pos[5], mca->pos[6], mca->pos[7] ); diff --git a/src/drivers/bus/pci.c b/src/drivers/bus/pci.c index 6e08f089..4fe01cad 100644 --- a/src/drivers/bus/pci.c +++ b/src/drivers/bus/pci.c @@ -73,7 +73,7 @@ static int fill_pci_device ( struct pci_device *pci ) { pci_read_config_byte ( pci, PCI_INTERRUPT_LINE, &pci->irq ); } - DBG ( "%hhx:%hhx.%d Class %hx: %hx:%hx (rev %hhx)\n", + DBG ( "PCI found %hhx:%hhx.%d Class %hx: %hx:%hx (rev %hhx)\n", PCI_BUS ( pci->busdevfn ), PCI_DEV ( pci->busdevfn ), PCI_FUNC ( pci->busdevfn ), pci->class, pci->vendor, pci->dev_id, pci->revision ); diff --git a/src/drivers/net/3c509.c b/src/drivers/net/3c509.c index e73bf84b..2790a534 100644 --- a/src/drivers/net/3c509.c +++ b/src/drivers/net/3c509.c @@ -129,6 +129,7 @@ static inline int fill_t509_device ( struct t509_device *t509 ) { DBG ( "No ID port available for contention select\n" ); return 0; } + DBG ( "T509 scan using ID port at %hx\n", t509->id_port ); } /* @@ -166,6 +167,9 @@ static inline int fill_t509_device ( struct t509_device *t509 ) { outb ( ++t509->current_tag, t509->id_port ); /* tag */ outb ( ( 0xe0 | iobase ), t509->id_port ); /* activate */ + DBG ( "T509 found at %hx (tagged as %hhx)\n", t509->ioaddr, + t509->current_tag ); + return 1; }