Skip to content

Commit 071f5d1

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: "A lot of Thanksgiving turkey leftovers accumulated, here goes: 1) Fix bluetooth l2cap_chan object leak, from Johan Hedberg. 2) IDs for some new iwlwifi chips, from Oren Givon. 3) Fix rtlwifi lockups on boot, from Larry Finger. 4) Fix memory leak in fm10k, from Stephen Hemminger. 5) We have a route leak in the ipv6 tunnel infrastructure, fix from Paolo Abeni. 6) Fix buffer pointer handling in arm64 bpf JIT,f rom Zi Shen Lim. 7) Wrong lockdep annotations in tcp md5 support, fix from Eric Dumazet. 8) Work around some middle boxes which prevent proper handling of TCP Fast Open, from Yuchung Cheng. 9) TCP repair can do huge kmalloc() requests, build paged SKBs instead. From Eric Dumazet. 10) Fix msg_controllen overflow in scm_detach_fds, from Daniel Borkmann. 11) Fix device leaks on ipmr table destruction in ipv4 and ipv6, from Nikolay Aleksandrov. 12) Fix use after free in epoll with AF_UNIX sockets, from Rainer Weikusat. 13) Fix double free in VRF code, from Nikolay Aleksandrov. 14) Fix skb leaks on socket receive queue in tipc, from Ying Xue. 15) Fix ifup/ifdown crach in xgene driver, from Iyappan Subramanian. 16) Fix clearing of persistent array maps in bpf, from Daniel Borkmann. 17) In TCP, for the cross-SYN case, we don't initialize tp->copied_seq early enough. From Eric Dumazet. 18) Fix out of bounds accesses in bpf array implementation when updating elements, from Daniel Borkmann. 19) Fill gaps in RCU protection of np->opt in ipv6 stack, from Eric Dumazet. 20) When dumping proxy neigh entries, we have to accomodate NULL device pointers properly, from Konstantin Khlebnikov. 21) SCTP doesn't release all ipv6 socket resources properly, fix from Eric Dumazet. 22) Prevent underflows of sch->q.qlen for multiqueue packet schedulers, also from Eric Dumazet. 23) Fix MAC and unicast list handling in bnxt_en driver, from Jeffrey Huang and Michael Chan. 24) Don't actively scan radar channels, from Antonio Quartulli" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (110 commits) net: phy: reset only targeted phy bnxt_en: Setup uc_list mac filters after resetting the chip. bnxt_en: enforce proper storing of MAC address bnxt_en: Fixed incorrect implementation of ndo_set_mac_address net: lpc_eth: remove irq > NR_IRQS check from probe() net_sched: fix qdisc_tree_decrease_qlen() races openvswitch: fix hangup on vxlan/gre/geneve device deletion ipv4: igmp: Allow removing groups from a removed interface ipv6: sctp: implement sctp_v6_destroy_sock() arm64: bpf: add 'store immediate' instruction ipv6: kill sk_dst_lock ipv6: sctp: add rcu protection around np->opt net/neighbour: fix crash at dumping device-agnostic proxy entries sctp: use GFP_USER for user-controlled kmalloc sctp: convert sack_needed and sack_generation to bits ipv6: add complete rcu protection around np->opt bpf: fix allocation warnings in bpf maps and integer overflow mvebu: dts: enable IP checksum with jumbo frames for Armada 38x on Port0 net: mvneta: enable setting custom TX IP checksum limit net: mvneta: fix error path for building skb ...
2 parents 2873d32 + e3c9b1e commit 071f5d1

File tree

174 files changed

+3192
-646
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+3192
-646
lines changed

Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,19 @@ Required properties:
88
- phy-mode: See ethernet.txt file in the same directory
99
- clocks: a pointer to the reference clock for this device.
1010

11+
Optional properties:
12+
- tx-csum-limit: maximum mtu supported by port that allow TX checksum.
13+
Value is presented in bytes. If not used, by default 1600B is set for
14+
"marvell,armada-370-neta" and 9800B for others.
15+
1116
Example:
1217

