From patchwork Tue Oct 27 13:56:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 312354 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48229C5517A for ; Tue, 27 Oct 2020 16:01:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D8BD721D7B for ; Tue, 27 Oct 2020 16:01:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603814508; bh=EcPm0K48YwWPNZd05QhFqBD0RwGMI/j+/UiEi5xQd6A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=cLXJ6u679FuNUXv6RMERep8C1OFnysjI0xnMHPWk45xqVJdxC8A0QvUMuo6xNy4Vs KjkPTgf3gkL6Ee4SiVIhxnF2rx2sOYWnVqy46HmqzoSeZgh/8b83xVumeR/lvQEbP9 /d9dxjpIX7llFGe431LqmQM5Nw6Q3ugDWGfOKIKs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S368995AbgJ0P73 (ORCPT ); Tue, 27 Oct 2020 11:59:29 -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 Precedence: bulk List-ID: X-Mailing-List: stable@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" :