* [PATCH v2] nitro_enclaves: Set Bus Master for the NE PCI device
@ 2021-06-21 0:40 Longpeng(Mike)
2021-06-21 14:35 ` Paraschiv, Andra-Irina
0 siblings, 1 reply; 2+ messages in thread
From: Longpeng(Mike) @ 2021-06-21 0:40 UTC (permalink / raw)
To: linux-kernel
Cc: arei.gonglei, Longpeng(Mike),
Greg Kroah-Hartman, Andra Paraschiv, Alexandru Vasile,
Alexandru Ciobotaru
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] nitro_enclaves: Set Bus Master for the NE PCI device
2021-06-21 0:40 [PATCH v2] nitro_enclaves: Set Bus Master for the NE PCI device Longpeng(Mike)
@ 2021-06-21 14:35 ` Paraschiv, Andra-Irina
0 siblings, 0 replies; 2+ messages in thread
From: Paraschiv, Andra-Irina @ 2021-06-21 14:35 UTC (permalink / raw)
To: Longpeng(Mike), linux-kernel
Cc: arei.gonglei, Greg Kroah-Hartman, Alexandru Vasile, Alexandru Ciobotaru
On 21/06/2021 03:40, Longpeng(Mike) wrote:
> 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
>
Reviewed-by: Andra Paraschiv <andraprs@amazon.com>
Thank you.
Andra
Amazon Development Center (Romania) S.R.L. registered office: 27A Sf. Lazar Street, UBC5, floor 2, Iasi, Iasi County, 700045, Romania. Registered in Romania. Registration number J22/2621/2005.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-21 14:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-21 0:40 [PATCH v2] nitro_enclaves: Set Bus Master for the NE PCI device Longpeng(Mike)
2021-06-21 14:35 ` Paraschiv, Andra-Irina
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.