From patchwork Tue Aug 9 06:11:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathias Kresin X-Patchwork-Id: 657101 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3s7kWv51Xkz9t1K for ; Tue, 9 Aug 2016 16:14:35 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kresin-me.20150623.gappssmtp.com header.i=@kresin-me.20150623.gappssmtp.com header.b=VG+g4lFW; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bX0Gt-0002kj-RQ; Tue, 09 Aug 2016 06:12:15 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bX0Gr-0002ed-2k for lede-dev@lists.infradead.org; Tue, 09 Aug 2016 06:12:14 +0000 Received: by mail-wm0-x244.google.com with SMTP id i138so1051606wmf.3 for ; Mon, 08 Aug 2016 23:11:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kresin-me.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=Dy4uz4DdXz1q7ml3EEI/9VHtGhxjPKAHC9LzaZ6kHnc=; b=VG+g4lFWXEXMyorZuwprKSo9jWye2oTSFFMVKFDwGhdcZ4hHBSVZEvRc2xMIyy6tlU Yg3SENppwlWW6pjxABgiaYZOdbFAfobwS05n3chgRKV9tsomIzRtfFegPksFbSaQTxeh GMOsVlqCCA+7YJrhHnvWjg5IlHAAE6/JLFxT8J6vRfZrw19FK4/xZ9h0ofLNdSq8tAF6 7myM4t1C9OqjT4XxyHZYq809/P/DUZFA3oOmjPjVFSz/BRmhTPpKPNDkUG5dz1XMM59H toaYW+tfdp8Gyhbd2ehho9+6eMLK5T6hL1MjMFFd39asxC4leZit7+CkRlw7AQR/LrlP z56w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=Dy4uz4DdXz1q7ml3EEI/9VHtGhxjPKAHC9LzaZ6kHnc=; b=Eq0M5kScRaV0qCQmBAETLuz5XCETodt1zZzrQ/MDnNBxYJQPKaujQbfkTDKSpuyi5A KlDtnnGv+jlxJDMDrkHi1dMHu3bwE6Oe3dRi1LYUSo+HSiw6t3nn3ebqHsQxvoH9+pFf jX2eAKE1e0oK2dFrRzodF+kDjQkoZWReFPrmLHBIvqREKNIDS154t0TD14FU9IKM7pif VLuH8Xf0nfYQgcDniqhVYYHrvrqo7KvEFlFPLzwsJe7iDTC+Ajlr3OtLu2nXysqk/aBJ MWfum3ch0Moonug/YzHQvSJDYDiBezSTxA5j7SRTGK6XZeboqvlXSVyHwYlGgWo+I5K0 FrUg== X-Gm-Message-State: AEkooutzLLemc7UrfZICwPONr0EcT36/L9LjprDHkxR2CR/IwjCAWA8Fh2rfxy6gLer+4w== X-Received: by 10.28.58.7 with SMTP id h7mr18793651wma.35.1470723111036; Mon, 08 Aug 2016 23:11:51 -0700 (PDT) Received: from desktop.wvd.kresin.me (p200300454B38C600A16082C2F2FDC271.dip0.t-ipconnect.de. [2003:45:4b38:c600:a160:82c2:f2fd:c271]) by smtp.gmail.com with ESMTPSA id ya1sm25866536wjb.23.2016.08.08.23.11.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Aug 2016 23:11:50 -0700 (PDT) From: Mathias Kresin To: lede-dev@lists.infradead.org Date: Tue, 9 Aug 2016 08:11:45 +0200 Message-Id: <1470723105-13566-1-git-send-email-dev@kresin.me> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160808_231213_423143_6C4849A4 X-CRM114-Status: UNSURE ( 8.02 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:244 listed in] [list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid Subject: [LEDE-DEV] [PATCH v2] kernel: adm6996: set carrier status X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Due to the missing carrier status set, the interface wasn't usable on a BTHOMEHUB2B after ip link down and up as it is done in preinit. Signed-off-by: Mathias Kresin --- Changes in v2: - removed unreachable code target/linux/generic/files/drivers/net/phy/adm6996.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target/linux/generic/files/drivers/net/phy/adm6996.c b/target/linux/generic/files/drivers/net/phy/adm6996.c index a2ff2b0..2fe2ee7 100644 --- a/target/linux/generic/files/drivers/net/phy/adm6996.c +++ b/target/linux/generic/files/drivers/net/phy/adm6996.c @@ -1052,6 +1052,11 @@ static int adm6996_read_status(struct phy_device *phydev) phydev->speed = SPEED_100; phydev->duplex = DUPLEX_FULL; phydev->link = 1; + + phydev->state = PHY_RUNNING; + netif_carrier_on(phydev->attached_dev); + phydev->adjust_link(phydev->attached_dev); + return 0; }