From nobody Mon May 6 04:29:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=163.com ARC-Seal: i=1; a=rsa-sha256; t=1565862565; cv=none; d=zoho.com; s=zohoarc; b=DEobuUnMNv/zTjYggC7kzQGiUOFvlzcBA2IylMGi/F9KB1eRVcOZFmJoxcwxSGKJSM8Di2SaOg6hrjzjfGT0ZDBEkuH+0rKJmUjXnnyirVFrLovTta6csroIgZduqaKxOVd23rd9MJ/u1PDXZB0aol2zBfKqBaOK/cT4EucKIW0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565862565; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=vFesfLuOHL/H8jDGqsni43nC+6Qnkzv8J1NZGqUXEyc=; b=FceP7hKKQFSIKGJ1rgsMl+CQhYQ5QP0QiosWgm7QFPJkrdELnV2PzTJnQtMw/zQWQZQ5xfW4keQCVu4/4get/yzhXOZx0R7rW2E5W4nA9/5r2LzbpDs170ccV88AczFdY7KZtfQ6jtdIyUxozGEB2zI+NNmpKoJhES9AE7V3xcU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1565862565689911.5557625935974; Thu, 15 Aug 2019 02:49:25 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BDEC63082E42; Thu, 15 Aug 2019 09:44:19 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 23E037D3F3; Thu, 15 Aug 2019 09:44:18 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 54C2B2551C; Thu, 15 Aug 2019 09:44:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7F9iDbo027771 for ; Thu, 15 Aug 2019 05:44:13 -0400 Received: by smtp.corp.redhat.com (Postfix) id DE42182A03; Thu, 15 Aug 2019 09:44:13 +0000 (UTC) Received: from mx1.redhat.com (ext-mx13.extmail.prod.ext.phx2.redhat.com [10.5.110.42]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D893883C0D for ; Thu, 15 Aug 2019 09:44:11 +0000 (UTC) Received: from mail-m971.mail.163.com (mail-m971.mail.163.com [123.126.97.1]) by mx1.redhat.com (Postfix) with ESMTP id AE6143082135 for ; Thu, 15 Aug 2019 09:44:09 +0000 (UTC) Received: from localhost (unknown [61.135.169.81]) by smtp1 (Coremail) with SMTP id GdxpCgAXqIFnKVVd0RAFBA--.4718S2; Thu, 15 Aug 2019 17:44:07 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=z5nMCoOML3Odw7MolS jfwXsIRj/YwR3WEGJTWqzFYHg=; b=SlrYwwxeauTjioZSNV2AHV//OfldjN0zzm u7AuoF0Us3AdyB2vSrEmU+3Kp/kKI+vycEsLMIZOTrbg205q+V38ZIzoKY3ed7T1 l22XJFtOi8aD2hXBYgmzjTceJ4QULJmuJ10sLiPOHRqqH3d4Hm9/UxvVFM2Q1JRr gdUjpCZw8= From: hexin900110@163.com To: libvir-list@redhat.com Date: Thu, 15 Aug 2019 17:44:06 +0800 Message-Id: <1565862246-5177-1-git-send-email-hexin900110@163.com> X-CM-TRANSID: GdxpCgAXqIFnKVVd0RAFBA--.4718S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrZryDJryUJFW7Aryktr13Jwb_yoWfKwc_GF y8Ar4DAryrJr97uwsxWayruryxZ34Sv34fGr1FyrZ7tr40grW7X3ZrWr93Wr43urW3ur98 X34vvr4F9rnrGjkaLaAFLSUrUUUU8b8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUbHmh5UUUUU== X-Originating-IP: [61.135.169.81] X-CM-SenderInfo: pkh0x0yzqqiiqq6rljoofrz/1tbiJQYSb1UMTa+nqAAAsq X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 238 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Thu, 15 Aug 2019 09:44:10 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Thu, 15 Aug 2019 09:44:10 +0000 (UTC) for IP:'123.126.97.1' DOMAIN:'mail-m971.mail.163.com' HELO:'mail-m971.mail.163.com' FROM:'hexin900110@163.com' RCPT:'' X-RedHat-Spam-Score: 0.151 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS) 123.126.97.1 mail-m971.mail.163.com 123.126.97.1 mail-m971.mail.163.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.42 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Liu Qi , hexin , Zhang Yu , hexin900110@163.com Subject: [libvirt] [PATCH] virpci:fix Secondary Bus Reset bug X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Thu, 15 Aug 2019 09:44:21 +0000 (UTC) X-ZohoMail-DKIM: fail (Computed bodyhash is different from the expected one) Content-Type: text/plain; charset="utf-8" From: hexin The parent bridge configuration of the current device should be read and reset, instead of reading the current device configuration. Signed-off-by: He Xin Signed-off-by: Liu Qi Signed-off-by: Zhang Yu Reviewed-by: Michal Privoznik --- src/util/virpci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virpci.c b/src/util/virpci.c index 61a6b359e5..483de2cb16 100644 --- a/src/util/virpci.c +++ b/src/util/virpci.c @@ -821,7 +821,7 @@ virPCIDeviceTrySecondaryBusReset(virPCIDevicePtr dev, /* Read the control register, set the reset flag, wait 200ms, * unset the reset flag and wait 200ms. */ - ctl =3D virPCIDeviceRead16(dev, cfgfd, PCI_BRIDGE_CONTROL); + ctl =3D virPCIDeviceRead16(dev, parentfd, PCI_BRIDGE_CONTROL); =20 virPCIDeviceWrite16(parent, parentfd, PCI_BRIDGE_CONTROL, ctl | PCI_BRIDGE_CTL_RESET); --=20 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list