From: "Longpeng(Mike)" <longpeng2@huawei.com>
To: <linux-kernel@vger.kernel.org>
Cc: <arei.gonglei@huawei.com>,
"Longpeng(Mike)" <longpeng2@huawei.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
Andra Paraschiv <andraprs@amazon.com>,
Alexandru Vasile <lexnv@amazon.com>,
"Alexandru Ciobotaru" <alcioa@amazon.com>
Subject: [PATCH v2] nitro_enclaves: Set Bus Master for the NE PCI device
Date: Mon, 21 Jun 2021 08:40:46 +0800 [thread overview]
Message-ID: <20210621004046.1419-1-longpeng2@huawei.com> (raw)
Enable Bus Master for the NE PCI device, according to the PCI spec
for submitting memory or I/O requests:
Master Enable – Controls the ability of a PCI Express
Endpoint to issue Memory and I/O Read/Write Requests, and
the ability of a Root or Switch Port to forward Memory and
I/O Read/Write Requests in the Upstream direction
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Andra Paraschiv <andraprs@amazon.com>
Cc: Alexandru Vasile <lexnv@amazon.com>
Cc: Alexandru Ciobotaru <alcioa@amazon.com>
Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com>
---
Changes since v1:
- update the commit message. [Andra]
---
drivers/virt/nitro_enclaves/ne_pci_dev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/virt/nitro_enclaves/ne_pci_dev.c b/drivers/virt/nitro_enclaves/ne_pci_dev.c
index b9c1de4..143207e 100644
--- a/drivers/virt/nitro_enclaves/ne_pci_dev.c
+++ b/drivers/virt/nitro_enclaves/ne_pci_dev.c
@@ -480,6 +480,8 @@ static int ne_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
goto free_ne_pci_dev;
}
+ pci_set_master(pdev);
+
rc = pci_request_regions_exclusive(pdev, "nitro_enclaves");
if (rc < 0) {
dev_err(&pdev->dev, "Error in pci request regions [rc=%d]\n", rc);
--
1.8.3.1
next reply other threads:[~2021-06-21 0:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-21 0:40 Longpeng(Mike) [this message]
2021-06-21 14:35 ` [PATCH v2] nitro_enclaves: Set Bus Master for the NE PCI device Paraschiv, Andra-Irina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210621004046.1419-1-longpeng2@huawei.com \
--to=longpeng2@huawei.com \
--cc=alcioa@amazon.com \
--cc=andraprs@amazon.com \
--cc=arei.gonglei@huawei.com \
--cc=gregkh@linuxfoundation.org \
--cc=lexnv@amazon.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.