1318
ethernet@d0070000 {
1419
compatible = "marvell,armada-370-neta";
1520
reg = <0xd0070000 0x2500>;
1621
interrupts = <8>;
1722
clocks = <&gate_clk 4>;
23+
tx-csum-limit = <9800>
1824
status = "okay";
1925
phy = <&phy0>;
2026
phy-mode = "rgmii-id";

MAINTAINERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1847,7 +1847,7 @@ S: Supported
18471847
F: drivers/net/wireless/ath/ath6kl/
18481848

18491849
WILOCITY WIL6210 WIRELESS DRIVER
1850-
M: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
1850+
M: Maya Erez <qca_merez@qca.qualcomm.com>
18511851
L: linux-wireless@vger.kernel.org
18521852
L: wil6210@qca.qualcomm.com
18531853
S: Supported
@@ -10903,9 +10903,9 @@ S: Maintained
1090310903
F: drivers/media/tuners/tua9001*
1090410904

1090510905
TULIP NETWORK DRIVERS
10906-
M: Grant Grundler <grundler@parisc-linux.org>
1090710906
L: netdev@vger.kernel.org
10908-
S: Maintained
10907+
L: linux-parisc@vger.kernel.org
10908+
S: Orphan
1090910909
F: drivers/net/ethernet/dec/tulip/
1091010910

1091110911
TUN/TAP driver

arch/arm/boot/dts/armada-38x.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@
498498
reg = <0x70000 0x4000>;
499499
interrupts-extended = <&mpic 8>;
500500
clocks = <&gateclk 4>;
501+
tx-csum-limit = <9800>;
501502
status = "disabled";
502503
};
503504

arch/arm64/net/bpf_jit_comp.c

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@ static inline int epilogue_offset(const struct jit_ctx *ctx)
139139
/* Stack must be multiples of 16B */
140140
#define STACK_ALIGN(sz) (((sz) + 15) & ~15)
141141

142+
#define _STACK_SIZE \
143+
(MAX_BPF_STACK \
144+
+ 4 /* extra for skb_copy_bits buffer */)
145+
146+
#define STACK_SIZE STACK_ALIGN(_STACK_SIZE)
147+
142148
static void build_prologue(struct jit_ctx *ctx)
143149
{
144150
const u8 r6 = bpf2a64[BPF_REG_6];
@@ -150,10 +156,6 @@ static void build_prologue(struct jit_ctx *ctx)
150156
const u8 rx = bpf2a64[BPF_REG_X];
151157
const u8 tmp1 = bpf2a64[TMP_REG_1];
152158
const u8 tmp2 = bpf2a64[TMP_REG_2];
153-
int stack_size = MAX_BPF_STACK;
154-
155-
stack_size += 4; /* extra for skb_copy_bits buffer */
156-
stack_size = STACK_ALIGN(stack_size);
157159

158160
/*
159161
* BPF prog stack layout
@@ -165,12 +167,13 @@ static void build_prologue(struct jit_ctx *ctx)
165167
* | ... | callee saved registers
166168
* +-----+
167169
* | | x25/x26
168-
* BPF fp register => -80:+-----+
170+
* BPF fp register => -80:+-----+ <= (BPF_FP)
169171
* | |
170172
* | ... | BPF prog stack
171173
* | |
172-
* | |
173-
* current A64_SP => +-----+
174+
* +-----+ <= (BPF_FP - MAX_BPF_STACK)
175+
* |RSVD | JIT scratchpad
176+
* current A64_SP => +-----+ <= (BPF_FP - STACK_SIZE)
174177
* | |
175178
* | ... | Function call stack
176179
* | |
@@ -196,7 +199,7 @@ static void build_prologue(struct jit_ctx *ctx)
196199
emit(A64_MOV(1, fp, A64_SP), ctx);
197200

198201
/* Set up function call stack */
199-
emit(A64_SUB_I(1, A64_SP, A64_SP, stack_size), ctx);
202+
emit(A64_SUB_I(1, A64_SP, A64_SP, STACK_SIZE), ctx);
200203

201204
/* Clear registers A and X */
202205
emit_a64_mov_i64(ra, 0, ctx);
@@ -213,13 +216,9 @@ static void build_epilogue(struct jit_ctx *ctx)
213216
const u8 fp = bpf2a64[BPF_REG_FP];
214217
const u8 tmp1 = bpf2a64[TMP_REG_1];
215218
const u8 tmp2 = bpf2a64[TMP_REG_2];
216-
int stack_size = MAX_BPF_STACK;
217-
218-
stack_size += 4; /* extra for skb_copy_bits buffer */
219-
stack_size = STACK_ALIGN(stack_size);
220219

221220
/* We're done with BPF stack */
222-
emit(A64_ADD_I(1, A64_SP, A64_SP, stack_size), ctx);
221+
emit(A64_ADD_I(1, A64_SP, A64_SP, STACK_SIZE), ctx);
223222

224223
/* Restore fs (x25) and x26 */
225224
emit(A64_POP(fp, A64_R(26), A64_SP), ctx);
@@ -591,7 +590,25 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx)
591590
case BPF_ST | BPF_MEM | BPF_H:
592591
case BPF_ST | BPF_MEM | BPF_B:
593592
case BPF_ST | BPF_MEM | BPF_DW:
594-
goto notyet;
593+
/* Load imm to a register then store it */
594+
ctx->tmp_used = 1;
595+
emit_a64_mov_i(1, tmp2, off, ctx);
596+
emit_a64_mov_i(1, tmp, imm, ctx);
597+
switch (BPF_SIZE(code)) {
598+
case BPF_W:
599+
emit(A64_STR32(tmp, dst, tmp2), ctx);
600+
break;
601+
case BPF_H:
602+
emit(A64_STRH(tmp, dst, tmp2), ctx);
603+
break;
604+
case BPF_B:
605+
emit(A64_STRB(tmp, dst, tmp2), ctx);
606+
break;
607+
case BPF_DW:
608+
emit(A64_STR64(tmp, dst, tmp2), ctx);
609+
break;
610+
}
611+
break;
595612

