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
834fa12c
Commit
834fa12c
authored
Feb 20, 2012
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
git://gitorious.org/linux-can/linux-can
parents
9d4990a2
a7762b10
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
drivers/net/can/sja1000/sja1000.c
drivers/net/can/sja1000/sja1000.c
+12
-1
No files found.
drivers/net/can/sja1000/sja1000.c
View file @
834fa12c
...
@@ -95,11 +95,16 @@ static void sja1000_write_cmdreg(struct sja1000_priv *priv, u8 val)
...
@@ -95,11 +95,16 @@ static void sja1000_write_cmdreg(struct sja1000_priv *priv, u8 val)
spin_unlock_irqrestore
(
&
priv
->
cmdreg_lock
,
flags
);
spin_unlock_irqrestore
(
&
priv
->
cmdreg_lock
,
flags
);
}
}
static
int
sja1000_is_absent
(
struct
sja1000_priv
*
priv
)
{
return
(
priv
->
read_reg
(
priv
,
REG_MOD
)
==
0xFF
);
}
static
int
sja1000_probe_chip
(
struct
net_device
*
dev
)
static
int
sja1000_probe_chip
(
struct
net_device
*
dev
)
{
{
struct
sja1000_priv
*
priv
=
netdev_priv
(
dev
);
struct
sja1000_priv
*
priv
=
netdev_priv
(
dev
);
if
(
priv
->
reg_base
&&
(
priv
->
read_reg
(
priv
,
0
)
==
0xFF
))
{
if
(
priv
->
reg_base
&&
sja1000_is_absent
(
priv
))
{
printk
(
KERN_INFO
"%s: probing @0x%lX failed
\n
"
,
printk
(
KERN_INFO
"%s: probing @0x%lX failed
\n
"
,
DRV_NAME
,
dev
->
base_addr
);
DRV_NAME
,
dev
->
base_addr
);
return
0
;
return
0
;
...
@@ -493,6 +498,9 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id)
...
@@ -493,6 +498,9 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id)
while
((
isrc
=
priv
->
read_reg
(
priv
,
REG_IR
))
&&
(
n
<
SJA1000_MAX_IRQ
))
{
while
((
isrc
=
priv
->
read_reg
(
priv
,
REG_IR
))
&&
(
n
<
SJA1000_MAX_IRQ
))
{
n
++
;
n
++
;
status
=
priv
->
read_reg
(
priv
,
REG_SR
);
status
=
priv
->
read_reg
(
priv
,
REG_SR
);
/* check for absent controller due to hw unplug */
if
(
status
==
0xFF
&&
sja1000_is_absent
(
priv
))
return
IRQ_NONE
;
if
(
isrc
&
IRQ_WUI
)
if
(
isrc
&
IRQ_WUI
)
dev_warn
(
dev
->
dev
.
parent
,
"wakeup interrupt
\n
"
);
dev_warn
(
dev
->
dev
.
parent
,
"wakeup interrupt
\n
"
);
...
@@ -509,6 +517,9 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id)
...
@@ -509,6 +517,9 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id)
while
(
status
&
SR_RBS
)
{
while
(
status
&
SR_RBS
)
{
sja1000_rx
(
dev
);
sja1000_rx
(
dev
);
status
=
priv
->
read_reg
(
priv
,
REG_SR
);
status
=
priv
->
read_reg
(
priv
,
REG_SR
);
/* check for absent controller */
if
(
status
==
0xFF
&&
sja1000_is_absent
(
priv
))
return
IRQ_NONE
;
}
}
}
}
if
(
isrc
&
(
IRQ_DOI
|
IRQ_EI
|
IRQ_BEI
|
IRQ_EPI
|
IRQ_ALI
))
{
if
(
isrc
&
(
IRQ_DOI
|
IRQ_EI
|
IRQ_BEI
|
IRQ_EPI
|
IRQ_ALI
))
{
...
...
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