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
fbb7a6e7
Commit
fbb7a6e7
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 dma description struct
Signed-off-by:
Joachim Eastwood
<
manabian@gmail.com
>
parent
e0da1f14
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
9 deletions
+4
-9
drivers/net/ethernet/cadence/at91_ether.c
drivers/net/ethernet/cadence/at91_ether.c
+3
-3
drivers/net/ethernet/cadence/macb.h
drivers/net/ethernet/cadence/macb.h
+1
-6
No files found.
drivers/net/ethernet/cadence/at91_ether.c
View file @
fbb7a6e7
...
...
@@ -157,7 +157,7 @@ static void at91ether_start(struct net_device *dev)
for
(
i
=
0
;
i
<
MAX_RX_DESCR
;
i
++
)
{
dlist
->
descriptors
[
i
].
addr
=
(
unsigned
int
)
&
dlist_phys
->
recv_buf
[
i
][
0
];
dlist
->
descriptors
[
i
].
size
=
0
;
dlist
->
descriptors
[
i
].
ctrl
=
0
;
}
/* Set the Wrap bit on the last descriptor */
...
...
@@ -311,7 +311,7 @@ static void at91ether_rx(struct net_device *dev)
dlist
=
lp
->
dlist
;
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 */
pktlen
=
dlist
->
descriptors
[
lp
->
rxBuffIndex
].
ctrl
&
0x7ff
;
/* Length of frame including FCS */
skb
=
netdev_alloc_skb
(
dev
,
pktlen
+
2
);
if
(
skb
!=
NULL
)
{
skb_reserve
(
skb
,
2
);
...
...
@@ -326,7 +326,7 @@ 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
&
MACB_BIT
(
RX_MHASH_MATCH
))
if
(
dlist
->
descriptors
[
lp
->
rxBuffIndex
].
ctrl
&
MACB_BIT
(
RX_MHASH_MATCH
))
dev
->
stats
.
multicast
++
;
dlist
->
descriptors
[
lp
->
rxBuffIndex
].
addr
&=
~
MACB_BIT
(
RX_USED
);
/* reset ownership bit */
...
...
drivers/net/ethernet/cadence/macb.h
View file @
fbb7a6e7
...
...
@@ -504,16 +504,11 @@ struct gem_stats {
u32
rx_udp_checksum_errors
;
};
struct
rbf_t
{
unsigned
int
addr
;
unsigned
long
size
;
};
#define MAX_RBUFF_SZ 0x600
/* 1518 rounded up */
#define MAX_RX_DESCR 9
/* max number of receive buffers */
struct
recv_desc_bufs
{
struct
rbf_t
descriptors
[
MAX_RX_DESCR
];
/* must be on sizeof (rbf_t
) boundary */
struct
dma_desc
descriptors
[
MAX_RX_DESCR
];
/* must be on sizeof (dma_desc
) boundary */
char
recv_buf
[
MAX_RX_DESCR
][
MAX_RBUFF_SZ
];
/* must be on long boundary */
};
...
...
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