From: Jakub Kicinski Date: Thu, 27 Oct 2022 22:37:56 +0000 (-0700) Subject: Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=31f1aa4f740fc591450777f4ff94d6e062b6f632;p=users%2Fjedix%2Flinux-maple.git Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c 2871edb32f46 ("can: kvaser_usb: Fix possible completions during init_completion") abb8670938b2 ("can: kvaser_usb_leaf: Ignore stale bus-off after start") 8d21f5927ae6 ("can: kvaser_usb_leaf: Fix improved state not being reported") Signed-off-by: Jakub Kicinski --- 31f1aa4f740fc591450777f4ff94d6e062b6f632 diff --cc drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c index 5225e2da6437e,19958037720f4..1c2f99ce4c6c7 --- a/drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c +++ b/drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c @@@ -1632,12 -1318,9 +1632,12 @@@ static int kvaser_usb_leaf_set_opt_mode static int kvaser_usb_leaf_start_chip(struct kvaser_usb_net_priv *priv) { + struct kvaser_usb_net_leaf_priv *leaf = priv->sub_priv; int err; + leaf->joining_bus = true; + - init_completion(&priv->start_comp); + reinit_completion(&priv->start_comp); err = kvaser_usb_leaf_send_simple_cmd(priv->dev, CMD_START_CHIP, priv->channel); @@@ -1653,13 -1336,10 +1653,13 @@@ static int kvaser_usb_leaf_stop_chip(struct kvaser_usb_net_priv *priv) { + struct kvaser_usb_net_leaf_priv *leaf = priv->sub_priv; int err; - init_completion(&priv->stop_comp); + reinit_completion(&priv->stop_comp); + cancel_delayed_work(&leaf->chip_state_req_work); + err = kvaser_usb_leaf_send_simple_cmd(priv->dev, CMD_STOP_CHIP, priv->channel); if (err)