596613
/* STX: *(size *)(dst + off) = src */
597614
case BPF_STX | BPF_MEM | BPF_W:
@@ -658,7 +675,7 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx)
658675
return -EINVAL;
659676
}
660677
emit_a64_mov_i64(r3, size, ctx);
661-
emit(A64_ADD_I(1, r4, fp, MAX_BPF_STACK), ctx);
678+
emit(A64_SUB_I(1, r4, fp, STACK_SIZE), ctx);
662679
emit_a64_mov_i64(r5, (unsigned long)bpf_load_pointer, ctx);
663680
emit(A64_PUSH(A64_FP, A64_LR, A64_SP), ctx);
664681
emit(A64_MOV(1, A64_FP, A64_SP), ctx);

crypto/algif_aead.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ static int aead_wait_for_data(struct sock *sk, unsigned flags)
125125
if (flags & MSG_DONTWAIT)
126126
return -EAGAIN;
127127

128-
set_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags);
128+
sk_set_bit(SOCKWQ_ASYNC_WAITDATA, sk);
129129

130130
for (;;) {
131131
if (signal_pending(current))
@@ -139,7 +139,7 @@ static int aead_wait_for_data(struct sock *sk, unsigned flags)
139139
}
140140
finish_wait(sk_sleep(sk), &wait);
141141

142-
clear_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags);
142+
sk_clear_bit(SOCKWQ_ASYNC_WAITDATA, sk);
143143

144144
return err;
145145
}

crypto/algif_skcipher.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ static int skcipher_wait_for_wmem(struct sock *sk, unsigned flags)
212212
if (flags & MSG_DONTWAIT)
213213
return -EAGAIN;
214214

215-
set_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags);
215+
sk_set_bit(SOCKWQ_ASYNC_NOSPACE, sk);
216216

217217
for (;;) {
218218
if (signal_pending(current))
@@ -258,7 +258,7 @@ static int skcipher_wait_for_data(struct sock *sk, unsigned flags)
258258
return -EAGAIN;
259259
}
260260

