Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp5215160ybl; Tue, 27 Aug 2019 00:56:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxW39Ng4vt9v0SQ+UEzVYJ0z7G2wqzAb75V9xg9WLi0oIUXJBTDAvtjAj4s3Dt1Bd3o/eRE X-Received: by 2002:aa7:9799:: with SMTP id o25mr24737560pfp.74.1566892567329; Tue, 27 Aug 2019 00:56:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566892567; cv=none; d=google.com; s=arc-20160816; b=brNGj/Erb8toIIBiVKaay9kMlhEw7FhDVs9FmeL/aQINQcY3FDvs0PsTNMsu+U4kQD a6ar9QmXT/taJdM+qvx6/qAjFWJxATWJNEIypeQt7MgfufrWo3S6SX/U1BPIkQ5JaD51 5DL8Win8oQD6Ve+KXG8fL/ErRCm3eVpXbYuR0X9H/CD4gQ84+kSsyZtZ8/RiP1lBSbr/ wqVIH4ARiHv+agze8VuaT4UTDd7JvpfUvQfUOcb1iLkl280EMVb9R89de0VKJWo8QsHi 3QsF2rrHQR0quJzLMQWv9H9VJl2RHX+rlQBXTIPRfm5UrdBD1PBh43nGZMMUg3nc29KI 3wxQ== 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=CpoqfAkdXTHux87tLE0foxh6XJNa5O39UPL6pwz10hk=; b=deVy5vyzw+4MONA9cuSHT37eMlmQCjF0YQOAp+f5xPHZOwGTvX9i9nXDH9I7Ff63D8 8uTNvzQfDA21KeHSQXAYWGZWt1rji4wOY2QHy3nuEBeOI0Vxc5wNd/gVUQQdxNXdbo4p +a1NLg9ul/Khc/63+27OM43qqmuIDrePmAPpxtIRWuyeEdQ8WhiURjbFVDmpo7OftWD3 ryVoezum5BKACGTnJwbobAdmIckt16tjgH94sm8Y6vxevKlRGLu4lUMnFHlJHIbxX0IJ 2o50Se472uASIbPcpzNfzenRDzn5CuBqgcbfRJt23jqC5XMQuHZRv6ZeCJDf4x7f35Jm fEGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=U7EIaAY2; 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 91si11982908ply.113.2019.08.27.00.55.52; Tue, 27 Aug 2019 00:56:07 -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=U7EIaAY2; 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 S1730004AbfH0HyR (ORCPT + 99 others); Tue, 27 Aug 2019 03:54:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:45774 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729374AbfH0HyK (ORCPT ); Tue, 27 Aug 2019 03:54:10 -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 61678217F5; Tue, 27 Aug 2019 07:54:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566892449; bh=tBPZC6mCiWD6n1scrwgRNNIljCMIUEPvwRa4pmU0U9A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U7EIaAY2cIgTzV4/02m6rR7wFzd1Yib8Fcn63rMqnTDvczWk39PwdxJIy9H9zrAdt 7Qeoqq6efq7A/2rPDeZfJfbK2yCeyrAWyvThIK0pgQnY1wWz6MQVCciENPR6ddkXIZ K/M3577k08nVEFG5mf+YnnPSqItsKpYsovgbvHU0= 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.14 07/62] can: dev: call netif_carrier_off() in register_candev() Date: Tue, 27 Aug 2019 09:50:12 +0200 Message-Id: <20190827072700.663445408@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190827072659.803647352@linuxfoundation.org> References: <20190827072659.803647352@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 7d61d8801220e..d92113db4fb97 100644 --- a/drivers/net/can/dev.c +++ b/drivers/net/can/dev.c @@ -1217,6 +1217,8 @@ int register_candev(struct net_device *dev) return -EINVAL; dev->rtnl_link_ops = &can_link_ops; + netif_carrier_off(dev); + return register_netdev(dev); } EXPORT_SYMBOL_GPL(register_candev); -- 2.20.1