Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3727141imm; Mon, 18 Jun 2018 03:04:18 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIiFArfVfqpOzTbVCyluf2kMNU9DCcUq8JDJ+AmCvmtjDGgYBkxTQt+fQ/GCy7an7yRloCq X-Received: by 2002:a17:902:3381:: with SMTP id b1-v6mr13623676plc.248.1529316258858; Mon, 18 Jun 2018 03:04:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529316258; cv=none; d=google.com; s=arc-20160816; b=jWwkxKkRZ1GRMxF2ZiPl69bLTkJV/b5IaO4lM8RfiscIy6gpjCHWdWk5b9AfM1pXkF Z7mCTDEmOOg/1A/t2m1nk+w7v70ojUEwyTC3eumWPoUj7bTEni8JDvE5knIGt0cdg8WZ 4ow3rX6N1GxkHLgd0HnNcaLWr26iKCKbd10mhpnhffM+eh4VvtcaAunySztIdCZHDrTO 2UxuxNof4fK6uaSet/SL2vvanzjdVvB1QKnaeQaN9e7BfFVooc6ycASeEOhj5Jahy5Os EtXPC36dBhlkEOSbMS4uEH9f/ddjOXlcXNZ9j0Pz1wC6yUJcRgW5IFpIn5sT8XzJCauL SKTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=N/vYgseL8iAiFKlOB5LmopylVZ9Ro2sy1Kdf1kjJaoA=; b=oWaYFgMDX/dQyyr4ANtMSxOPews4fJd3uMptkHKbue1KUYojpbpoOtu6AxBrZ1jXjL RQ35vZ10BPgKbyFMkLCh1ZsGXFYdlsHfd1jG8NXfvpHXNrJdjckDypSJUFg6ZLfkpX7g IgW+l0jCP9MARUP/zUlWD4/ooCAbVF+nK8X6muN52B/97c+1UiGloztiExMHA5U4MAC7 7kGhglYJnYv8TDqN8cVTLrXhS7FufKgy5Qur//RfJtyKRgzFk+me6qfSLfkU9Irukr/o K3K6tJt7V1D1iWbiqC4lpFg4YJ53lh274yIA51zgWIMUgIMRS5WgLK5I7irmE0vi+qDp FegQ== 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 q19-v6si11922545pgq.71.2018.06.18.03.04.04; Mon, 18 Jun 2018 03:04:18 -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 S935122AbeFRIS3 (ORCPT + 99 others); Mon, 18 Jun 2018 04:18:29 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:54570 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935074AbeFRISX (ORCPT ); Mon, 18 Jun 2018 04:18:23 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 3D889C7A; Mon, 18 Jun 2018 08:18:22 +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.16 075/279] s390/qeth: use Read device to query hypervisor for MAC Date: Mon, 18 Jun 2018 10:11:00 +0200 Message-Id: <20180618080611.924891226@linuxfoundation.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180618080608.851973560@linuxfoundation.org> References: <20180618080608.851973560@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Julian Wiedmann [ Upstream commit b7493e91c11a757cf0f8ab26989642ee4bb2c642 ] For z/VM NICs, qeth needs to consider which of the three CCW devices in an MPC group it uses for requesting a managed MAC address. On the Base device, the hypervisor returns a default MAC which is pre-assigned when creating the NIC (this MAC is also returned by the READ MAC primitive). Querying any other device results in the allocation of an additional MAC address. For consistency with READ MAC and to avoid using up more addresses than necessary, it is preferable to use the NIC's default MAC. So switch the the diag26c over to using a NIC's Read device, which should always be identical to the Base device. Fixes: ec61bd2fd2a2 ("s390/qeth: use diag26c to get MAC address on L2") 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_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c @@ -4839,7 +4839,7 @@ int qeth_vm_request_mac(struct qeth_card goto out; } - ccw_device_get_id(CARD_DDEV(card), &id); + ccw_device_get_id(CARD_RDEV(card), &id); request->resp_buf_len = sizeof(*response); request->resp_version = DIAG26C_VERSION2; request->op_code = DIAG26C_GET_MAC;