From: Dave A. <ai...@us...> - 2001-06-17 11:43:49
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/net In directory usw-pr-cvs1:/tmp/cvs-serv6885/drivers/net Modified Files: vaxlance.c Log Message: DA: added autoprobe support for vsbus to dz/vaxlance.. needs a lot of testing on machines that aren't mine Index: vaxlance.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/net/vaxlance.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- vaxlance.c 2001/06/16 14:05:30 1.11 +++ vaxlance.c 2001/06/17 11:43:45 1.12 @@ -997,6 +997,8 @@ /* prom checks */ #if 0 /* If this is dead code, let's remove it... - KPH 2001-03-04 */ + /* not sure if its dead it might just not work on the VAX I have + does anyone know if VAX store test pattern in EEPROM */ /* First, check for test pattern */ if (esar[0x60] != 0xff && esar[0x64] != 0x00 && esar[0x68] != 0x55 && esar[0x6c] != 0xaa) { @@ -1029,17 +1031,38 @@ /* Don't need this any more */ iounmap(esar); - lp->vsbus_int=5; + // lp->vsbus_int=5; +#ifdef CONFIG_VSBUS + { + int num, irq; + autoirq_setup(0); + vsbus_probe_irq_on(); + writereg(&ll->rap, LE_CSR0); + writereg(&ll->rdp, LE_C0_INEA|LE_C0_INIT); + writecsr0(ll, LE_C0_INEA|LE_C0_INIT); + udelay(1000); + num=vsbus_probe_irq_report(); + irq=autoirq_report(0); + if (num) + lp->vsbus_int=num; + } +#endif #ifdef VAX_LANCE_AUTOPROBE_IRQ printk("Autoprobing LANCE interrupt vector..."); - vsbus_enable_int(lp->vsbus_int); - autoirq_setup(0); + autoirq_setup(0); + vsbus_enable_int(lp->vsbus_int); lance_stop(ll); + writereg(&ll->rap, LE_CSR0); + writereg(&ll->rdp, LE_C0_INEA|LE_C0_INIT); +#ifdef CONFIG_VSBUS + /*lp->vsbus_int=vsbus_probe_irq_report();*/ +#endif + /* Shouldn't we really load CSR1/2 with the address of a reasonable init block, just in case the LANCE goes and does something wild with whatever garbage it's currently @@ -1053,7 +1076,7 @@ vsbus_clear_int(lp->vsbus_int); if (dev->irq) - printk(" probed IRQ %d\n", dev->irq); + printk(" probed IRQ %d, vsbus %d\n", dev->irq, lp->vsbus_int); else { dev->irq=0x94; |