Changed some log outputs.

This commit is contained in:
Armin Schindler 1999-04-01 12:48:37 +00:00
parent 12f5e95c40
commit 1c59a91727
3 changed files with 65 additions and 27 deletions

View File

@ -22,6 +22,10 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.4 1999/03/29 11:19:46 armin
* I/O stuff now in seperate file (eicon_io.c)
* Old ISA type cards (S,SX,SCOM,Quadro,S2M) implemented.
*
* Revision 1.3 1999/03/02 12:37:45 armin
* Added some important checks.
* Analog Modem with DSP.
@ -87,7 +91,7 @@ eicon_isa_printpar(eicon_isa_card *card) {
case EICON_CTYPE_SCOM:
case EICON_CTYPE_QUADRO:
case EICON_CTYPE_S2M:
printk(KERN_INFO "eicon_isa: Eicon %s at 0x%lx, irq %d\n",
printk(KERN_INFO "Eicon %s at 0x%lx, irq %d\n",
eicon_ctype_name[card->type],
(unsigned long)card->shmem,
card->irq);
@ -120,13 +124,13 @@ eicon_isa_find_card(int Mem, int Irq, char * Id)
writew(0, Mem + 0x402);
if (readw(Mem + 0x402) != 0) primary = 0;
printk(KERN_INFO "eicon_isa: Driver-ID: %s\n", Id);
printk(KERN_INFO "Eicon: Driver-ID: %s\n", Id);
if (primary) {
printk(KERN_INFO "eicon_isa: assuming pri card at 0x%x\n", Mem);
printk(KERN_INFO "Eicon: assuming pri card at 0x%x\n", Mem);
writeb(0, Mem + 0x3ffe);
return EICON_CTYPE_ISAPRI;
} else {
printk(KERN_INFO "eicon_isa: assuming bri card at 0x%x\n", Mem);
printk(KERN_INFO "Eicon: assuming bri card at 0x%x\n", Mem);
writeb(0, Mem + 0x400);
return EICON_CTYPE_ISABRI;
}
@ -264,11 +268,11 @@ eicon_isa_bootload(eicon_isa_card *card, eicon_isa_codebuf *cb) {
eicon_isa_release_shmem(card);
return -EIO;
}
printk(KERN_INFO "eicon_isa: %s: startup-code loaded\n", eicon_ctype_name[card->type]);
printk(KERN_INFO "%s: startup-code loaded\n", eicon_ctype_name[card->type]);
if ((card->type == EICON_CTYPE_QUADRO) && (card->master)) {
tmp = eicon_addcard(card->type, (unsigned long)card->shmem, card->irq,
((eicon_card *)card->card)->regname);
printk(KERN_INFO "eicon_isa: %d adapters added\n", tmp);
printk(KERN_INFO "Eicon: %d adapters added\n", tmp);
}
return 0;
}
@ -331,7 +335,7 @@ eicon_isa_load(eicon_isa_card *card, eicon_isa_codebuf *cb) {
eicon_isa_printpar(card);
/* Download firmware */
printk(KERN_INFO "eicon_isa: %s %dkB, loading firmware ...\n",
printk(KERN_INFO "%s %dkB, loading firmware ...\n",
eicon_ctype_name[card->type],
tmp * 16);
tmp = cbuf.firmware_len >> 8;
@ -416,8 +420,8 @@ eicon_isa_load(eicon_isa_card *card, eicon_isa_codebuf *cb) {
((eicon_card *)card->card)->bch[j].fsm_state = EICON_STATE_NULL;
}
printk(KERN_INFO "eicon_isa: Supported channels: %d\n", card->channels);
printk(KERN_INFO "eicon_isa: %s successfully started\n", eicon_ctype_name[card->type]);
printk(KERN_INFO "Eicon: Supported channels: %d\n", card->channels);
printk(KERN_INFO "%s successfully started\n", eicon_ctype_name[card->type]);
/* Enable normal IRQ processing */
card->irqprobe = 0;

View File

@ -26,6 +26,10 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.4 1999/03/29 11:19:47 armin
* I/O stuff now in seperate file (eicon_io.c)
* Old ISA type cards (S,SX,SCOM,Quadro,S2M) implemented.
*
* Revision 1.3 1999/03/02 12:37:47 armin
* Added some important checks.
* Analog Modem with DSP.
@ -94,6 +98,23 @@ char *eicon_ctype_name[] = {
"DIVA Server PRI/PCI"
};
static int
getrel(char *p)
{
int v = 0;
char *tmp = 0;
if ((tmp = strchr(p, '.')))
p = tmp + 1;
while (p[0] >= '0' && p[0] <= '9') {
v = ((v < 0) ? 0 : (v * 10)) + (int) (p[0] - '0');
p++;
}
return v;
}
static char *
eicon_getrev(const char *revision)
{
@ -506,7 +527,7 @@ eicon_command(eicon_card * card, isdn_ctrl * c)
return 0;
case EICON_IOCTL_DEBUGVAR:
DebugVar = a;
printk(KERN_DEBUG"eicon: Debug Value set to %ld\n", DebugVar);
printk(KERN_DEBUG"Eicon: Debug Value set to %ld\n", DebugVar);
return 0;
#ifdef MODULE
case EICON_IOCTL_FREEIT:
@ -820,7 +841,7 @@ eicon_alloccard(int Type, int membase, int irq, char *id)
sprintf(qid, "_%c",'2' + i);
strcat(card->interface.id, qid);
}
printk(KERN_INFO "eicon_isa: Quadro: Driver-Id %s added.\n",
printk(KERN_INFO "Eicon: Quadro: Driver-Id %s added.\n",
card->interface.id);
if (i == 0) {
eicon_card *p = cards;
@ -1086,6 +1107,7 @@ eicon_addcard(int Type, int membase, int irq, char *id)
}
#define DRIVERNAME "Eicon active ISDN driver"
#define DRIVERRELEASE "1"
#ifdef MODULE
#define eicon_init init_module
@ -1095,6 +1117,7 @@ __initfunc(int
eicon_init(void))
{
int tmp = 0;
int release = 0;
char tmprev[50];
DebugVar = 1;
@ -1102,12 +1125,19 @@ eicon_init(void))
printk(KERN_INFO "%s Rev: ", DRIVERNAME);
strcpy(tmprev, eicon_revision);
printk("%s/", eicon_getrev(tmprev));
release += getrel(tmprev);
strcpy(tmprev, eicon_pci_revision);
printk("%s/", eicon_getrev(tmprev));
release += getrel(tmprev);
strcpy(tmprev, eicon_isa_revision);
printk("%s/", eicon_getrev(tmprev));
release += getrel(tmprev);
strcpy(tmprev, eicon_idi_revision);
printk("%s\n", eicon_getrev(tmprev));
release += getrel(tmprev);
sprintf(tmprev,"%d", release);
printk(KERN_INFO "%s Release: %s.%s\n", DRIVERNAME,
DRIVERRELEASE, tmprev);
tmp = eicon_addcard(0, membase, irq, id);
#if CONFIG_PCI
@ -1115,12 +1145,12 @@ eicon_init(void))
#endif
if (!cards) {
#ifdef MODULE
printk(KERN_INFO "eicon: No cards defined, driver not loaded !\n");
printk(KERN_INFO "Eicon: No cards defined, driver not loaded !\n");
#endif
return -ENODEV;
} else
printk(KERN_INFO "eicon: %d card%s added\n", tmp, (tmp>1)?"s":"");
printk(KERN_INFO "Eicon: %d card%s added\n", tmp, (tmp>1)?"s":"");
/* No symbols to export, hide all symbols */
EXPORT_NO_SYMBOLS;
return 0;

View File

@ -26,6 +26,10 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.5 1999/03/29 11:19:49 armin
* I/O stuff now in seperate file (eicon_io.c)
* Old ISA type cards (S,SX,SCOM,Quadro,S2M) implemented.
*
* Revision 1.4 1999/03/02 12:37:48 armin
* Added some important checks.
* Analog Modem with DSP.
@ -107,13 +111,13 @@ int eicon_pci_find_card(char *ID)
if (NoMorePCICards)
{
if (pci_cards < 1) {
printk(KERN_INFO "eicon_pci: No supported PCI cards found.\n");
printk(KERN_INFO "Eicon: No supported PCI cards found.\n");
kfree(aparms);
return 0;
}
else
{
printk(KERN_INFO "eicon_pci: %d PCI card%s registered.\n",
printk(KERN_INFO "Eicon: %d PCI card%s registered.\n",
pci_cards, (pci_cards > 1) ? "s":"");
kfree(aparms);
return (pci_cards);
@ -124,7 +128,7 @@ int eicon_pci_find_card(char *ID)
switch(pci_type)
{
case PCI_MAESTRA:
printk(KERN_INFO "eicon_pci: DIVA Server BRI/PCI detected !\n");
printk(KERN_INFO "Eicon: DIVA Server BRI/PCI detected !\n");
aparms->type = EICON_CTYPE_MAESTRA;
aparms->irq = pdev->irq;
@ -141,13 +145,13 @@ int eicon_pci_find_card(char *ID)
case PCI_MAESTRAQ:
case PCI_MAESTRAQ_U:
printk(KERN_ERR "eicon_pci: DIVA Server 4BRI/PCI detected but not supported !\n");
printk(KERN_ERR "Eicon: DIVA Server 4BRI/PCI detected but not supported !\n");
pci_cards--;
pci_akt = 0;
break;
case PCI_MAESTRAP:
printk(KERN_INFO "eicon_pci: DIVA Server PRI/PCI detected !\n");
printk(KERN_INFO "Eicon: DIVA Server PRI/PCI detected !\n");
aparms->type = EICON_CTYPE_MAESTRAP; /*includes 9M,30M*/
aparms->irq = pdev->irq;
pram = pdev->base_address[0] & 0xfffff000;
@ -214,7 +218,7 @@ int eicon_pci_find_card(char *ID)
sprintf(did, "%s%d", (strlen(ID) < 1) ? "eicon":ID, pci_cards);
printk(KERN_INFO "eicon_pci: DriverID: '%s'\n", did);
printk(KERN_INFO "%s: DriverID: '%s'\n",eicon_ctype_name[aparms->type] , did);
if (!(eicon_addcard(aparms->type, (int) aparms, aparms->irq, did))) {
printk(KERN_ERR "eicon_pci: Card could not be added !\n");
@ -455,7 +459,7 @@ int eicon_pci_print_hdr(unsigned char *code, int offset)
i++;
}
hdr[i] = '\0';
printk(KERN_DEBUG "eicon_pci: loading %s\n", hdr);
printk(KERN_DEBUG "Eicon: loading %s\n", hdr);
if (GetProtFeatureValue(hdr, &fvalue)) return(fvalue);
else return(0);
}
@ -572,7 +576,7 @@ eicon_pci_load_bri(eicon_pci_card *card, eicon_pci_codebuf *cb) {
} while (offset < size);
#ifdef EICON_PCI_DEBUG
printk(KERN_DEBUG "eicon_pci: %d bytes loaded.\n", offset);
printk(KERN_DEBUG "Eicon: %d bytes loaded.\n", offset);
#endif
offp += size;
}
@ -642,8 +646,8 @@ eicon_pci_load_bri(eicon_pci_card *card, eicon_pci_codebuf *cb) {
outw(0x3f6, reg + M_ADDR);
card->channels = inw(reg + M_DATA);
card->serial = (u32)inw(cfg + 0x22) << 16 | (u32)inw(cfg + 0x26);
printk(KERN_INFO "eicon_pci: Supported channels : %d\n", card->channels);
printk(KERN_INFO "eicon_pci: Card serial no. = %lu\n", card->serial);
printk(KERN_INFO "Eicon: Supported channels : %d\n", card->channels);
printk(KERN_INFO "Eicon: Card serial no. = %lu\n", card->serial);
/* test interrupt */
card->irqprobe = 1;
@ -689,7 +693,7 @@ eicon_pci_load_bri(eicon_pci_card *card, eicon_pci_codebuf *cb) {
((eicon_card *)card->card)->bch[j].fsm_state = EICON_STATE_NULL;
}
printk(KERN_INFO "eicon_pci: Card successfully started\n");
printk(KERN_INFO "Eicon: Card successfully started\n");
return 0;
}
@ -880,8 +884,8 @@ eicon_pci_load_pri(eicon_pci_card *card, eicon_pci_codebuf *cb) {
/* get serial number and number of channels supported by card */
card->channels = readb(&ram[0x3f6]);
card->serial = readl(&ram[0x3f0]);
printk(KERN_INFO "eicon_pci: Supported channels : %d\n", card->channels);
printk(KERN_INFO "eicon_pci: Card serial no. = %lu\n", card->serial);
printk(KERN_INFO "Eicon: Supported channels : %d\n", card->channels);
printk(KERN_INFO "Eicon: Card serial no. = %lu\n", card->serial);
/* test interrupt */
readb(&ram[0x3fe]);
@ -935,7 +939,7 @@ eicon_pci_load_pri(eicon_pci_card *card, eicon_pci_codebuf *cb) {
((eicon_card *)card->card)->bch[j].fsm_state = EICON_STATE_NULL;
}
printk(KERN_INFO "eicon_pci: Card successfully started\n");
printk(KERN_INFO "Eicon: Card successfully started\n");
return 0;
}