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
nexedi
linux
Commits
6890d1c6
Commit
6890d1c6
authored
Feb 25, 2004
by
Stephen Hemminger
Committed by
David S. Miller
Feb 25, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IRDA]: Fix handling of shared IRQs in smsc-ircc2 driver.:
parent
f21a82a5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
drivers/net/irda/smsc-ircc2.c
drivers/net/irda/smsc-ircc2.c
+15
-6
No files found.
drivers/net/irda/smsc-ircc2.c
View file @
6890d1c6
...
...
@@ -1387,11 +1387,12 @@ static irqreturn_t smsc_ircc_interrupt(int irq, void *dev_id, struct pt_regs *re
struct
net_device
*
dev
=
(
struct
net_device
*
)
dev_id
;
struct
smsc_ircc_cb
*
self
;
int
iobase
,
iir
,
lcra
,
lsr
;
irqreturn_t
ret
=
IRQ_NONE
;
if
(
dev
==
NULL
)
{
printk
(
KERN_WARNING
"%s: irq %d for unknown device.
\n
"
,
driver_name
,
irq
);
return
IRQ_NONE
;
goto
irq_ret
;
}
self
=
(
struct
smsc_ircc_cb
*
)
dev
->
priv
;
ASSERT
(
self
!=
NULL
,
return
IRQ_NONE
;);
...
...
@@ -1401,14 +1402,18 @@ static irqreturn_t smsc_ircc_interrupt(int irq, void *dev_id, struct pt_regs *re
/* Check if we should use the SIR interrupt handler */
if
(
self
->
io
.
speed
<=
SMSC_IRCC2_MAX_SIR_SPEED
)
{
irqreturn_t
ret
=
smsc_ircc_interrupt_sir
(
dev
);
spin_unlock
(
&
self
->
lock
);
return
ret
;
ret
=
smsc_ircc_interrupt_sir
(
dev
);
goto
irq_ret_unlock
;
}
iobase
=
self
->
io
.
fir_base
;
register_bank
(
iobase
,
0
);
iir
=
inb
(
iobase
+
IRCC_IIR
);
if
(
iir
==
0
)
goto
irq_ret_unlock
;
ret
=
IRQ_HANDLED
;
/* Disable interrupts */
outb
(
0
,
iobase
+
IRCC_IER
);
lcra
=
inb
(
iobase
+
IRCC_LCR_A
);
...
...
@@ -1434,8 +1439,10 @@ static irqreturn_t smsc_ircc_interrupt(int irq, void *dev_id, struct pt_regs *re
register_bank
(
iobase
,
0
);
outb
(
IRCC_IER_ACTIVE_FRAME
|
IRCC_IER_EOM
,
iobase
+
IRCC_IER
);
irq_ret_unlock:
spin_unlock
(
&
self
->
lock
);
return
IRQ_RETVAL
(
iir
);
irq_ret:
return
ret
;
}
/*
...
...
@@ -1456,6 +1463,8 @@ static irqreturn_t smsc_ircc_interrupt_sir(struct net_device *dev)
iobase
=
self
->
io
.
sir_base
;
iir
=
inb
(
iobase
+
UART_IIR
)
&
UART_IIR_ID
;
if
(
iir
==
0
)
return
IRQ_NONE
;
while
(
iir
)
{
/* Clear interrupt */
lsr
=
inb
(
iobase
+
UART_LSR
);
...
...
@@ -1489,7 +1498,7 @@ static irqreturn_t smsc_ircc_interrupt_sir(struct net_device *dev)
iir
=
inb
(
iobase
+
UART_IIR
)
&
UART_IIR_ID
;
}
/*spin_unlock(&self->lock);*/
return
IRQ_
RETVAL
(
iir
)
;
return
IRQ_
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