Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1032691ybe; Wed, 4 Sep 2019 11:27:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqylE2sRSyubjmhItjwTIdOmbUpRuYWu2uA0PemIB8+loJdlpyClhX9Hy4dOiPlqlM0zetS6 X-Received: by 2002:a17:902:d886:: with SMTP id b6mr17054987plz.149.1567621636369; Wed, 04 Sep 2019 11:27:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567621636; cv=none; d=google.com; s=arc-20160816; b=VUP8iJYC3fDhQ9LQjeJXINRoEzhpa70jiKlgVmjIEeSGQk426GiTHECva0XarvuJic WeBhzUUflwT/LuER0S+Dyf4FL5n/WUlgG8/xvigqh53Tp+x6XzeueNIX2zckk+kieiwl 48csf6nOKsuvylo6i4WUHIfvYLLThRj+G1+1Xaq2bf36W/Zv7I7RBEKcZKp8BMnm2TS3 Oovxcx1eVA3lIAVdFvJmAqBpetLIX1XNTMEIz/nd4ganLr+rgks8OUmuYc2f8fjGt2Nf 0p7J2uzu3DwSEanxECrVQi7zxl0nqQOufwAivFPjg9ZOh4xIeXTpd9oB5JRCKjjyHfF8 EEqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gz0Vvgv+0RElQNCC48NYR8k6vF2vDSog+anlOaTp4ZE=; b=riQJJBJeHREN6F2smh7CY5ln6UvhCtWX5TFOfcxs0+2t0zR0YcLGJQFyTl5dpqOtvi Ap5+Lg9smgS+VMp5Y0j7b3L6rxhLYc7aFQ5aYDkC+CYngNj2h2ppd3bAKHSMlIKYbEVv upQSRGHgutkV3F0AWZx9pkVDk1VysFXcNs/HY+r5QOuP7r9cQZNJI+USxU9eUV0XoGTp U+BRCDrv8JgCJwZOEFTMofjcsN7xrXkRP+th6Vr3XoPLVb75nhBOvihDC+KUNPse/RxE ytPWHsvNGzKZO6IRgrPNRtiAd8FzK17lc+GK8M8G+lwficoZ0ZwUcJghGlTMKEh/0GFk ecBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tEF2io6b; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p19si3260457plr.127.2019.09.04.11.27.00; Wed, 04 Sep 2019 11:27:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tEF2io6b; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733308AbfIDSZj (ORCPT + 99 others); Wed, 4 Sep 2019 14:25:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:38808 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388277AbfIDR7t (ORCPT ); Wed, 4 Sep 2019 13:59:49 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4B2A923404; Wed, 4 Sep 2019 17:59:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567619988; bh=+g2+1TXZMeEDdeX8VPRARnKKneMpEfXU54c/7gjeNnQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tEF2io6by4kidvx1Sn5UNE56TiHwi6hS/CbFlvhrQqouZ6t0+lE0myz4D7OdCql6j FcZ2/Sx7YIMCyO/hQ1P9kH6CerhFRN1Fqy3SRL9wyTAye5PCmwUCuI/sW0RHshY2U2 2LhYO772CKOddrDwodfD3BW3JUpYwtbmQVW3ju/8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rasmus Villemoes , Willem de Bruijn , Marc Kleine-Budde , Sasha Levin Subject: [PATCH 4.9 06/83] can: dev: call netif_carrier_off() in register_candev() Date: Wed, 4 Sep 2019 19:52:58 +0200 Message-Id: <20190904175304.248865446@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190904175303.488266791@linuxfoundation.org> References: <20190904175303.488266791@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit c63845609c4700488e5eacd6ab4d06d5d420e5ef ] CONFIG_CAN_LEDS is deprecated. When trying to use the generic netdev trigger as suggested, there's a small inconsistency with the link property: The LED is on initially, stays on when the device is brought up, and then turns off (as expected) when the device is brought down. Make sure the LED always reflects the state of the CAN device. Signed-off-by: Rasmus Villemoes Acked-by: Willem de Bruijn Signed-off-by: Marc Kleine-Budde Signed-off-by: Sasha Levin --- drivers/net/can/dev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c index 214a48703a4e4..ffc5467a1ec2b 100644 --- a/drivers/net/can/dev.c +++ b/drivers/net/can/dev.c @@ -1095,6 +1095,8 @@ static struct rtnl_link_ops can_link_ops __read_mostly = { int register_candev(struct net_device *dev) { dev->rtnl_link_ops = &can_link_ops; + netif_carrier_off(dev); + return register_netdev(dev); } EXPORT_SYMBOL_GPL(register_candev); -- 2.20.1