diff mbox series

[v8,16/18] NTB: tool: Enable the NTB/PCIe link on the local or remote side of bridge

Message ID 20201111153559.19050-17-kishon@ti.com (mailing list archive)
State Superseded
Delegated to: Lorenzo Pieralisi
Headers show
Series Implement NTB Controller using multiple PCI EP | expand

Commit Message

Kishon Vijay Abraham I Nov. 11, 2020, 3:35 p.m. UTC
Invoke ntb_link_enable() to enable the NTB/PCIe link on the local
or remote side of the bridge.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 drivers/ntb/test/ntb_tool.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Dave Jiang Dec. 7, 2020, 3:55 p.m. UTC | #1
> -----Original Message-----
> From: Kishon Vijay Abraham I <kishon@ti.com>
> Sent: Wednesday, November 11, 2020 8:36 AM
> To: Bjorn Helgaas <bhelgaas@google.com>; Jonathan Corbet
> <corbet@lwn.net>; Kishon Vijay Abraham I <kishon@ti.com>; Lorenzo
> Pieralisi <lorenzo.pieralisi@arm.com>; Arnd Bergmann <arnd@arndb.de>;
> Jon Mason <jdmason@kudzu.us>; Jiang, Dave <dave.jiang@intel.com>;
> Allen Hubbe <allenbh@gmail.com>; Tom Joseph <tjoseph@cadence.com>;
> Rob Herring <robh@kernel.org>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; linux-
> pci@vger.kernel.org; linux-doc@vger.kernel.org; linux-
> kernel@vger.kernel.org; linux-ntb@googlegroups.com
> Subject: [PATCH v8 16/18] NTB: tool: Enable the NTB/PCIe link on the local or
> remote side of bridge
> 
> Invoke ntb_link_enable() to enable the NTB/PCIe link on the local or remote
> side of the bridge.
> 
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
>  drivers/ntb/test/ntb_tool.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/ntb/test/ntb_tool.c b/drivers/ntb/test/ntb_tool.c index
> b7bf3f863d79..8230ced503e3 100644
> --- a/drivers/ntb/test/ntb_tool.c
> +++ b/drivers/ntb/test/ntb_tool.c
> @@ -1638,6 +1638,7 @@ static int tool_probe(struct ntb_client *self, struct
> ntb_dev *ntb)
> 
>  	tool_setup_dbgfs(tc);
> 
> +	ntb_link_enable(ntb, NTB_SPEED_AUTO, NTB_WIDTH_AUTO);

The tool expects the user to enable the link via debugfs according to documentation. Is this necessary?

>  	return 0;
> 
>  err_clear_mws:
> --
> 2.17.1
Kishon Vijay Abraham I Dec. 8, 2020, 4:46 a.m. UTC | #2
Hi Dave,

On 07/12/20 9:25 pm, Jiang, Dave wrote:
> 
> 
>> -----Original Message-----
>> From: Kishon Vijay Abraham I <kishon@ti.com>
>> Sent: Wednesday, November 11, 2020 8:36 AM
>> To: Bjorn Helgaas <bhelgaas@google.com>; Jonathan Corbet
>> <corbet@lwn.net>; Kishon Vijay Abraham I <kishon@ti.com>; Lorenzo
>> Pieralisi <lorenzo.pieralisi@arm.com>; Arnd Bergmann <arnd@arndb.de>;
>> Jon Mason <jdmason@kudzu.us>; Jiang, Dave <dave.jiang@intel.com>;
>> Allen Hubbe <allenbh@gmail.com>; Tom Joseph <tjoseph@cadence.com>;
>> Rob Herring <robh@kernel.org>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; linux-
>> pci@vger.kernel.org; linux-doc@vger.kernel.org; linux-
>> kernel@vger.kernel.org; linux-ntb@googlegroups.com
>> Subject: [PATCH v8 16/18] NTB: tool: Enable the NTB/PCIe link on the local or
>> remote side of bridge
>>
>> Invoke ntb_link_enable() to enable the NTB/PCIe link on the local or remote
>> side of the bridge.
>>
>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>> ---
>>  drivers/ntb/test/ntb_tool.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/ntb/test/ntb_tool.c b/drivers/ntb/test/ntb_tool.c index
>> b7bf3f863d79..8230ced503e3 100644
>> --- a/drivers/ntb/test/ntb_tool.c
>> +++ b/drivers/ntb/test/ntb_tool.c
>> @@ -1638,6 +1638,7 @@ static int tool_probe(struct ntb_client *self, struct
>> ntb_dev *ntb)
>>
>>  	tool_setup_dbgfs(tc);
>>
>> +	ntb_link_enable(ntb, NTB_SPEED_AUTO, NTB_WIDTH_AUTO);
> 
> The tool expects the user to enable the link via debugfs according to documentation. Is this necessary?

right, it can be enabled using debugfs. Will drop this patch.

Thank You,
Kishon
diff mbox series

Patch

diff --git a/drivers/ntb/test/ntb_tool.c b/drivers/ntb/test/ntb_tool.c
index b7bf3f863d79..8230ced503e3 100644
--- a/drivers/ntb/test/ntb_tool.c
+++ b/drivers/ntb/test/ntb_tool.c
@@ -1638,6 +1638,7 @@  static int tool_probe(struct ntb_client *self, struct ntb_dev *ntb)
 
 	tool_setup_dbgfs(tc);
 
+	ntb_link_enable(ntb, NTB_SPEED_AUTO, NTB_WIDTH_AUTO);
 	return 0;
 
 err_clear_mws: