Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp629998pxb; Mon, 25 Oct 2021 15:21:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCxTMl2pSA+hStafko/CvLvrTH5oizLkStf7R5t77JwE62dXaexR0dXgVS7GrmeLYFxS94 X-Received: by 2002:a63:230c:: with SMTP id j12mr16090471pgj.1.1635200489569; Mon, 25 Oct 2021 15:21:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635200489; cv=none; d=google.com; s=arc-20160816; b=H5Z+7FXQInzoCpDeDxtSe2VfPnDWyazVzm2yUDieXaLO2rZXQvyMBdmY2CRq55hjn3 EuDn8+P6RhaJvwDOuNM1n0+AO1Nl3DNsQ6Z7pLXMbk7jvirmTDzWt7hiRK4Ie1Sy60BN TC5B8Lt1woGtGpu5pVZnTZ73ahhGC/ag1kFnGvLzRtYFRFwPkfawsPsGa/MueVV8fs0k TUytH4u3C2GNMX8jG+eod0LOim2YvJ/KAq6W8LrsLFBQcFEJBRUe+eUyJ2+/VPhYtv+r QMlQdmTWQJr2+gh2G6hwCkoqHNKLmbaU8anJ9Y+87gJImwLdfBab89yCSSjfB++ZiH2r x/7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UCVQMdZZo17fn70MGdEUYv9bGGbqJuk45PRtF7VGYuw=; b=ZzcL2glXPKgRfgUp1cFugxcqRLr49yTCHt6RtA66+h07mxMhEfmToGbVHYmt3DxjMI xlAToHDhmcMdEz6kkcNxKwFD3dBAmHILxuE6TQ6gwVnaViqDbFRR8RpuK+ITmy1nCB2q UCcl0hQXTSQFTgzhaQgbAK9jPsl8acsTdU3v/byojlJ6m+ic9KgycBOoEz0oACmBiI05 zcY+IkY93zekaDR90E4LFkOFzj1ANplcIt7Cn5V2Pp5e5pbAzNvqpfAsk3tqsycpRATe MLHuk7rQBRmlzGjHcVEq6XyyC86+YvMv/ezBo+LLicFwxtJaK9b4wSXvfAa57BbEmzif XN4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GKZJoPXn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e70si18437836pgc.35.2021.10.25.15.21.16; Mon, 25 Oct 2021 15:21:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GKZJoPXn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234439AbhJYTUD (ORCPT + 99 others); Mon, 25 Oct 2021 15:20:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:37324 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234654AbhJYTTX (ORCPT ); Mon, 25 Oct 2021 15:19:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 54D9E60F70; Mon, 25 Oct 2021 19:17:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1635189421; bh=aSmZfjkgSa7Iut3ph86BQ+Tim2lJcrhYwRH/lVerHc4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GKZJoPXn7ItQ3+oRZ1DxBTD5gQ7AU/woPXO+yMZOzM+nhdTsRrNrW9xuvL4DR9Jt3 /ZbjCLQoaboGXX34ud1/BCj0ayBNSJ9yn01CfRup3lneJYFD6QOZQJgnTLgcregBkj ukgBOGimVOl5ksk5mXuX274V194KJrh9EK2oh/a0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stephane Grosjean , Marc Kleine-Budde Subject: [PATCH 4.4 27/44] can: peak_usb: pcan_usb_fd_decode_status(): fix back to ERROR_ACTIVE state notification Date: Mon, 25 Oct 2021 21:14:08 +0200 Message-Id: <20211025190934.135343268@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211025190928.054676643@linuxfoundation.org> References: <20211025190928.054676643@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stephane Grosjean commit 3d031abc7e7249573148871180c28ecedb5e27df upstream. This corrects the lack of notification of a return to ERROR_ACTIVE state for USB - CANFD devices from PEAK-System. Fixes: 0a25e1f4f185 ("can: peak_usb: add support for PEAK new CANFD USB adapters") Link: https://lore.kernel.org/all/20210929142111.55757-1-s.grosjean@peak-system.com Cc: stable@vger.kernel.org Signed-off-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde Signed-off-by: Greg Kroah-Hartman --- drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/drivers/net/can/usb/peak_usb/pcan_usb_fd.c +++ b/drivers/net/can/usb/peak_usb/pcan_usb_fd.c @@ -559,11 +559,10 @@ static int pcan_usb_fd_decode_status(str } else if (sm->channel_p_w_b & PUCAN_BUS_WARNING) { new_state = CAN_STATE_ERROR_WARNING; } else { - /* no error bit (so, no error skb, back to active state) */ - dev->can.state = CAN_STATE_ERROR_ACTIVE; + /* back to (or still in) ERROR_ACTIVE state */ + new_state = CAN_STATE_ERROR_ACTIVE; pdev->bec.txerr = 0; pdev->bec.rxerr = 0; - return 0; } /* state hasn't changed */