Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218370
b: refs/heads/master
c: 8a0e0a4
h: refs/heads/master
v: v3
  • Loading branch information
Marc Kleine-Budde authored and David S. Miller committed Oct 24, 2010
1 parent 03d6904 commit 39b2d39
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dbe91325c2d6ad34c1ce4f2aeae4bbd11b7a3fff
refs/heads/master: 8a0e0a49b0a917c8c8dce6f7121ec73a5c8e3932
9 changes: 9 additions & 0 deletions trunk/drivers/net/can/at91_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,12 @@ static void at91_setup_mailboxes(struct net_device *dev)
set_mb_mode(priv, i, AT91_MB_MODE_RX);
set_mb_mode(priv, AT91_MB_RX_LAST, AT91_MB_MODE_RX_OVRWR);

/* reset acceptance mask and id register */
for (i = AT91_MB_RX_FIRST; i <= AT91_MB_RX_LAST; i++) {
at91_write(priv, AT91_MAM(i), 0x0 );
at91_write(priv, AT91_MID(i), AT91_MID_MIDE);
}

/* The last 4 mailboxes are used for transmitting. */
for (i = AT91_MB_TX_FIRST; i <= AT91_MB_TX_LAST; i++)
set_mb_mode_prio(priv, i, AT91_MB_MODE_TX, 0);
Expand Down Expand Up @@ -480,6 +486,9 @@ static void at91_read_mb(struct net_device *dev, unsigned int mb,
*(u32 *)(cf->data + 0) = at91_read(priv, AT91_MDL(mb));
*(u32 *)(cf->data + 4) = at91_read(priv, AT91_MDH(mb));

/* allow RX of extended frames */
at91_write(priv, AT91_MID(mb), AT91_MID_MIDE);

if (unlikely(mb == AT91_MB_RX_LAST && reg_msr & AT91_MSR_MMI))
at91_rx_overflow_err(dev);
}
Expand Down

0 comments on commit 39b2d39

Please sign in to comment.