Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3697295ybv; Mon, 10 Feb 2020 04:54:55 -0800 (PST) X-Google-Smtp-Source: APXvYqzzvkVvIs1e+X6FkYem98lSWcQvMKxscEWgEgrgUznej+0lDGL/qcxhMhqeduoheJtaPqov X-Received: by 2002:a9d:7b4e:: with SMTP id f14mr941954oto.355.1581339294972; Mon, 10 Feb 2020 04:54:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581339294; cv=none; d=google.com; s=arc-20160816; b=y9lW+E2oUdV/aI0nfzHbWVAhBLIOsuqPHIJVdsCLBlMR2AuJMcPYuK6pScOwwQfWnF 5zN0tIbqEb0/SQB/vUCMLHPPuJuSpajGhkvbxrETF2Vt6AwVs0OO2lLIHRXJhwqqres+ 5rciGPthjoULmw4ipX6Ed5fuUB3K1pbeCeiho3uYAHfe1M+Dl/9rrPyFlp1o0C4EheXD /tEfGSCxqGc6wTo1CaQpBaYQu/+CTHzGhwVWCKBc2X2Hk8QrIGemrVdht+djZ0tbFhin 2OPnBN6lMvpuraTMshbWUY4Xp2dzEfsaDE987WelsXcDkROvUdhxZw92MFu8Hf3i4zSV CBbg== 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=UsBZYCwZb1mrrDya0B21hzS13Zy3cljTZhvTNaP07pU=; b=DhVjkg8lCPcAHxVU/YP2094aaH2cMgIWbKTTUYUFCKRjukOsctczWuRstwCeP6QT5Q WlJE0ajJ44ZcnQnwwfajClyL8KiiZ3Hr8gaA7DrRbPI/kPwqY9p0HpsyCxPekGJM8N+K +lTRd33rkrUellH8B1cIWhEHM2uAL7gkjZLyIz69NssYgMTPt5YIhkO5+kbRkFAsKEJb YJKFFS8PzkSyd9tKtt0YijoSULqvzgO291p8lSANtQWJEZvUco9DmKqvHbxlX2QzQxPX RiElZthCJxabKjGZb6BPuuiH+rFT43D/V1yIkn6PUe+nPIW9prLmgsNRpU5DZhtV0M+q fpGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Bjd12Vzg; 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 y22si130418oti.269.2020.02.10.04.54.43; Mon, 10 Feb 2020 04:54:54 -0800 (PST) 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=Bjd12Vzg; 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 S1729390AbgBJMyk (ORCPT + 99 others); Mon, 10 Feb 2020 07:54:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:45274 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729283AbgBJMl4 (ORCPT ); Mon, 10 Feb 2020 07:41:56 -0500 Received: from localhost (unknown [209.37.97.194]) (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 67D4121569; Mon, 10 Feb 2020 12:41:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581338516; bh=Uf/P5d/5TrksL8ea7MV227yLCwb075Ldl4o4O86/dTg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bjd12VzgOl5SST5oK/OCHV4+NZjN2LQcxahkMjf47AJ/JRRTfdvj2jc/3cUbaIv21 LaI3YdBuE05vRo1+2P58jYo27Q+w9V/xUpomnQ5kWlLaSXQNgxIV0VyuHJtrDsVFRn eBn/F6RyBzFUNZ/ve0mfkqoMjCRztR+40WQEcngs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Florian Fainelli , "David S. Miller" Subject: [PATCH 5.5 325/367] net: systemport: Avoid RBUF stuck in Wake-on-LAN mode Date: Mon, 10 Feb 2020 04:33:58 -0800 Message-Id: <20200210122452.954848786@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200210122423.695146547@linuxfoundation.org> References: <20200210122423.695146547@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 From: Florian Fainelli [ Upstream commit 263a425a482fc495d6d3f9a29b9103a664c38b69 ] After a number of suspend and resume cycles, it is possible for the RBUF to be stuck in Wake-on-LAN mode, despite the MPD enable bit being cleared which instructed the RBUF to exit that mode. Avoid creating that problematic condition by clearing the RX_EN and TX_EN bits in the UniMAC prior to disable the Magic Packet Detector logic which is guaranteed to make the RBUF exit Wake-on-LAN mode. Fixes: 83e82f4c706b ("net: systemport: add Wake-on-LAN support") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/broadcom/bcmsysport.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/net/ethernet/broadcom/bcmsysport.c +++ b/drivers/net/ethernet/broadcom/bcmsysport.c @@ -2728,6 +2728,9 @@ static int __maybe_unused bcm_sysport_re umac_reset(priv); + /* Disable the UniMAC RX/TX */ + umac_enable_set(priv, CMD_RX_EN | CMD_TX_EN, 0); + /* We may have been suspended and never received a WOL event that * would turn off MPD detection, take care of that now */