261-
set_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags);
261+
sk_set_bit(SOCKWQ_ASYNC_WAITDATA, sk);
262262

263263
for (;;) {
264264
if (signal_pending(current))
@@ -272,7 +272,7 @@ static int skcipher_wait_for_data(struct sock *sk, unsigned flags)
272272
}
273273
finish_wait(sk_sleep(sk), &wait);
274274

275-
clear_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags);
275+
sk_clear_bit(SOCKWQ_ASYNC_WAITDATA, sk);
276276

277277
return err;
278278
}

drivers/isdn/hisax/config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1896,7 +1896,7 @@ static void EChannel_proc_rcv(struct hisax_d_if *d_if)
18961896
ptr--;
18971897
*ptr++ = '\n';
18981898
*ptr = 0;
1899-
HiSax_putstatus(cs, NULL, "%s", cs->dlog);
1899+
HiSax_putstatus(cs, NULL, cs->dlog);
19001900
} else
19011901
HiSax_putstatus(cs, "LogEcho: ",
19021902
"warning Frame too big (%d)",

drivers/isdn/hisax/hfc_pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ receive_emsg(struct IsdnCardState *cs)
901901
ptr--;
902902
*ptr++ = '\n';
903903
*ptr = 0;
904-
HiSax_putstatus(cs, NULL, "%s", cs->dlog);
904+
HiSax_putstatus(cs, NULL, cs->dlog);
905905
} else
906906
HiSax_putstatus(cs, "LogEcho: ", "warning Frame too big (%d)", total - 3);
907907
}

drivers/isdn/hisax/hfc_sx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ receive_emsg(struct IsdnCardState *cs)
674674
ptr--;
675675
*ptr++ = '\n';
676676
*ptr = 0;
677-
HiSax_putstatus(cs, NULL, "%s", cs->dlog);
677+
HiSax_putstatus(cs, NULL, cs->dlog);
678678
} else
679679
HiSax_putstatus(cs, "LogEcho: ", "warning Frame too big (%d)", skb->len);
680680
}

drivers/isdn/hisax/q931.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,7 +1179,7 @@ LogFrame(struct IsdnCardState *cs, u_char *buf, int size)
11791179
dp--;
11801180
*dp++ = '\n';
11811181
*dp = 0;
1182-
HiSax_putstatus(cs, NULL, "%s", cs->dlog);
1182+
HiSax_putstatus(cs, NULL, cs->dlog);
11831183
} else
11841184
HiSax_putstatus(cs, "LogFrame: ", "warning Frame too big (%d)", size);
11851185
}
@@ -1246,7 +1246,7 @@ dlogframe(struct IsdnCardState *cs, struct sk_buff *skb, int dir)
12461246
}
12471247
if (finish) {
12481248
*dp = 0;
1249-
HiSax_putstatus(cs, NULL, "%s", cs->dlog);
1249+
HiSax_putstatus(cs, NULL, cs->dlog);
12501250
return;
12511251
}
12521252
if ((0xfe & buf[0]) == PROTO_DIS_N0) { /* 1TR6 */
@@ -1509,5 +1509,5 @@ dlogframe(struct IsdnCardState *cs, struct sk_buff *skb, int dir)
15091509
dp += sprintf(dp, "Unknown protocol %x!", buf[0]);
15101510
}
15111511
*dp = 0;
1512-
HiSax_putstatus(cs, NULL, "%s", cs->dlog);
1512+
HiSax_putstatus(cs, NULL, cs->dlog);
15131513
}

drivers/net/can/bfin_can.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,8 +501,6 @@ static int bfin_can_err(struct net_device *dev, u16 isrc, u16 status)
501501
cf->data[2] |= CAN_ERR_PROT_FORM;
502502
else if (status & SER)
503503
cf->data[2] |= CAN_ERR_PROT_STUFF;
504-
else
505-
cf->data[2] |= CAN_ERR_PROT_UNSPEC;
506504
}
507505

