#endif
/* now ready to use interrupts, if available */
sony535_irq_used = tmp_irq;
-#ifndef MODULE
-/* This code is not in MODULEs by default, since the autoirq stuff might
- * not be in the module-accessible symbol table.
- */
+
/* A negative sony535_irq_used will attempt an autoirq. */
if (sony535_irq_used < 0) {
- autoirq_setup(0);
+ unsigned long irq_mask, delay;
+
+ irq_mask = probe_irq_on();
enable_interrupts();
outb(0, read_status_reg); /* does a reset? */
- sony535_irq_used = autoirq_report(10);
+ delay = jiffies + HZ/10;
+ while (time_before(jiffies, delay)) ;
+
+ sony535_irq_used = probe_irq_off(irq_mask);
disable_interrupts();
}
-#endif
if (sony535_irq_used > 0) {
if (request_irq(sony535_irq_used, cdu535_interrupt,
SA_INTERRUPT, CDU535_HANDLE, NULL)) {
if (dev->irq < 2)
{
- autoirq_setup(2);
+ unsigned long irq_mask, delay;
+
+ irq_mask = probe_irq_on();
inb(RX_STATUS); /* Clear pending interrupts. */
inb(TX_STATUS);
outb(AX_LOOP + 1, AX_CMD);
outb(0x00, AX_CMD);
- autoirq = autoirq_report(1);
+ delay = jiffies + HZ/50;
+ while (time_before(jiffies, delay)) ;
+ autoirq = probe_irq_off(irq_mask);
if (autoirq == 0)
{
#define ei_debug 1
#endif
-#ifndef HAVE_AUTOIRQ
-/* From auto_irq.c */
-extern void autoirq_setup(int waittime);
-extern unsigned long autoirq_report(int waittime);
-#endif
-
extern int ethdev_init(struct net_device *dev);
extern void NS8390_init(struct net_device *dev, int startp);
extern int ei_open(struct net_device *dev);
obj-y += ../acorn/net/acorn-net.o
endif
-#
-# HIPPI adapters
-#
-
-ifneq ($(ARCH),s390)
-ifneq ($(ARCH),s390x)
-obj-y += auto_irq.o
-endif
-endif
-
include $(TOPDIR)/Rules.make
clean:
/* probe for the IRQ line */
if (irq < 2) {
- autoirq_setup(2);
+ unsigned long irq_mask, delay;
+ irq_mask = probe_irq_on();
/* reset the interrupt line */
inb_p(io+7);
inb_p(io+7);
/* trigger an interrupt (I hope) */
inb_p(io+6);
- autoirq = autoirq_report(1);
+ delay = jiffies + HZ/50;
+ while (time_before(jiffies, delay)) ;
+ autoirq = probe_irq_off(irq_mask);
if (autoirq == 0) {
printk("ltpc: probe at %#x failed to detect IRQ line.\n",
if (dev->irq < 2) {
#ifndef MODULE
unsigned char irqnum;
- autoirq_setup(0);
+ unsigned long irq_mask, delay;
+
+ irq_mask = probe_irq_on();
/* Assign the correct irq list */
switch (lp->adapter) {
/* Trigger an initialization just for the interrupt. */
outw(INEA | INIT, DEPCA_DATA);
- irqnum = autoirq_report(1);
+ delay = jiffies + HZ/50;
+ while (time_before(jiffies, delay)) ;
+ irqnum = probe_irq_off(irq_mask);
+
status = -ENXIO;
if (!irqnum) {
printk(" and failed to detect IRQ line.\n");
eepro_sw2bank0(ioaddr); /* Switch back to Bank 0 */
if (request_irq (*irqp, NULL, SA_SHIRQ, "bogus", dev) != EBUSY) {
+ unsigned long irq_mask, delay;
/* Twinkle the interrupt, and check if it's seen */
- autoirq_setup(0);
+ irq_mask = probe_irq_on();
eepro_diag(ioaddr); /* RESET the 82595 */
- if (*irqp == autoirq_report(2)) /* It's a good IRQ line */
+ delay = jiffies + HZ/50;
+ while (time_before(jiffies, delay)) ;
+
+ if (*irqp == probe_irq_off(irq_mask)) /* It's a good IRQ line */
break;
/* clear all interrupts */
if (dev->irq < 2) {
#ifndef MODULE
u_char irqnum;
+ unsigned long irq_mask, delay;
+
- autoirq_setup(0);
+ irq_mask = probe_irq_on();
/*
** Trigger a TNE interrupt.
irqnum = irq[((icr & IRQ_SEL) >> 4)];
- dev->irq = autoirq_report(1);
+ delay = jiffies + HZ/50;
+ while (time_before(jiffies, delay)) ;
+ dev->irq = probe_irq_off(irq_mask);
if ((dev->irq) && (irqnum == dev->irq)) {
printk(" and uses IRQ%d.\n", dev->irq);
} else {
if (dev->irq == -1)
; /* Do nothing: a user-level program will set it. */
else if (dev->irq < 2) { /* "Auto-IRQ" */
- autoirq_setup(0);
+ unsigned long irq_mask = probe_irq_on();
/* Trigger an interrupt here. */
- dev->irq = autoirq_report(0);
+ dev->irq = probe_irq_off(irq_mask);
if (net_debug >= 2)
printk(" autoirq is %d", dev->irq);
} else if (dev->irq == 2)
if (dev->irq >= 2)
printk(" assigned IRQ %d", dev->irq);
else if (lance_version != 0) { /* 7990 boards need DMA detection first. */
+ unsigned long irq_mask, delay;
+
/* To auto-IRQ we enable the initialization-done and DMA error
interrupts. For ISA boards we get a DMA error, but VLB and PCI
boards will work. */
- autoirq_setup(0);
+ irq_mask = probe_irq_on();
/* Trigger an initialization just for the interrupt. */
outw(0x0041, ioaddr+LANCE_DATA);
- dev->irq = autoirq_report(2);
+ delay = jiffies + HZ/50;
+ while (time_before(jiffies, delay)) ;
+ dev->irq = probe_irq_off(irq_mask);
if (dev->irq)
printk(", probed IRQ %d", dev->irq);
else {
if (lance_version == 0 && dev->irq == 0) {
/* We may auto-IRQ now that we have a DMA channel. */
/* Trigger an initialization just for the interrupt. */
- autoirq_setup(0);
+ unsigned long irq_mask, delay;
+
+ irq_mask = probe_irq_on(0);
outw(0x0041, ioaddr+LANCE_DATA);
- dev->irq = autoirq_report(4);
+ delay = jiffies + HZ/25;
+ while (time_before(jiffies, delay)) ;
+ dev->irq = probe_irq_off(irq_mask);
if (dev->irq == 0) {
printk(" Failed to detect the 7990 IRQ line.\n");
return -ENODEV;
if (dev->irq == 0xff)
;
else if (dev->irq < 2) {
+ unsigned long irq_mask, delay;
+
PRINTK2((KERN_DEBUG "%s: I/O #5 passed!\n", dev->name));
- autoirq_setup(0);
+ irq_mask = probe_irq_on();
trigger_irq(ioaddr);
- dev->irq = autoirq_report(2);
+ delay = jiffies + HZ/50;
+ while (time_before(jiffies, delay)) ;
+ dev->irq = probe_irq_off(irq_mask);
PRINTK2((KERN_DEBUG "%s: I/O #6 passed!\n", dev->name));
if(dev->irq < 2)
{
- autoirq_setup(0);
+ unsigned long irq_mask, delay;
+
+ irq_mask = probe_irq_on();
ni_reset586();
ni_attn586();
- if(!(dev->irq = autoirq_report(2)))
+
+ delay = jiffies + HZ/50;
+ while (time_before(jiffies, delay)) ;
+ dev->irq = probe_irq_off(irq_mask);
+ if(!dev->irq)
{
printk("?autoirq, Failed to detect IRQ line!\n");
kfree(dev->priv);
if(dev->irq < 2)
{
+ unsigned long irq_mask, delay;
+
ni65_init_lance(p,dev->dev_addr,0,0);
- autoirq_setup(0);
+ irq_mask = probe_irq_on();
writereg(CSR0_INIT|CSR0_INEA,CSR0); /* trigger interrupt */
-
- if(!(dev->irq = autoirq_report(2)))
+ delay = jiffies + HZ/50;
+ while (time_before(jiffies, delay)) ;
+ dev->irq = probe_irq_off(irq_mask);
+ if(!dev->irq)
{
printk("Failed to detect IRQ line!\n");
ni65_free_buffer(p);
#define ei_debug 1
#endif
-#ifndef HAVE_AUTOIRQ
-/* From auto_irq.c */
-extern void autoirq_setup(int waittime);
-extern unsigned long autoirq_report(int waittime);
-#endif
-
static int ethdev_init(struct net_device *dev);
static void NS8390_init(struct net_device *dev, int startp);
static int ei_open(struct net_device *dev);
timeout--;
}
/* there is really nothing that I can do here if timeout fails,
- as autoirq_report will return a 0 anyway, which is what I
+ as probe_irq_off will return a 0 anyway, which is what I
want in this case. Plus, the clean up is needed in both
cases. */
/* DELAY HERE!
On a fast machine, the status might change before the interrupt
is given to the processor. This means that the interrupt was
- never detected, and autoirq_report fails to report anything.
- This should fix autoirq_* problems.
+ never detected, and probe_irq_off fails to report anything.
+ This should fix probe_irq_* problems.
*/
SMC_DELAY();
SMC_DELAY();
outb( 0, ioaddr + CSR0 );
if( irq < 2 ) {
- autoirq_setup( 5 );
+ unsigned long irq_mask, delay;
+
+ irq_mask = probe_irq_on();
outb( EN_INT | TR_REQ, ioaddr + CSR0 );
outb( PR_RES, ioaddr + CSR1 );
- irq = autoirq_report( 5 );
+ delay = jiffies + HZ/20;
+ while (time_before(jiffies, delay)) ;
+ irq = probe_irq_off(irq_mask);
outb( 0, ioaddr + CSR0 );
if( !irq ) {
int reg4 = inb(ioaddr+4);
if (ancient || reg1 == 0xff) { /* Ack!! No way to read the IRQ! */
short nic_addr = ioaddr+WD_NIC_OFFSET;
+ unsigned long irq_mask, delay;
/* We have an old-style ethercard that doesn't report its IRQ
line. Do autoirq to find the IRQ line. Note that this IS NOT
a reliable way to trigger an interrupt. */
outb_p(E8390_NODMA + E8390_STOP, nic_addr);
outb(0x00, nic_addr+EN0_IMR); /* Disable all intrs. */
- autoirq_setup(0);
+
+ irq_mask = probe_irq_on();
outb_p(0xff, nic_addr + EN0_IMR); /* Enable all interrupts. */
outb_p(0x00, nic_addr + EN0_RCNTLO);
outb_p(0x00, nic_addr + EN0_RCNTHI);
outb(E8390_RREAD+E8390_START, nic_addr); /* Trigger it... */
- dev->irq = autoirq_report(2);
+ delay = jiffies + HZ/50;
+ while (time_before(jiffies, delay)) ;
+ dev->irq = probe_irq_off(irq_mask);
+
outb_p(0x00, nic_addr+EN0_IMR); /* Mask all intrs. again. */
if (ei_debug > 2)
#define get_ioport_list(buf) get_resource_list(&ioport_resource, buf, PAGE_SIZE)
#define get_mem_list(buf) get_resource_list(&iomem_resource, buf, PAGE_SIZE)
-#define HAVE_AUTOIRQ
-extern void autoirq_setup(int waittime);
-extern int autoirq_report(int waittime);
-
#endif /* _LINUX_IOPORT_H */