diff mbox series

can: gs_usb: Zero-initialize flags

Message ID 20220106002952.25883-1-brian.silverman@bluerivertech.com (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series can: gs_usb: Zero-initialize flags | expand

Checks

Context Check Description
netdev/tree_selection success Series ignored based on subject

Commit Message

Brian Silverman Jan. 6, 2022, 12:29 a.m. UTC
No information is deliberately sent here in host->device communications,
but the open-source candleLight firmware echoes it back, which can
result in the GS_CAN_FLAG_OVERFLOW flag being set and generating
spurious ERRORFRAMEs.

Signed-off-by: Brian Silverman <brian.silverman@bluerivertech.com>
---
 drivers/net/can/usb/gs_usb.c | 1 +
 1 file changed, 1 insertion(+)


base-commit: d2f38a3c6507b2520101f9a3807ed98f1bdc545a

Comments

Marc Kleine-Budde Jan. 8, 2022, 10:29 p.m. UTC | #1
On 05.01.2022 16:29:50, Brian Silverman wrote:
> No information is deliberately sent here in host->device communications,
> but the open-source candleLight firmware echoes it back, which can
> result in the GS_CAN_FLAG_OVERFLOW flag being set and generating
> spurious ERRORFRAMEs.
> 
> Signed-off-by: Brian Silverman <brian.silverman@bluerivertech.com>

Applied to linux-can/testing + opened an issue on github:
https://github.com/candle-usb/candleLight_fw/issues/87

Thanks,
Marc
diff mbox series

Patch

diff --git a/drivers/net/can/usb/gs_usb.c b/drivers/net/can/usb/gs_usb.c
index 1b400de00f51..cc4ad8d59bd7 100644
--- a/drivers/net/can/usb/gs_usb.c
+++ b/drivers/net/can/usb/gs_usb.c
@@ -507,6 +507,7 @@  static netdev_tx_t gs_can_start_xmit(struct sk_buff *skb,
 
 	hf->echo_id = idx;
 	hf->channel = dev->channel;
+	hf->flags = 0;
 
 	cf = (struct can_frame *)skb->data;