Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
c6383562
Commit
c6383562
authored
Apr 30, 2002
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Plain Diff
Merge
http://linux-isdn.bkbits.net/linux-2.5.net-auto_irq
into mandrakesoft.com:/home/jgarzik/repo/net-drivers-2.5
parents
043ae76b
d9af4ef3
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
89 additions
and
63 deletions
+89
-63
drivers/cdrom/sonycd535.c
drivers/cdrom/sonycd535.c
+8
-7
drivers/net/3c501.c
drivers/net/3c501.c
+6
-2
drivers/net/8390.h
drivers/net/8390.h
+0
-6
drivers/net/Makefile
drivers/net/Makefile
+0
-10
drivers/net/appletalk/ltpc.c
drivers/net/appletalk/ltpc.c
+5
-2
drivers/net/depca.c
drivers/net/depca.c
+7
-2
drivers/net/eepro.c
drivers/net/eepro.c
+6
-2
drivers/net/ewrk3.c
drivers/net/ewrk3.c
+6
-2
drivers/net/isa-skeleton.c
drivers/net/isa-skeleton.c
+2
-2
drivers/net/lance.c
drivers/net/lance.c
+12
-4
drivers/net/ni5010.c
drivers/net/ni5010.c
+6
-2
drivers/net/ni52.c
drivers/net/ni52.c
+8
-2
drivers/net/ni65.c
drivers/net/ni65.c
+7
-3
drivers/net/pcmcia/ax8390.h
drivers/net/pcmcia/ax8390.h
+0
-6
drivers/net/smc9194.c
drivers/net/smc9194.c
+3
-3
drivers/net/wan/sbni.c
drivers/net/wan/sbni.c
+6
-2
drivers/net/wd.c
drivers/net/wd.c
+7
-2
include/linux/ioport.h
include/linux/ioport.h
+0
-4
No files found.
drivers/cdrom/sonycd535.c
View file @
c6383562
...
@@ -1549,19 +1549,20 @@ sony535_init(void)
...
@@ -1549,19 +1549,20 @@ sony535_init(void)
#endif
#endif
/* now ready to use interrupts, if available */
/* now ready to use interrupts, if available */
sony535_irq_used
=
tmp_irq
;
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. */
/* A negative sony535_irq_used will attempt an autoirq. */
if
(
sony535_irq_used
<
0
)
{
if
(
sony535_irq_used
<
0
)
{
autoirq_setup
(
0
);
unsigned
long
irq_mask
,
delay
;
irq_mask
=
probe_irq_on
();
enable_interrupts
();
enable_interrupts
();
outb
(
0
,
read_status_reg
);
/* does a reset? */
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
();
disable_interrupts
();
}
}
#endif
if
(
sony535_irq_used
>
0
)
{
if
(
sony535_irq_used
>
0
)
{
if
(
request_irq
(
sony535_irq_used
,
cdu535_interrupt
,
if
(
request_irq
(
sony535_irq_used
,
cdu535_interrupt
,
SA_INTERRUPT
,
CDU535_HANDLE
,
NULL
))
{
SA_INTERRUPT
,
CDU535_HANDLE
,
NULL
))
{
...
...
drivers/net/3c501.c
View file @
c6383562
...
@@ -323,14 +323,18 @@ static int __init el1_probe1(struct net_device *dev, int ioaddr)
...
@@ -323,14 +323,18 @@ static int __init el1_probe1(struct net_device *dev, int ioaddr)
if
(
dev
->
irq
<
2
)
if
(
dev
->
irq
<
2
)
{
{
autoirq_setup
(
2
);
unsigned
long
irq_mask
,
delay
;
irq_mask
=
probe_irq_on
();
inb
(
RX_STATUS
);
/* Clear pending interrupts. */
inb
(
RX_STATUS
);
/* Clear pending interrupts. */
inb
(
TX_STATUS
);
inb
(
TX_STATUS
);
outb
(
AX_LOOP
+
1
,
AX_CMD
);
outb
(
AX_LOOP
+
1
,
AX_CMD
);
outb
(
0x00
,
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
)
if
(
autoirq
==
0
)
{
{
...
...
drivers/net/8390.h
View file @
c6383562
...
@@ -39,12 +39,6 @@ extern int ei_debug;
...
@@ -39,12 +39,6 @@ extern int ei_debug;
#define ei_debug 1
#define ei_debug 1
#endif
#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
int
ethdev_init
(
struct
net_device
*
dev
);
extern
void
NS8390_init
(
struct
net_device
*
dev
,
int
startp
);
extern
void
NS8390_init
(
struct
net_device
*
dev
,
int
startp
);
extern
int
ei_open
(
struct
net_device
*
dev
);
extern
int
ei_open
(
struct
net_device
*
dev
);
...
...
drivers/net/Makefile
View file @
c6383562
...
@@ -221,16 +221,6 @@ subdir-y += ../acorn/net
...
@@ -221,16 +221,6 @@ subdir-y += ../acorn/net
obj-y
+=
../acorn/net/acorn-net.o
obj-y
+=
../acorn/net/acorn-net.o
endif
endif
#
# HIPPI adapters
#
ifneq
($(ARCH),s390)
ifneq
($(ARCH),s390x)
obj-y
+=
auto_irq.o
endif
endif
include
$(TOPDIR)/Rules.make
include
$(TOPDIR)/Rules.make
clean
:
clean
:
...
...
drivers/net/appletalk/ltpc.c
View file @
c6383562
...
@@ -1092,15 +1092,18 @@ int __init ltpc_probe(struct net_device *dev)
...
@@ -1092,15 +1092,18 @@ int __init ltpc_probe(struct net_device *dev)
/* probe for the IRQ line */
/* probe for the IRQ line */
if
(
irq
<
2
)
{
if
(
irq
<
2
)
{
autoirq_setup
(
2
)
;
unsigned
long
irq_mask
,
delay
;
irq_mask
=
probe_irq_on
();
/* reset the interrupt line */
/* reset the interrupt line */
inb_p
(
io
+
7
);
inb_p
(
io
+
7
);
inb_p
(
io
+
7
);
inb_p
(
io
+
7
);
/* trigger an interrupt (I hope) */
/* trigger an interrupt (I hope) */
inb_p
(
io
+
6
);
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
)
{
if
(
autoirq
==
0
)
{
printk
(
"ltpc: probe at %#x failed to detect IRQ line.
\n
"
,
printk
(
"ltpc: probe at %#x failed to detect IRQ line.
\n
"
,
...
...
drivers/net/depca.c
View file @
c6383562
...
@@ -682,7 +682,9 @@ depca_hw_init(struct net_device *dev, u_long ioaddr, int mca_slot)
...
@@ -682,7 +682,9 @@ depca_hw_init(struct net_device *dev, u_long ioaddr, int mca_slot)
if
(
dev
->
irq
<
2
)
{
if
(
dev
->
irq
<
2
)
{
#ifndef MODULE
#ifndef MODULE
unsigned
char
irqnum
;
unsigned
char
irqnum
;
autoirq_setup
(
0
);
unsigned
long
irq_mask
,
delay
;
irq_mask
=
probe_irq_on
();
/* Assign the correct irq list */
/* Assign the correct irq list */
switch
(
lp
->
adapter
)
{
switch
(
lp
->
adapter
)
{
...
@@ -706,7 +708,10 @@ depca_hw_init(struct net_device *dev, u_long ioaddr, int mca_slot)
...
@@ -706,7 +708,10 @@ depca_hw_init(struct net_device *dev, u_long ioaddr, int mca_slot)
/* Trigger an initialization just for the interrupt. */
/* Trigger an initialization just for the interrupt. */
outw
(
INEA
|
INIT
,
DEPCA_DATA
);
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
;
status
=
-
ENXIO
;
if
(
!
irqnum
)
{
if
(
!
irqnum
)
{
printk
(
" and failed to detect IRQ line.
\n
"
);
printk
(
" and failed to detect IRQ line.
\n
"
);
...
...
drivers/net/eepro.c
View file @
c6383562
...
@@ -896,12 +896,16 @@ static int eepro_grab_irq(struct net_device *dev)
...
@@ -896,12 +896,16 @@ static int eepro_grab_irq(struct net_device *dev)
eepro_sw2bank0
(
ioaddr
);
/* Switch back to Bank 0 */
eepro_sw2bank0
(
ioaddr
);
/* Switch back to Bank 0 */
if
(
request_irq
(
*
irqp
,
NULL
,
SA_SHIRQ
,
"bogus"
,
dev
)
!=
EBUSY
)
{
if
(
request_irq
(
*
irqp
,
NULL
,
SA_SHIRQ
,
"bogus"
,
dev
)
!=
EBUSY
)
{
unsigned
long
irq_mask
,
delay
;
/* Twinkle the interrupt, and check if it's seen */
/* Twinkle the interrupt, and check if it's seen */
autoirq_setup
(
0
);
irq_mask
=
probe_irq_on
(
);
eepro_diag
(
ioaddr
);
/* RESET the 82595 */
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
;
break
;
/* clear all interrupts */
/* clear all interrupts */
...
...
drivers/net/ewrk3.c
View file @
c6383562
...
@@ -555,8 +555,10 @@ ewrk3_hw_init(struct net_device *dev, u_long iobase)
...
@@ -555,8 +555,10 @@ ewrk3_hw_init(struct net_device *dev, u_long iobase)
if
(
dev
->
irq
<
2
)
{
if
(
dev
->
irq
<
2
)
{
#ifndef MODULE
#ifndef MODULE
u_char
irqnum
;
u_char
irqnum
;
unsigned
long
irq_mask
,
delay
;
autoirq_setup
(
0
);
irq_mask
=
probe_irq_on
(
);
/*
/*
** Trigger a TNE interrupt.
** Trigger a TNE interrupt.
...
@@ -567,7 +569,9 @@ ewrk3_hw_init(struct net_device *dev, u_long iobase)
...
@@ -567,7 +569,9 @@ ewrk3_hw_init(struct net_device *dev, u_long iobase)
irqnum
=
irq
[((
icr
&
IRQ_SEL
)
>>
4
)];
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
))
{
if
((
dev
->
irq
)
&&
(
irqnum
==
dev
->
irq
))
{
printk
(
" and uses IRQ%d.
\n
"
,
dev
->
irq
);
printk
(
" and uses IRQ%d.
\n
"
,
dev
->
irq
);
}
else
{
}
else
{
...
...
drivers/net/isa-skeleton.c
View file @
c6383562
...
@@ -202,10 +202,10 @@ static int __init netcard_probe1(struct net_device *dev, int ioaddr)
...
@@ -202,10 +202,10 @@ static int __init netcard_probe1(struct net_device *dev, int ioaddr)
if
(
dev
->
irq
==
-
1
)
if
(
dev
->
irq
==
-
1
)
;
/* Do nothing: a user-level program will set it. */
;
/* Do nothing: a user-level program will set it. */
else
if
(
dev
->
irq
<
2
)
{
/* "Auto-IRQ" */
else
if
(
dev
->
irq
<
2
)
{
/* "Auto-IRQ" */
autoirq_setup
(
0
);
unsigned
long
irq_mask
=
probe_irq_on
(
);
/* Trigger an interrupt here. */
/* Trigger an interrupt here. */
dev
->
irq
=
autoirq_report
(
0
);
dev
->
irq
=
probe_irq_off
(
irq_mask
);
if
(
net_debug
>=
2
)
if
(
net_debug
>=
2
)
printk
(
" autoirq is %d"
,
dev
->
irq
);
printk
(
" autoirq is %d"
,
dev
->
irq
);
}
else
if
(
dev
->
irq
==
2
)
}
else
if
(
dev
->
irq
==
2
)
...
...
drivers/net/lance.c
View file @
c6383562
...
@@ -545,15 +545,19 @@ static int __init lance_probe1(struct net_device *dev, int ioaddr, int irq, int
...
@@ -545,15 +545,19 @@ static int __init lance_probe1(struct net_device *dev, int ioaddr, int irq, int
if
(
dev
->
irq
>=
2
)
if
(
dev
->
irq
>=
2
)
printk
(
" assigned IRQ %d"
,
dev
->
irq
);
printk
(
" assigned IRQ %d"
,
dev
->
irq
);
else
if
(
lance_version
!=
0
)
{
/* 7990 boards need DMA detection first. */
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
/* To auto-IRQ we enable the initialization-done and DMA error
interrupts. For ISA boards we get a DMA error, but VLB and PCI
interrupts. For ISA boards we get a DMA error, but VLB and PCI
boards will work. */
boards will work. */
autoirq_setup
(
0
);
irq_mask
=
probe_irq_on
(
);
/* Trigger an initialization just for the interrupt. */
/* Trigger an initialization just for the interrupt. */
outw
(
0x0041
,
ioaddr
+
LANCE_DATA
);
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
)
if
(
dev
->
irq
)
printk
(
", probed IRQ %d"
,
dev
->
irq
);
printk
(
", probed IRQ %d"
,
dev
->
irq
);
else
{
else
{
...
@@ -619,10 +623,14 @@ static int __init lance_probe1(struct net_device *dev, int ioaddr, int irq, int
...
@@ -619,10 +623,14 @@ static int __init lance_probe1(struct net_device *dev, int ioaddr, int irq, int
if
(
lance_version
==
0
&&
dev
->
irq
==
0
)
{
if
(
lance_version
==
0
&&
dev
->
irq
==
0
)
{
/* We may auto-IRQ now that we have a DMA channel. */
/* We may auto-IRQ now that we have a DMA channel. */
/* Trigger an initialization just for the interrupt. */
/* 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
);
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
)
{
if
(
dev
->
irq
==
0
)
{
printk
(
" Failed to detect the 7990 IRQ line.
\n
"
);
printk
(
" Failed to detect the 7990 IRQ line.
\n
"
);
return
-
ENODEV
;
return
-
ENODEV
;
...
...
drivers/net/ni5010.c
View file @
c6383562
...
@@ -254,11 +254,15 @@ static int __init ni5010_probe1(struct net_device *dev, int ioaddr)
...
@@ -254,11 +254,15 @@ static int __init ni5010_probe1(struct net_device *dev, int ioaddr)
if
(
dev
->
irq
==
0xff
)
if
(
dev
->
irq
==
0xff
)
;
;
else
if
(
dev
->
irq
<
2
)
{
else
if
(
dev
->
irq
<
2
)
{
unsigned
long
irq_mask
,
delay
;
PRINTK2
((
KERN_DEBUG
"%s: I/O #5 passed!
\n
"
,
dev
->
name
));
PRINTK2
((
KERN_DEBUG
"%s: I/O #5 passed!
\n
"
,
dev
->
name
));
autoirq_setup
(
0
);
irq_mask
=
probe_irq_on
(
);
trigger_irq
(
ioaddr
);
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
));
PRINTK2
((
KERN_DEBUG
"%s: I/O #6 passed!
\n
"
,
dev
->
name
));
...
...
drivers/net/ni52.c
View file @
c6383562
...
@@ -491,10 +491,16 @@ static int __init ni52_probe1(struct net_device *dev,int ioaddr)
...
@@ -491,10 +491,16 @@ static int __init ni52_probe1(struct net_device *dev,int ioaddr)
if
(
dev
->
irq
<
2
)
if
(
dev
->
irq
<
2
)
{
{
autoirq_setup
(
0
);
unsigned
long
irq_mask
,
delay
;
irq_mask
=
probe_irq_on
();
ni_reset586
();
ni_reset586
();
ni_attn586
();
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
"
);
printk
(
"?autoirq, Failed to detect IRQ line!
\n
"
);
kfree
(
dev
->
priv
);
kfree
(
dev
->
priv
);
...
...
drivers/net/ni65.c
View file @
c6383562
...
@@ -447,11 +447,15 @@ static int __init ni65_probe1(struct net_device *dev,int ioaddr)
...
@@ -447,11 +447,15 @@ static int __init ni65_probe1(struct net_device *dev,int ioaddr)
if
(
dev
->
irq
<
2
)
if
(
dev
->
irq
<
2
)
{
{
unsigned
long
irq_mask
,
delay
;
ni65_init_lance
(
p
,
dev
->
dev_addr
,
0
,
0
);
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 */
writereg
(
CSR0_INIT
|
CSR0_INEA
,
CSR0
);
/* trigger interrupt */
delay
=
jiffies
+
HZ
/
50
;
if
(
!
(
dev
->
irq
=
autoirq_report
(
2
)))
while
(
time_before
(
jiffies
,
delay
))
;
dev
->
irq
=
probe_irq_off
(
irq_mask
);
if
(
!
dev
->
irq
)
{
{
printk
(
"Failed to detect IRQ line!
\n
"
);
printk
(
"Failed to detect IRQ line!
\n
"
);
ni65_free_buffer
(
p
);
ni65_free_buffer
(
p
);
...
...
drivers/net/pcmcia/ax8390.h
View file @
c6383562
...
@@ -39,12 +39,6 @@ extern int ei_debug;
...
@@ -39,12 +39,6 @@ extern int ei_debug;
#define ei_debug 1
#define ei_debug 1
#endif
#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
int
ethdev_init
(
struct
net_device
*
dev
);
static
void
NS8390_init
(
struct
net_device
*
dev
,
int
startp
);
static
void
NS8390_init
(
struct
net_device
*
dev
,
int
startp
);
static
int
ei_open
(
struct
net_device
*
dev
);
static
int
ei_open
(
struct
net_device
*
dev
);
...
...
drivers/net/smc9194.c
View file @
c6383562
...
@@ -751,15 +751,15 @@ int __init smc_findirq( int ioaddr )
...
@@ -751,15 +751,15 @@ int __init smc_findirq( int ioaddr )
timeout
--
;
timeout
--
;
}
}
/* there is really nothing that I can do here if timeout fails,
/* 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
want in this case. Plus, the clean up is needed in both
cases. */
cases. */
/* DELAY HERE!
/* DELAY HERE!
On a fast machine, the status might change before the interrupt
On a fast machine, the status might change before the interrupt
is given to the processor. This means that the interrupt was
is given to the processor. This means that the interrupt was
never detected, and
autoirq_report
fails to report anything.
never detected, and
probe_irq_off
fails to report anything.
This should fix
auto
irq_* problems.
This should fix
probe_
irq_* problems.
*/
*/
SMC_DELAY
();
SMC_DELAY
();
SMC_DELAY
();
SMC_DELAY
();
...
...
drivers/net/wan/sbni.c
View file @
c6383562
...
@@ -330,10 +330,14 @@ sbni_probe1( struct net_device *dev, unsigned long ioaddr, int irq )
...
@@ -330,10 +330,14 @@ sbni_probe1( struct net_device *dev, unsigned long ioaddr, int irq )
outb
(
0
,
ioaddr
+
CSR0
);
outb
(
0
,
ioaddr
+
CSR0
);
if
(
irq
<
2
)
{
if
(
irq
<
2
)
{
autoirq_setup
(
5
);
unsigned
long
irq_mask
,
delay
;
irq_mask
=
probe_irq_on
();
outb
(
EN_INT
|
TR_REQ
,
ioaddr
+
CSR0
);
outb
(
EN_INT
|
TR_REQ
,
ioaddr
+
CSR0
);
outb
(
PR_RES
,
ioaddr
+
CSR1
);
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
);
outb
(
0
,
ioaddr
+
CSR0
);
if
(
!
irq
)
{
if
(
!
irq
)
{
...
...
drivers/net/wd.c
View file @
c6383562
...
@@ -235,18 +235,23 @@ static int __init wd_probe1(struct net_device *dev, int ioaddr)
...
@@ -235,18 +235,23 @@ static int __init wd_probe1(struct net_device *dev, int ioaddr)
int
reg4
=
inb
(
ioaddr
+
4
);
int
reg4
=
inb
(
ioaddr
+
4
);
if
(
ancient
||
reg1
==
0xff
)
{
/* Ack!! No way to read the IRQ! */
if
(
ancient
||
reg1
==
0xff
)
{
/* Ack!! No way to read the IRQ! */
short
nic_addr
=
ioaddr
+
WD_NIC_OFFSET
;
short
nic_addr
=
ioaddr
+
WD_NIC_OFFSET
;
unsigned
long
irq_mask
,
delay
;
/* We have an old-style ethercard that doesn't report its IRQ
/* 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
line. Do autoirq to find the IRQ line. Note that this IS NOT
a reliable way to trigger an interrupt. */
a reliable way to trigger an interrupt. */
outb_p
(
E8390_NODMA
+
E8390_STOP
,
nic_addr
);
outb_p
(
E8390_NODMA
+
E8390_STOP
,
nic_addr
);
outb
(
0x00
,
nic_addr
+
EN0_IMR
);
/* Disable all intrs. */
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
(
0xff
,
nic_addr
+
EN0_IMR
);
/* Enable all interrupts. */
outb_p
(
0x00
,
nic_addr
+
EN0_RCNTLO
);
outb_p
(
0x00
,
nic_addr
+
EN0_RCNTLO
);
outb_p
(
0x00
,
nic_addr
+
EN0_RCNTHI
);
outb_p
(
0x00
,
nic_addr
+
EN0_RCNTHI
);
outb
(
E8390_RREAD
+
E8390_START
,
nic_addr
);
/* Trigger it... */
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. */
outb_p
(
0x00
,
nic_addr
+
EN0_IMR
);
/* Mask all intrs. again. */
if
(
ei_debug
>
2
)
if
(
ei_debug
>
2
)
...
...
include/linux/ioport.h
View file @
c6383562
...
@@ -113,8 +113,4 @@ extern void __release_region(struct resource *, unsigned long, unsigned long);
...
@@ -113,8 +113,4 @@ extern void __release_region(struct resource *, unsigned long, unsigned long);
#define get_ioport_list(buf) get_resource_list(&ioport_resource, buf, PAGE_SIZE)
#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 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 */
#endif
/* _LINUX_IOPORT_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment