Skip to content

Commit 02bb56d

Browse files
ZhaoQiang-b45475davem330
authored andcommitted
ucc/hdlc: fix two little issue
1. modify bd_status from u32 to u16 in function hdlc_rx_done, because bd_status register is 16bits 2. write bd_length register before writing bd_status register Signed-off-by: Zhao Qiang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c80498e commit 02bb56d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/wan/fsl_ucc_hdlc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,8 @@ static netdev_tx_t ucc_hdlc_tx(struct sk_buff *skb, struct net_device *dev)
381381
/* set bd status and length */
382382
bd_status = (bd_status & T_W_S) | T_R_S | T_I_S | T_L_S | T_TC_S;
383383

384-
iowrite16be(bd_status, &bd->status);
385384
iowrite16be(skb->len, &bd->length);
385+
iowrite16be(bd_status, &bd->status);
386386

387387
/* Move to next BD in the ring */
388388
if (!(bd_status & T_W_S))
@@ -457,7 +457,7 @@ static int hdlc_rx_done(struct ucc_hdlc_private *priv, int rx_work_limit)
457457
struct sk_buff *skb;
458458
hdlc_device *hdlc = dev_to_hdlc(dev);
459459
struct qe_bd *bd;
460-
u32 bd_status;
460+
u16 bd_status;
461461
u16 length, howmany = 0;
462462
u8 *bdbuffer;
463463
int i;

0 commit comments

Comments
 (0)