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
a688bf88
Commit
a688bf88
authored
Apr 24, 2003
by
Andrew Morton
Committed by
Linus Torvalds
Apr 24, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] irqs: ATM
Update ATM drivers to new IRQ API
parent
153dec02
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
46 additions
and
26 deletions
+46
-26
drivers/atm/ambassador.c
drivers/atm/ambassador.c
+7
-6
drivers/atm/eni.c
drivers/atm/eni.c
+2
-1
drivers/atm/firestream.c
drivers/atm/firestream.c
+4
-2
drivers/atm/fore200e.c
drivers/atm/fore200e.c
+3
-2
drivers/atm/horizon.c
drivers/atm/horizon.c
+8
-4
drivers/atm/idt77252.c
drivers/atm/idt77252.c
+3
-4
drivers/atm/iphase.c
drivers/atm/iphase.c
+5
-2
drivers/atm/lanai.c
drivers/atm/lanai.c
+7
-2
drivers/atm/nicstar.c
drivers/atm/nicstar.c
+3
-2
drivers/atm/zatm.c
drivers/atm/zatm.c
+4
-1
No files found.
drivers/atm/ambassador.c
View file @
a688bf88
...
...
@@ -868,7 +868,8 @@ static inline void interrupts_off (amb_dev * dev) {
/********** interrupt handling **********/
static
void
interrupt_handler
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
pt_regs
)
{
static
irqreturn_t
interrupt_handler
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
pt_regs
)
{
amb_dev
*
dev
=
amb_devs
;
(
void
)
pt_regs
;
...
...
@@ -876,7 +877,7 @@ static void interrupt_handler (int irq, void * dev_id, struct pt_regs * pt_regs)
if
(
!
dev_id
)
{
PRINTD
(
DBG_IRQ
|
DBG_ERR
,
"irq with NULL dev_id: %d"
,
irq
);
return
;
return
IRQ_NONE
;
}
// Did one of our cards generate the interrupt?
while
(
dev
)
{
...
...
@@ -889,12 +890,12 @@ static void interrupt_handler (int irq, void * dev_id, struct pt_regs * pt_regs)
// the card generates an IRQ at startup - should not happen again
if
(
!
dev
)
{
PRINTD
(
DBG_IRQ
,
"irq for unknown device: %d"
,
irq
);
return
;
return
IRQ_NONE
;
}
// impossible - unless we have memory corruption of dev or kernel
if
(
irq
!=
dev
->
irq
)
{
PRINTD
(
DBG_IRQ
|
DBG_ERR
,
"irq mismatch: %d"
,
irq
);
return
;
return
IRQ_NONE
;
}
{
...
...
@@ -903,7 +904,7 @@ static void interrupt_handler (int irq, void * dev_id, struct pt_regs * pt_regs)
// for us or someone else sharing the same interrupt
if
(
!
interrupt
)
{
PRINTD
(
DBG_IRQ
,
"irq not for me: %d"
,
irq
);
return
;
return
IRQ_NONE
;
}
// definitely for us
...
...
@@ -934,7 +935,7 @@ static void interrupt_handler (int irq, void * dev_id, struct pt_regs * pt_regs)
}
PRINTD
(
DBG_IRQ
|
DBG_FLOW
,
"interrupt_handler done: %p"
,
dev_id
);
return
;
return
IRQ_HANDLED
;
}
/********** don't panic... yeah, right **********/
...
...
drivers/atm/eni.c
View file @
a688bf88
...
...
@@ -1483,7 +1483,7 @@ static void bug_int(struct atm_dev *dev,unsigned long reason)
}
static
void
eni_int
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
static
irqreturn_t
eni_int
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
struct
atm_dev
*
dev
;
struct
eni_dev
*
eni_dev
;
...
...
@@ -1515,6 +1515,7 @@ static void eni_int(int irq,void *dev_id,struct pt_regs *regs)
eni_dev
->
events
|=
reason
;
spin_unlock
(
&
eni_dev
->
lock
);
tasklet_schedule
(
&
eni_dev
->
task
);
return
IRQ_HANDLED
;
}
...
...
drivers/atm/firestream.c
View file @
a688bf88
...
...
@@ -1562,14 +1562,15 @@ static void __devexit free_freepool (struct fs_dev *dev, struct freepool *fp)
static
void
fs_irq
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
pt_regs
)
static
irqreturn_t
fs_irq
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
pt_regs
)
{
int
i
;
u32
status
;
struct
fs_dev
*
dev
=
dev_id
;
status
=
read_fs
(
dev
,
ISR
);
if
(
!
status
)
return
;
if
(
!
status
)
return
IRQ_NONE
;
func_enter
();
...
...
@@ -1649,6 +1650,7 @@ static void fs_irq (int irq, void *dev_id, struct pt_regs * pt_regs)
}
func_exit
();
return
IRQ_HANDLED
;
}
...
...
drivers/atm/fore200e.c
View file @
a688bf88
...
...
@@ -1227,7 +1227,7 @@ fore200e_irq_rx(struct fore200e* fore200e)
}
static
void
static
irqreturn_t
fore200e_interrupt
(
int
irq
,
void
*
dev
,
struct
pt_regs
*
regs
)
{
struct
fore200e
*
fore200e
=
FORE200E_DEV
((
struct
atm_dev
*
)
dev
);
...
...
@@ -1235,13 +1235,14 @@ fore200e_interrupt(int irq, void* dev, struct pt_regs* regs)
if
(
fore200e
->
bus
->
irq_check
(
fore200e
)
==
0
)
{
DPRINTK
(
3
,
"unexpected interrupt on device %c
\n
"
,
fore200e
->
name
[
9
]);
return
;
return
IRQ_NONE
;
}
DPRINTK
(
3
,
"valid interrupt on device %c
\n
"
,
fore200e
->
name
[
9
]);
tasklet_schedule
(
&
fore200e
->
tasklet
);
fore200e
->
bus
->
irq_ack
(
fore200e
);
return
IRQ_HANDLED
;
}
...
...
drivers/atm/horizon.c
View file @
a688bf88
...
...
@@ -1398,7 +1398,8 @@ static inline void rx_data_av_handler (hrz_dev * dev) {
/********** interrupt handler **********/
static
void
interrupt_handler
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
pt_regs
)
{
static
irqreturn_t
interrupt_handler
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
pt_regs
)
{
hrz_dev
*
dev
=
hrz_devs
;
u32
int_source
;
unsigned
int
irq_ok
;
...
...
@@ -1408,7 +1409,7 @@ static void interrupt_handler (int irq, void * dev_id, struct pt_regs * pt_regs)
if
(
!
dev_id
)
{
PRINTD
(
DBG_IRQ
|
DBG_ERR
,
"irq with NULL dev_id: %d"
,
irq
);
return
;
return
IRQ_NONE
;
}
// Did one of our cards generate the interrupt?
while
(
dev
)
{
...
...
@@ -1418,11 +1419,11 @@ static void interrupt_handler (int irq, void * dev_id, struct pt_regs * pt_regs)
}
if
(
!
dev
)
{
PRINTD
(
DBG_IRQ
,
"irq not for me: %d"
,
irq
);
return
;
return
IRQ_NONE
;
}
if
(
irq
!=
dev
->
irq
)
{
PRINTD
(
DBG_IRQ
|
DBG_ERR
,
"irq mismatch: %d"
,
irq
);
return
;
return
IRQ_NONE
;
}
// definitely for us
...
...
@@ -1468,6 +1469,9 @@ static void interrupt_handler (int irq, void * dev_id, struct pt_regs * pt_regs)
}
PRINTD
(
DBG_IRQ
|
DBG_FLOW
,
"interrupt_handler done: %p"
,
dev_id
);
if
(
irq_ok
)
return
IRQ_HANDLED
;
return
IRQ_NONE
;
}
/********** housekeeping **********/
...
...
drivers/atm/idt77252.c
View file @
a688bf88
...
...
@@ -134,8 +134,6 @@ static int idt77252_change_qos(struct atm_vcc *vcc, struct atm_qos *qos,
int
flags
);
static
int
idt77252_proc_read
(
struct
atm_dev
*
dev
,
loff_t
*
pos
,
char
*
page
);
static
void
idt77252_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
static
void
idt77252_softint
(
void
*
dev_id
);
...
...
@@ -2812,7 +2810,7 @@ idt77252_collect_stat(struct idt77252_dev *card)
#endif
}
static
void
static
irqreturn_t
idt77252_interrupt
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
ptregs
)
{
struct
idt77252_dev
*
card
=
dev_id
;
...
...
@@ -2820,7 +2818,7 @@ idt77252_interrupt(int irq, void *dev_id, struct pt_regs *ptregs)
stat
=
readl
(
SAR_REG_STAT
)
&
0xffff
;
if
(
!
stat
)
/* no interrupt for us */
return
;
return
IRQ_NONE
;
if
(
test_and_set_bit
(
IDT77252_BIT_INTERRUPT
,
&
card
->
flags
))
{
printk
(
"%s: Re-entering irq_handler()
\n
"
,
card
->
name
);
...
...
@@ -2901,6 +2899,7 @@ idt77252_interrupt(int irq, void *dev_id, struct pt_regs *ptregs)
out:
clear_bit
(
IDT77252_BIT_INTERRUPT
,
&
card
->
flags
);
return
IRQ_HANDLED
;
}
static
void
...
...
drivers/atm/iphase.c
View file @
a688bf88
...
...
@@ -2197,16 +2197,18 @@ static int tx_init(struct atm_dev *dev)
return
-
ENOMEM
;
}
static
void
ia_int
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
static
irqreturn_t
ia_int
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
struct
atm_dev
*
dev
;
IADEV
*
iadev
;
unsigned
int
status
;
int
handled
=
0
;
dev
=
dev_id
;
iadev
=
INPH_IA_DEV
(
dev
);
while
(
(
status
=
readl
(
iadev
->
reg
+
IPHASE5575_BUS_STATUS_REG
)
&
0x7f
))
{
handled
=
1
;
IF_EVENT
(
printk
(
"ia_int: status = 0x%x
\n
"
,
status
);)
if
(
status
&
STAT_REASSINT
)
{
...
...
@@ -2236,7 +2238,8 @@ static void ia_int(int irq, void *dev_id, struct pt_regs *regs)
if
(
status
&
STAT_FEINT
)
IaFrontEndIntr
(
iadev
);
}
}
}
return
IRQ_RETVAL
(
handled
);
}
...
...
drivers/atm/lanai.c
View file @
a688bf88
...
...
@@ -2047,10 +2047,12 @@ static inline void lanai_int_1(struct lanai_dev *lanai, u32 reason)
reg_write
(
lanai
,
ack
,
IntAck_Reg
);
}
static
void
lanai_int
(
int
irq
,
void
*
devid
,
struct
pt_regs
*
regs
)
static
irqreturn_t
lanai_int
(
int
irq
,
void
*
devid
,
struct
pt_regs
*
regs
)
{
struct
lanai_dev
*
lanai
=
(
struct
lanai_dev
*
)
devid
;
u32
reason
;
int
handled
=
0
;
(
void
)
irq
;
(
void
)
regs
;
/* unused variables */
#ifdef USE_POWERDOWN
if
(
lanai
->
conf1
&
CONFIG1_POWERDOWN
)
{
...
...
@@ -2062,8 +2064,11 @@ static void lanai_int(int irq, void *devid, struct pt_regs *regs)
conf2_write
(
lanai
);
}
#endif
while
((
reason
=
intr_pending
(
lanai
))
!=
0
)
while
((
reason
=
intr_pending
(
lanai
))
!=
0
)
{
handled
=
1
;
lanai_int_1
(
lanai
,
reason
);
}
return
IRQ_RETVAL
(
handled
);
}
/* TODO - it would be nice if we could use the "delayed interrupt" system
...
...
drivers/atm/nicstar.c
View file @
a688bf88
...
...
@@ -220,7 +220,7 @@ static scq_info *get_scq(int size, u32 scd);
static
void
free_scq
(
scq_info
*
scq
,
struct
atm_vcc
*
vcc
);
static
void
push_rxbufs
(
ns_dev
*
card
,
u32
type
,
u32
handle1
,
u32
addr1
,
u32
handle2
,
u32
addr2
);
static
void
ns_irq_handler
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
static
irqreturn_t
ns_irq_handler
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
);
static
int
ns_open
(
struct
atm_vcc
*
vcc
,
short
vpi
,
int
vci
);
static
void
ns_close
(
struct
atm_vcc
*
vcc
);
static
void
fill_tst
(
ns_dev
*
card
,
int
n
,
vc_map
*
vc
);
...
...
@@ -1186,7 +1186,7 @@ static void push_rxbufs(ns_dev *card, u32 type, u32 handle1, u32 addr1,
static
void
ns_irq_handler
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
static
irqreturn_t
ns_irq_handler
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
u32
stat_r
;
ns_dev
*
card
;
...
...
@@ -1366,6 +1366,7 @@ static void ns_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
spin_unlock_irqrestore
(
&
card
->
int_lock
,
flags
);
PRINTK
(
"nicstar%d: end of interrupt service
\n
"
,
card
->
index
);
return
IRQ_HANDLED
;
}
...
...
drivers/atm/zatm.c
View file @
a688bf88
...
...
@@ -1214,15 +1214,17 @@ static int start_tx(struct atm_dev *dev)
/*------------------------------- interrupts --------------------------------*/
static
void
zatm_int
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
static
irqreturn_t
zatm_int
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
struct
atm_dev
*
dev
;
struct
zatm_dev
*
zatm_dev
;
u32
reason
;
int
handled
=
0
;
dev
=
dev_id
;
zatm_dev
=
ZATM_DEV
(
dev
);
while
((
reason
=
zin
(
GSR
)))
{
handled
=
1
;
EVENT
(
"reason 0x%x
\n
"
,
reason
,
0
);
if
(
reason
&
uPD98401_INT_PI
)
{
EVENT
(
"PHY int
\n
"
,
0
,
0
);
...
...
@@ -1285,6 +1287,7 @@ static void zatm_int(int irq,void *dev_id,struct pt_regs *regs)
}
/* @@@ handle RCRn */
}
return
IRQ_RETVAL
(
handled
);
}
...
...
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