Updates to AMD NTB driver
Subsystems (2)
Basavaraj Natikar
maintainerv2 cover Updates to AMD NTB driver
This patch series include changes for:
- Adding a new gen CPU support.
- Update for the NTB AMD driver maintainer.
Changes in v2:
- Reformatted block to reduce indentation by using early returns.
Basavaraj Natikar (2):
ntb_hw_amd: Update amd_ntb_get_link_status to support latest
generation secondary topology
MAINTAINERS: Update for the NTB AMD driver maintainer
MAINTAINERS | 1 + drivers/ntb/hw/amd/ntb_hw_amd.c | 18 +++++++++++++++++- drivers/ntb/hw/amd/ntb_hw_amd.h | 1 + 3 files changed, 19 insertions(+), 1 deletion(-)
Signature · 1 line
2.25.1
Basavaraj Natikar
maintainerPATCH v2 1/2 ntb_hw_amd: Update amd_ntb_get_link_status to support latest generation secondary topology
In the NTB secondary topology configuration of the latest generation, the device behaves like an endpoint. Hence, add endpoint support and update amd_ntb_get_link_status to accommodate endpoint devices.
--- drivers/ntb/hw/amd/ntb_hw_amd.c | 18 +++++++++++++++++- drivers/ntb/hw/amd/ntb_hw_amd.h | 1 + 2 files changed, 18 insertions(+), 1 deletion(-)
drivers/ntb/hw/amd/ntb_hw_amd.c +17 -1
@@ -197,13 +197,22 @@ static int amd_ntb_mw_set_trans(struct ntb_dev *ntb, int pidx, int idx,static int amd_ntb_get_link_status (struct amd_ntb_dev *ndev) { -struct pci_dev *pdev =NULL ; +struct pci_dev *pdev = ndev->ntb.pdev;struct pci_dev *pci_swds =NULL ;struct pci_dev *pci_swus =NULL ;u32 stat;int rc;if (ndev->ntb.topo ==NTB_TOPO_SEC ) { +if (ndev->dev_data->is_endpoint) { + rc =pcie_capability_read_dword (pdev,PCI_EXP_LNKCTL , &stat); +if (rc) +return rc; + + ndev->lnk_sta = stat; +return 0 ; + } +/* Locate the pointer to Downstream Switch for this device */ pci_swds =pci_upstream_bridge (ndev->ntb.pdev);if (pci_swds) {
@@ -1311,6 +1320,11 @@ static const struct ntb_dev_data dev_data[] = { .mw_count = 2, .mw_idx = 2, }, + {/* for device 0x17d7 */ + .mw_count = 2, + .mw_idx = 2, + .is_endpoint = true, + }, };static const struct pci_device_id amd_ntb_pci_tbl[] = {
@@ -1319,6 +1333,8 @@ static const struct pci_device_id amd_ntb_pci_tbl[] = { { PCI_VDEVICE(AMD, 0x14c0), (kernel_ulong_t)&dev_data[1] }, { PCI_VDEVICE(AMD, 0x14c3), (kernel_ulong_t)&dev_data[1] }, { PCI_VDEVICE(AMD, 0x155a), (kernel_ulong_t)&dev_data[1] }, + { PCI_VDEVICE(AMD, 0x17d4), (kernel_ulong_t)&dev_data[1] }, + { PCI_VDEVICE(AMD, 0x17d7), (kernel_ulong_t)&dev_data[2] }, { PCI_VDEVICE(HYGON, 0x145b), (kernel_ulong_t)&dev_data[0] }, { 0, } };
drivers/ntb/hw/amd/ntb_hw_amd.h +1 -0
@@ -168,6 +168,7 @@ enum {struct ntb_dev_data {const unsigned char mw_count;const unsigned int mw_idx; +const bool is_endpoint; };struct amd_ntb_dev ;
Signature · 1 line
2.25.1
Basavaraj Natikar
maintainerPATCH v2 2/2 MAINTAINERS: Update for the NTB AMD driver maintainer
In reply to Basavaraj NatikarAdding myself to the maintainers list for the ntb_hw_amd driver.
--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
@@ -18060,6 +18060,7 @@ F: Documentation/core-api/symbol-namespaces.rst F: scripts/nsdeps NTB AMD DRIVER +M: Basavaraj Natikar <[email protected]> M: Shyam Sundar S K <[email protected]> L: [email protected] S: Supported
Signature · 1 line
2.25.1
Quoted 13 lines · Basavaraj Natikar
This patch series include changes for:
- Adding a new gen CPU support.
- Update for the NTB AMD driver maintainer.Changes in v2:
- Reformatted block to reduce indentation by using early returns.Basavaraj Natikar (2):
ntb_hw_amd: Updateamd_ntb_get_link_statusto support latest
generation secondary topology
MAINTAINERS: Update for the NTB AMD driver maintainer
Quoted 5 lines
MAINTAINERS | 1 + drivers/ntb/hw/amd/ntb_hw_amd.c | 18 +++++++++++++++++- drivers/ntb/hw/amd/ntb_hw_amd.h | 1 + 3 files changed, 19 insertions(+), 1 deletion(-)
For the series,