Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2504768imm; Mon, 24 Sep 2018 05:35:46 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY+Z3ELQxrlh1buiXqPNwR1MnAXTelmq3ldzY/cLvQZAt+1t3QnUigRSLgLkSgR1S201r2K X-Received: by 2002:a62:1456:: with SMTP id 83-v6mr10170792pfu.50.1537792546886; Mon, 24 Sep 2018 05:35:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537792546; cv=none; d=google.com; s=arc-20160816; b=J0zcCVGmjOX9eWTNnSlIQvfNdawQpWKUilYZPurjhA3zGhjbtkprZfaXM6aDMqNKki oxHwkgx8IHgHk4TcgeaXheYSxJnjM7vNHC7dMiN7CLtSxVvrgRxGlCQ+FAdQkiqnoPIE 2ZhXjc4+EMW+0ztOxSeXPEBZW96GAPpgY1IBGjgF+OAJ1WBgFu/ojsWj7YiuGobBNrYQ mQeYck3ReYQB0Dllridgfbk5ohQEcrrRPXesCfRN4mo7wGNh4+QcOQkhwqeDmTGrz16Z SRIR04R5eBsvur7PAVIkNSKQphpl6GXyS5Dn1YFsywVJRspn/2cN9wV+Ce6Og8GsObQa m5NA== 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; bh=FH/WR7uYbAlC4BTj1lbW5CYkntObIKgob+Pp+oGFO58=; b=zrCdl+oNz82sGtaCSkhHYNJeL7j0HQJ5Y2NoNGX334fPYsOxoVhVjytVjUmiKANDiZ y0/GLfqp2t85OZKsVrO9WM3b9kR5/GkqKqwNL8VK0FLvJDP80wtlGkknQVpNNbUoJef5 8sdywDX61JsfcCIDlo7aM0AGY0InaGaVqG23U0fMOfv4wrNbyjqkUBwa6h18caLnRV/1 65qO6uGPEvK0GpRVf+vzZ911tHoNYb1Sp6R65vMM6LchwaYUurIZ+BTnCROK9vdXkb0l +OLWSg4evvXWlntLGQBRQ6+VrKV/C70vCq/CMnK0NVQVLIWO2cRCbbT0DZHiQ4x9ptwv X85g== ARC-Authentication-Results: i=1; mx.google.com; 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 k3-v6si489917pgb.72.2018.09.24.05.35.31; Mon, 24 Sep 2018 05:35:46 -0700 (PDT) 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; 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 S2388317AbeIXSgW (ORCPT + 99 others); Mon, 24 Sep 2018 14:36:22 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58426 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729816AbeIXSgW (ORCPT ); Mon, 24 Sep 2018 14:36:22 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id CE6471018; Mon, 24 Sep 2018 12:34:25 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Julian Wiedmann , "David S. Miller" , Sasha Levin Subject: [PATCH 4.18 083/235] s390/qeth: reset layer2 attribute on layer switch Date: Mon, 24 Sep 2018 13:51:09 +0200 Message-Id: <20180924113113.328667386@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180924113103.999624566@linuxfoundation.org> References: <20180924113103.999624566@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Julian Wiedmann [ Upstream commit 70551dc46ffa3555a0b5f3545b0cd87ab67fd002 ] After the subdriver's remove() routine has completed, the card's layer mode is undetermined again. Reflect this in the layer2 field. If qeth_dev_layer2_store() hits an error after remove() was called, the card _always_ requires a setup(), even if the previous layer mode is requested again. But qeth_dev_layer2_store() bails out early if the requested layer mode still matches the current one. So unless we reset the layer2 field, re-probing the card back to its previous mode is currently not possible. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/s390/net/qeth_core_sys.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/s390/net/qeth_core_sys.c +++ b/drivers/s390/net/qeth_core_sys.c @@ -426,6 +426,7 @@ static ssize_t qeth_dev_layer2_store(str if (card->discipline) { card->discipline->remove(card->gdev); qeth_core_free_discipline(card); + card->options.layer2 = -1; } rc = qeth_core_load_discipline(card, newdis);