Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp411868pxx; Wed, 28 Oct 2020 07:47:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznm/G+1eYxV/xXxi2kY/IMoago0jnAvLVJ1/7laDjPMreuli6jSB/y8JDleFYcSTTOOM7O X-Received: by 2002:a50:ee95:: with SMTP id f21mr8076466edr.270.1603896426434; Wed, 28 Oct 2020 07:47:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603896426; cv=none; d=google.com; s=arc-20160816; b=stAFemb9aKsOUikY/VOrk1XHjbbUO/vfPw9n3ljfc/XeBPuFSi0aFJV7mZKhH+e6AY AzgSL5QUrgb8Ol3YjCQAf9LGsKHStxaXuu3w3ZXYAs5hqsX/YS06y3LuMubg/mPCyAy4 W0adtaYdu9MulkpCf1W/A/clK+KlWaomjtxQ31TNmBEnnpNDBxC20A3+hd0lRcYPHQuM 3lDI0MO2fGSffftcAVihApzhAgQIWYepu1nvfw6W3iYaO8UHKG+U7/VTsYkHSR9myJD3 I7+EmHVAPy36bKLbdptPWTm6GeK2wxxUGpcQXsSyIKHwiFpwzxJU5Hj2Pq4iaHpjtQVG Ws8w== 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=1SHqDM7jyS26ickX8FotzKze5zPNFpUtb3XkGSUeXXI=; b=ie2fdWY61zgjE070NVvcQWoSMnP7m8A6TRLKpmOQuY6SjuTQF1+yV7nn5MhhWOY00e gWQs6Ylcqu/PbpsRZxCTeblUBHfCXoQE/o2pAxDf0+VAtHm87+2mJARZEkDq1611BWFI ishQiDHljVb09+mitAXBm1+Klla6FWuJScaqFeF2pFavifEb9DtixX8Y6ER9kug232g1 MI9GZnY0S545iyHibl8cjSNvraXs1cYu8Ebze+/FIzZnS+d2Ls5yjuZGdgQPELT2VKxM UrrCpS89TjOShhB7nyMEiFJM2LVPC9HY4O7gR/4N4BvaIYpbUX72hnmSoBy5mUYMu/oE r7fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JKNGSzeD; 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 x26si2664388eds.99.2020.10.28.07.46.44; Wed, 28 Oct 2020 07:47:06 -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=JKNGSzeD; 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 S1807367AbgJ0QJu (ORCPT + 99 others); Tue, 27 Oct 2020 12:09:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:56250 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1804283AbgJ0PyU (ORCPT ); Tue, 27 Oct 2020 11:54:20 -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 DA10D20657; Tue, 27 Oct 2020 15:54:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603814059; bh=EcPm0K48YwWPNZd05QhFqBD0RwGMI/j+/UiEi5xQd6A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JKNGSzeDt4yaKoINf8nI62HyF++fnx/vO2sKnasa41HIg2Y8AP0gsjlmfwQ/05qqB j+5IAakB8wkFApGHARkKXIAPvy/MJRhtryqa6/+0f0zKa5JQnaCwY6WndNKDdd+UG6 utDRez6+RY1H6SQIDfiP2Z80IlxZ1Z+GPXdm3Cso= 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.9 749/757] s390/qeth: dont let HW override the configured port role Date: Tue, 27 Oct 2020 14:56:39 +0100 Message-Id: <20201027135525.646357105@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135450.497324313@linuxfoundation.org> References: <20201027135450.497324313@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 9866d01b40fe7..4af7b5d57b4e4 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c @@ -1120,12 +1120,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