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
a723b984
Commit
a723b984
authored
Oct 18, 2012
by
Joachim Eastwood
Committed by
David S. Miller
Oct 19, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net/at91_ether: use macb defs for rx dma buffers
Signed-off-by:
Joachim Eastwood
<
manabian@gmail.com
>
parent
f8bded38
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
11 deletions
+4
-11
drivers/net/ethernet/cadence/at91_ether.c
drivers/net/ethernet/cadence/at91_ether.c
+4
-4
drivers/net/ethernet/cadence/at91_ether.h
drivers/net/ethernet/cadence/at91_ether.h
+0
-7
No files found.
drivers/net/ethernet/cadence/at91_ether.c
View file @
a723b984
...
...
@@ -741,7 +741,7 @@ static void at91ether_start(struct net_device *dev)
}
/* Set the Wrap bit on the last descriptor */
dlist
->
descriptors
[
i
-
1
].
addr
|=
EMAC_DESC_WRAP
;
dlist
->
descriptors
[
i
-
1
].
addr
|=
MACB_BIT
(
RX_WRAP
)
;
/* Reset buffer index */
lp
->
rxBuffIndex
=
0
;
...
...
@@ -901,7 +901,7 @@ static void at91ether_rx(struct net_device *dev)
unsigned
int
pktlen
;
dlist
=
lp
->
dlist
;
while
(
dlist
->
descriptors
[
lp
->
rxBuffIndex
].
addr
&
EMAC_DESC_DONE
)
{
while
(
dlist
->
descriptors
[
lp
->
rxBuffIndex
].
addr
&
MACB_BIT
(
RX_USED
)
)
{
p_recv
=
dlist
->
recv_buf
[
lp
->
rxBuffIndex
];
pktlen
=
dlist
->
descriptors
[
lp
->
rxBuffIndex
].
size
&
0x7ff
;
/* Length of frame including FCS */
skb
=
netdev_alloc_skb
(
dev
,
pktlen
+
2
);
...
...
@@ -918,10 +918,10 @@ static void at91ether_rx(struct net_device *dev)
printk
(
KERN_NOTICE
"%s: Memory squeeze, dropping packet.
\n
"
,
dev
->
name
);
}
if
(
dlist
->
descriptors
[
lp
->
rxBuffIndex
].
size
&
EMAC_MULTICAST
)
if
(
dlist
->
descriptors
[
lp
->
rxBuffIndex
].
size
&
MACB_BIT
(
RX_MHASH_MATCH
)
)
dev
->
stats
.
multicast
++
;
dlist
->
descriptors
[
lp
->
rxBuffIndex
].
addr
&=
~
EMAC_DESC_DONE
;
/* reset ownership bit */
dlist
->
descriptors
[
lp
->
rxBuffIndex
].
addr
&=
~
MACB_BIT
(
RX_USED
)
;
/* reset ownership bit */
if
(
lp
->
rxBuffIndex
==
MAX_RX_DESCR
-
1
)
/* wrap after last buffer */
lp
->
rxBuffIndex
=
0
;
else
...
...
drivers/net/ethernet/cadence/at91_ether.h
View file @
a723b984
...
...
@@ -63,13 +63,6 @@
#define MAX_RBUFF_SZ 0x600
/* 1518 rounded up */
#define MAX_RX_DESCR 9
/* max number of receive buffers */
#define EMAC_DESC_DONE 0x00000001
/* bit for if DMA is done */
#define EMAC_DESC_WRAP 0x00000002
/* bit for wrap */
#define EMAC_BROADCAST 0x80000000
/* broadcast address */
#define EMAC_MULTICAST 0x40000000
/* multicast address */
#define EMAC_UNICAST 0x20000000
/* unicast address */
struct
rbf_t
{
unsigned
int
addr
;
...
...
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