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
3ab2cdd0
Commit
3ab2cdd0
authored
Jun 04, 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
bec4596b
dc605dbd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
8 deletions
+11
-8
drivers/net/can/c_can/c_can.c
drivers/net/can/c_can/c_can.c
+9
-7
drivers/net/can/c_can/c_can.h
drivers/net/can/c_can/c_can.h
+1
-0
drivers/net/can/cc770/cc770_platform.c
drivers/net/can/cc770/cc770_platform.c
+1
-1
No files found.
drivers/net/can/c_can/c_can.c
View file @
3ab2cdd0
...
...
@@ -686,7 +686,7 @@ static int c_can_get_berr_counter(const struct net_device *dev,
*
* We iterate from priv->tx_echo to priv->tx_next and check if the
* packet has been transmitted, echo it back to the CAN framework.
* If we discover a not yet transmitted pack
age
, stop looking for more.
* If we discover a not yet transmitted pack
et
, stop looking for more.
*/
static
void
c_can_do_tx
(
struct
net_device
*
dev
)
{
...
...
@@ -698,7 +698,7 @@ static void c_can_do_tx(struct net_device *dev)
for
(
/* nix */
;
(
priv
->
tx_next
-
priv
->
tx_echo
)
>
0
;
priv
->
tx_echo
++
)
{
msg_obj_no
=
get_tx_echo_msg_obj
(
priv
);
val
=
c_can_read_reg32
(
priv
,
&
priv
->
regs
->
txrqst1
);
if
(
!
(
val
&
(
1
<<
msg_obj_no
)))
{
if
(
!
(
val
&
(
1
<<
(
msg_obj_no
-
1
)
)))
{
can_get_echo_skb
(
dev
,
msg_obj_no
-
C_CAN_MSG_OBJ_TX_FIRST
);
stats
->
tx_bytes
+=
priv
->
read_reg
(
priv
,
...
...
@@ -706,6 +706,8 @@ static void c_can_do_tx(struct net_device *dev)
&
IF_MCONT_DLC_MASK
;
stats
->
tx_packets
++
;
c_can_inval_msg_object
(
dev
,
0
,
msg_obj_no
);
}
else
{
break
;
}
}
...
...
@@ -950,7 +952,7 @@ static int c_can_poll(struct napi_struct *napi, int quota)
struct
net_device
*
dev
=
napi
->
dev
;
struct
c_can_priv
*
priv
=
netdev_priv
(
dev
);
irqstatus
=
priv
->
read_reg
(
priv
,
&
priv
->
regs
->
interrupt
)
;
irqstatus
=
priv
->
irqstatus
;
if
(
!
irqstatus
)
goto
end
;
...
...
@@ -1028,12 +1030,11 @@ static int c_can_poll(struct napi_struct *napi, int quota)
static
irqreturn_t
c_can_isr
(
int
irq
,
void
*
dev_id
)
{
u16
irqstatus
;
struct
net_device
*
dev
=
(
struct
net_device
*
)
dev_id
;
struct
c_can_priv
*
priv
=
netdev_priv
(
dev
);
irqstatus
=
priv
->
read_reg
(
priv
,
&
priv
->
regs
->
interrupt
);
if
(
!
irqstatus
)
priv
->
irqstatus
=
priv
->
read_reg
(
priv
,
&
priv
->
regs
->
interrupt
);
if
(
!
priv
->
irqstatus
)
return
IRQ_NONE
;
/* disable all interrupts and schedule the NAPI */
...
...
@@ -1063,10 +1064,11 @@ static int c_can_open(struct net_device *dev)
goto
exit_irq_fail
;
}
napi_enable
(
&
priv
->
napi
);
/* start the c_can controller */
c_can_start
(
dev
);
napi_enable
(
&
priv
->
napi
);
netif_start_queue
(
dev
);
return
0
;
...
...
drivers/net/can/c_can/c_can.h
View file @
3ab2cdd0
...
...
@@ -76,6 +76,7 @@ struct c_can_priv {
unsigned
int
tx_next
;
unsigned
int
tx_echo
;
void
*
priv
;
/* for board-specific data */
u16
irqstatus
;
};
struct
net_device
*
alloc_c_can_dev
(
void
);
...
...
drivers/net/can/cc770/cc770_platform.c
View file @
3ab2cdd0
...
...
@@ -154,7 +154,7 @@ static int __devinit cc770_get_platform_data(struct platform_device *pdev,
struct
cc770_platform_data
*
pdata
=
pdev
->
dev
.
platform_data
;
priv
->
can
.
clock
.
freq
=
pdata
->
osc_freq
;
if
(
priv
->
cpu_interface
|
CPUIF_DSC
)
if
(
priv
->
cpu_interface
&
CPUIF_DSC
)
priv
->
can
.
clock
.
freq
/=
2
;
priv
->
clkout
=
pdata
->
cor
;
priv
->
bus_config
=
pdata
->
bcr
;
...
...
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