508506
priv->can.state = state;

drivers/net/can/c_can/c_can.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,6 @@ static int c_can_handle_bus_err(struct net_device *dev,
962962
* type of the last error to occur on the CAN bus
963963
*/
964964
cf->can_id |= CAN_ERR_PROT | CAN_ERR_BUSERROR;
965-
cf->data[2] |= CAN_ERR_PROT_UNSPEC;
966965

967966
switch (lec_type) {
968967
case LEC_STUFF_ERROR:
@@ -975,8 +974,7 @@ static int c_can_handle_bus_err(struct net_device *dev,
975974
break;
976975
case LEC_ACK_ERROR:
977976
netdev_dbg(dev, "ack error\n");
978-
cf->data[3] |= (CAN_ERR_PROT_LOC_ACK |
979-
CAN_ERR_PROT_LOC_ACK_DEL);
977+
cf->data[3] = CAN_ERR_PROT_LOC_ACK;
980978
break;
981979
case LEC_BIT1_ERROR:
982980
netdev_dbg(dev, "bit1 error\n");
@@ -988,8 +986,7 @@ static int c_can_handle_bus_err(struct net_device *dev,
988986
break;
989987
case LEC_CRC_ERROR:
990988
netdev_dbg(dev, "CRC error\n");
991-
cf->data[3] |= (CAN_ERR_PROT_LOC_CRC_SEQ |
992-
CAN_ERR_PROT_LOC_CRC_DEL);
989+
cf->data[3] = CAN_ERR_PROT_LOC_CRC_SEQ;
993990
break;
994991
default:
995992
break;

drivers/net/can/cc770/cc770.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ static int cc770_err(struct net_device *dev, u8 status)
578578
cf->data[2] |= CAN_ERR_PROT_BIT0;
579579
break;
580580
case STAT_LEC_CRC:
581-
cf->data[3] |= CAN_ERR_PROT_LOC_CRC_SEQ;
581+
cf->data[3] = CAN_ERR_PROT_LOC_CRC_SEQ;
582582
break;
583583
}
584584
}

drivers/net/can/flexcan.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,13 +535,13 @@ static void do_bus_err(struct net_device *dev,
535535
if (reg_esr & FLEXCAN_ESR_ACK_ERR) {
536536
netdev_dbg(dev, "ACK_ERR irq\n");
537537
cf->can_id |= CAN_ERR_ACK;
538-
cf->data[3] |= CAN_ERR_PROT_LOC_ACK;
538+
cf->data[3] = CAN_ERR_PROT_LOC_ACK;
539539
tx_errors = 1;
540540
}
541541
if (reg_esr & FLEXCAN_ESR_CRC_ERR) {
542542
netdev_dbg(dev, "CRC_ERR irq\n");
543543
cf->data[2] |= CAN_ERR_PROT_BIT;
544-
cf->data[3] |= CAN_ERR_PROT_LOC_CRC_SEQ;
544+
cf->data[3] = CAN_ERR_PROT_LOC_CRC_SEQ;
545545
rx_errors = 1;
546546
}
547547
if (reg_esr & FLEXCAN_ESR_FRM_ERR) {

drivers/net/can/janz-ican3.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,6 @@ static int ican3_handle_cevtind(struct ican3_dev *mod, struct ican3_msg *msg)
10961096
cf->data[2] |= CAN_ERR_PROT_STUFF;
10971097
break;
10981098
default:
1099-
cf->data[2] |= CAN_ERR_PROT_UNSPEC;
11001099
cf->data[3] = ecc & ECC_SEG;
11011100
break;
11021101
}

drivers/net/can/m_can/m_can.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,6 @@ static int m_can_handle_lec_err(struct net_device *dev,
487487
* type of the last error to occur on the CAN bus
488488
*/
489489
cf->can_id |= CAN_ERR_PROT | CAN_ERR_BUSERROR;
490-
cf->data[2] |= CAN_ERR_PROT_UNSPEC;
491490

492491
switch (lec_type) {
493492
case LEC_STUFF_ERROR:
@@ -500,8 +499,7 @@ static int m_can_handle_lec_err(struct net_device *dev,
500499
break;
501500
case LEC_ACK_ERROR:
502501
netdev_dbg(dev, "ack error\n");
503-
cf->data[3] |= (CAN_ERR_PROT_LOC_ACK |
504-
CAN_ERR_PROT_LOC_ACK_DEL);
502+
cf->data[3] = CAN_ERR_PROT_LOC_ACK;
505503
break;
506504
case LEC_BIT1_ERROR:
507505
netdev_dbg(dev, "bit1 error\n");
@@ -513,8 +511,7 @@ static int m_can_handle_lec_err(struct net_device *dev,
513511
break;
514512
case LEC_CRC_ERROR:
515513
netdev_dbg(dev, "CRC error\n");
516-
cf->data[3] |= (CAN_ERR_PROT_LOC_CRC_SEQ |
517-
CAN_ERR_PROT_LOC_CRC_DEL);
514+
cf->data[3] = CAN_ERR_PROT_LOC_CRC_SEQ;
518515
break;
519516
default:
520517
break;

drivers/net/can/pch_can.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,8 +559,7 @@ static void pch_can_error(struct net_device *ndev, u32 status)
559559
stats->rx_errors++;
560560
break;
561561
case PCH_CRC_ERR:
562-
cf->data[3] |= CAN_ERR_PROT_LOC_CRC_SEQ |
563-
CAN_ERR_PROT_LOC_CRC_DEL;
562+
cf->data[3] = CAN_ERR_PROT_LOC_CRC_SEQ;
564563
priv->can.can_stats.bus_error++;
565564
stats->rx_errors++;
566565
break;

drivers/net/can/rcar_can.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -241,17 +241,16 @@ static void rcar_can_error(struct net_device *ndev)
241241
u8 ecsr;
242242

243243
netdev_dbg(priv->ndev, "Bus error interrupt:\n");
244-
if (skb) {
244+
if (skb)
245245
cf->can_id |= CAN_ERR_BUSERROR | CAN_ERR_PROT;
246-
cf->data[2] = CAN_ERR_PROT_UNSPEC;
247-
}
246+
248247
ecsr = readb(&priv->regs->ecsr);
249248
if (ecsr & RCAR_CAN_ECSR_ADEF) {
250249
netdev_dbg(priv->ndev, "ACK Delimiter Error\n");
251250
tx_errors++;
252251
writeb(~RCAR_CAN_ECSR_ADEF, &priv->regs->ecsr);
253252
if (skb)
254-
cf->data[3] |= CAN_ERR_PROT_LOC_ACK_DEL;
253+
cf->data[3] = CAN_ERR_PROT_LOC_ACK_DEL;
255254
}
256255
if (ecsr & RCAR_CAN_ECSR_BE0F) {
257256
netdev_dbg(priv->ndev, "Bit Error (dominant)\n");
@@ -272,15 +271,15 @@ static void rcar_can_error(struct net_device *ndev)
272271
rx_errors++;
273272
writeb(~RCAR_CAN_ECSR_CEF, &priv->regs->ecsr);
274273
if (skb)
275-
cf->data[3] |= CAN_ERR_PROT_LOC_CRC_SEQ;
274+
cf->data[3] = CAN_ERR_PROT_LOC_CRC_SEQ;
276275
}
277276
if (ecsr & RCAR_CAN_ECSR_AEF) {
278277
netdev_dbg(priv->ndev, "ACK Error\n");
279278
tx_errors++;
280279
writeb(~RCAR_CAN_ECSR_AEF, &priv->regs->ecsr);
281280
if (skb) {
282281
cf->can_id |= CAN_ERR_ACK;
283-
cf->data[3] |= CAN_ERR_PROT_LOC_ACK;
282+
cf->data[3] = CAN_ERR_PROT_LOC_ACK;
284283
}
285284
}
286285
if (ecsr & RCAR_CAN_ECSR_FEF) {

0 commit comments

Comments
 (0)