Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp303022pxx; Wed, 28 Oct 2020 05:26:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFbXHwGF2iP4lr/jxUwNx5vP2bYjwzmY9uTJuir6+ANslHEMJW/p0ID53LhjTOh5iCggnA X-Received: by 2002:a17:906:81c5:: with SMTP id e5mr7077181ejx.10.1603887975262; Wed, 28 Oct 2020 05:26:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603887975; cv=none; d=google.com; s=arc-20160816; b=1GQYcdG1lEN9gQJ813/sXVXtSzXcSV0x5v5pR2yDrpEWo8bs+4oqJ5m6uCpVJpRDL1 VVGoIdmYPJRlaEnnPkjvYsk7VzQ3wnz9W0TL9ydE2aiGEaRvabnX4pdChLY5+05iylYd 2qveanJUL62eUwJCefEif/xREIPCd+7Htmfobe6DnXJeZIuaFN+WXMcwqWuKt/axHJ92 ftJ4La+4/7pSPv8PngstUsjT+i4a2jpxrqqestMiqJ7gHvyRHBZyANce5TQ7fwyi49z/ CuEXYDHVMF7bIe5Yr2ngcsCXPVqOmt9rIqdV87EnQApkOzPKMCvbmqd+j3RKj5v/650R PUIg== 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=PE2sgczoivvgEg+kDlGcFHE+0GIk/wEzYjIAtxK7DpU=; b=nvDXndGfKVMZHbU/k1PhpC70dYSUv19xM1j1ss+L25gX8SXotwwMrEegPWUtMbu1v9 detNin5ao3baO8TX1T6tVnvMCvTOXvNoiIxQUGPxeXjJv3SqrOC3KHKGsQQ+MZlXTjPw Z0sdmbVFyLa3RXJ9FKGcCIIyc0LRf8fapFjrpqkf80mZWKq3QY4qMart9DCqMVUWHN3M RR1Rhtra3iEivNjSY19QF5tAHpex5I9VmmYHllmMKAz5Dg1YvnUbIRrAoWTkipKiwyCv d9/sNEkwh2SyDRS9EUbFx0yxNNoKi+XIPQPdmhAOPh9snvHfJMR761sYLmaz+5h99aCS WTlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KPeWtDkR; 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 w11si2719069ejq.533.2020.10.28.05.25.52; Wed, 28 Oct 2020 05:26:15 -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=KPeWtDkR; 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 S1796874AbgJ0PUW (ORCPT + 99 others); Tue, 27 Oct 2020 11:20:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:54154 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1794562AbgJ0PQ4 (ORCPT ); Tue, 27 Oct 2020 11:16:56 -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 051702225E; Tue, 27 Oct 2020 15:16:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603811810; bh=BNahae+snybo0MTcziVhWo5V0m6cEXTlIr9s7jvyUqQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KPeWtDkRVSr5ZS95Trn1nePzIZ0l2OtzWo/BiXIwQRKgN9BHM0fcB9SR00D6a+gNd n4+/iwRbE1NwT7u46ibcd8hIRdqnHeWIUhrAo3r6r+1+YtbW+ejk/CIYtyj/MW3Yin GtZiFRANRmuCV/CJWAh9Wi0eKn4RrR0cmQPOTp/w= 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.8 625/633] s390/qeth: dont let HW override the configured port role Date: Tue, 27 Oct 2020 14:56:08 +0100 Message-Id: <20201027135552.131990743@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@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 0384b45a72658..7c6f6a09b99e4 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c @@ -1122,12 +1122,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