Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1121539pxx; Tue, 27 Oct 2020 08:44:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwS+UN5TTR/un6P7xYR4IbUe/Cvnx8WLoSXYjxC8CYBUBvMwHnn1hwGk6R/mr/H7JM/eXe/ X-Received: by 2002:aa7:cc84:: with SMTP id p4mr2820526edt.97.1603813476508; Tue, 27 Oct 2020 08:44:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603813476; cv=none; d=google.com; s=arc-20160816; b=qi7xgEHhgiTa5A7dArJcZ7ZyaQKizDJaJaSb/L+vH9kPqYVzmFUQnfC2UP8pfwmW0p nNklECOwP/2gPQLlklELkFTi6IThBLdPxx/Kiq+Fz4NJTtPzl6Td3DDDJR+oSxA+t31Z THtNIJZGDnecsZxzpuVdnBw2h++L9mnMueXEMGFUx6fTCYs9DWjaEzAXMKnouBUVQsos O7v9citPqCRf4/lRVScIsRL9GIarqQthFoDzq51gunzzVbWpDeyFZa1X13b92u6dLtIn EdC1mEVloeXTmQp6dO/2nU1GgswbIJXROZc3pB8uzLkwwPF16Qju+fuyaYJzwPFtnnU3 Iv0Q== 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=cE0wVC9KEZkoKL9YLLA6NewBtD5TjAsg0vUFxYiHUVc=; b=tBkLRt7olMEJA7/SBOshc3ZpiJ6d02tSH8L4+aMJG/88ydz5JurXJTzdPJbfWYuYm7 3wIchSrLRzEa/UZIYXIpS4NG/BSt8Rj4zhGh3Ya4IpcOV0CxmvKrsuFz6873aF7EYxeK eHmbQPankMaG9XD4+luH4FMQF2VRrRlbL2veDSbYRJwYDjIUn0ZIi82mS7oqr/6xVtOQ oXzMgaS/hfEjEsLj8RaSHX53CoiZWa7TMFQ6jzr3WF/FuOU1p68TVPhz1wvXzr3QNzEX ocjwRSTu3mIWpc1rdcoJ4G2vj+ieutWmPpZIBW/pnr5hpY8tjMsFNPopfs5eUTYqnA7w terQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DNh2Sdk+; 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=fail (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 l11si1462465ejx.254.2020.10.27.08.44.13; Tue, 27 Oct 2020 08:44:36 -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=@kernel.org header.s=default header.b=DNh2Sdk+; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764635AbgJ0OrI (ORCPT + 99 others); Tue, 27 Oct 2020 10:47:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:46940 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1764563AbgJ0OrC (ORCPT ); Tue, 27 Oct 2020 10:47:02 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 800A821D7B; Tue, 27 Oct 2020 14:47:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810021; bh=LodZH6S89e6fpjfSBoa6p1lBwSLujVjxQyJm6kpfBCI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DNh2Sdk+K/V92kXDRsIhIXiz9LMyINQaFU9r1n807eykSBngnki6MIUy1AoQhZwyZ Vb5qqFJnI2r6FEEIyY8hBtPtyLP3O65dJvtdwNOTwdeVqhkLCVlL4SJa2jQSwqqmuL eCaRTkxZ/lUfLhHW/C3skohuJJOFtFkGIVopmRMg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexandra Winter , Julian Wiedmann , "David S. Miller" , Sasha Levin Subject: [PATCH 5.4 401/408] s390/qeth: dont let HW override the configured port role Date: Tue, 27 Oct 2020 14:55:39 +0100 Message-Id: <20201027135513.601532068@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135455.027547757@linuxfoundation.org> References: <20201027135455.027547757@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: Julian Wiedmann [ Upstream commit a04f0ecacdb0639d416614619225a39de3927e22 ] The only time that our Bridgeport role should change is when we change the configuration ourselves. In which case we also adjust our internal state tracking, no need to do it again when we receive the corresponding event. Removing the locked section helps a subsequent patch that needs to flush the workqueue while under sbp_lock. It would be nice to raise a warning here in case HW does weird things after all, but this could end up generating false-positives when we change the configuration ourselves. Suggested-by: Alexandra Winter Signed-off-by: Julian Wiedmann Reviewed-by: Alexandra Winter Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/s390/net/qeth_l2_main.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index 4ce28aa490cdb..8c4613617ef11 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c @@ -1168,12 +1168,6 @@ static void qeth_bridge_state_change_worker(struct work_struct *work) NULL }; - /* Role should not change by itself, but if it did, */ - /* information from the hardware is authoritative. */ - mutex_lock(&data->card->sbp_lock); - data->card->options.sbp.role = entry->role; - mutex_unlock(&data->card->sbp_lock); - snprintf(env_locrem, sizeof(env_locrem), "BRIDGEPORT=statechange"); snprintf(env_role, sizeof(env_role), "ROLE=%s", (entry->role == QETH_SBP_ROLE_NONE) ? "none" : -- 2.25.1