Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255352
b: refs/heads/master
c: e14ee40
h: refs/heads/master
v: v3
  • Loading branch information
Marc Kleine-Budde committed Jun 6, 2011
1 parent 7cbc909 commit c38663b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5613fff2dc315e5f44623031cb62a29942548427
refs/heads/master: e14ee40bece891b5edccdd514112999ec423a448
10 changes: 6 additions & 4 deletions trunk/drivers/net/can/at91_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,12 +513,14 @@ static void at91_read_mb(struct net_device *dev, unsigned int mb,
cf->can_id = (reg_mid >> 18) & CAN_SFF_MASK;

reg_msr = at91_read(priv, AT91_MSR(mb));
if (reg_msr & AT91_MSR_MRTR)
cf->can_id |= CAN_RTR_FLAG;
cf->can_dlc = get_can_dlc((reg_msr >> 16) & 0xf);

*(u32 *)(cf->data + 0) = at91_read(priv, AT91_MDL(mb));
*(u32 *)(cf->data + 4) = at91_read(priv, AT91_MDH(mb));
if (reg_msr & AT91_MSR_MRTR)
cf->can_id |= CAN_RTR_FLAG;
else {
*(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);
Expand Down

0 comments on commit c38663b

Please sign in to comment.