From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752115AbcFNPyt (ORCPT ); Tue, 14 Jun 2016 11:54:49 -0400 Received: from mailuogwdur.emc.com ([128.221.224.79]:51066 "EHLO mailuogwdur.emc.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751029AbcFNPys (ORCPT ); Tue, 14 Jun 2016 11:54:48 -0400 X-Greylist: delayed 543 seconds by postgrey-1.27 at vger.kernel.org; Tue, 14 Jun 2016 11:54:47 EDT X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd52.lss.emc.com u5EFsRDb015248 X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd52.lss.emc.com u5EFsRDb015248 From: "Allen Hubbe" To: "'Logan Gunthorpe'" , "'Allen Hubbe'" Cc: "'Jon Mason'" , "'Dave Jiang'" , "'Shuah Khan'" , "'Sudip Mukherjee'" , "'Arnd Bergmann'" , , , References: <575C2E28.9020604@deltatee.com> <000101d1c653$bc673280$35359780$@emc.com> <57602736.7090709@deltatee.com> In-Reply-To: <57602736.7090709@deltatee.com> Subject: RE: [PATCH 6/8] ntb_tool: Add link status file to debugfs Date: Tue, 14 Jun 2016 11:54:16 -0400 Message-ID: <000301d1c655$02e46f60$08ad4e20$@emc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQHRw2sukJOSCaEBsEO09ZcGVet+AZ/jze6AgADaJgCAAKeHgIADzAXAgABI4AD//70isA== Content-Language: en-us X-RSA-Classifications: public X-Sentrion-Hostname: mailuogwprd52.lss.emc.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Logan Gunthorpe > On 14/06/16 09:45 AM, Allen Hubbe wrote: > > > > Feel free to disregard my suggestion above. I hope my comment has not cost you too much > time. > > > > The way you have written it already, and used it in the self-test script is much more > concise. > > > >>> + * root@self# echo > $DBG_DIR/link > > > > Acked-by: Allen.Hubbe@emc.com > > > > > > > > Eventually, I think it would be useful to let ntb_tool enable and disable the link. In > that case, it might also be useful in a test script to wait for link down, not just link > up. > > > > What about this: > > > > # Wait for the link to be up or down > > root@self# echo 1 > $DBG_DIR/link > > root@self# echo 0 > $DBG_DIR/link > > > > It need not be a part of this patch, but eventually: > > > > # Enable or disable the link > > root@self# echo 1 > $DBG_DIR/link_ctrl > > root@self# echo 0 > $DBG_DIR/link_ctrl > > > > # Reading the link_ctrl file can also give the link status > > root@self# cat $DBG_DIR/link_ctrl > > > > Finally, I wonder if the file called "link" in this patch should be called "link_wait" > or similar, so its purpose is obviously not for enabling and disabling the link. > > > > Actually I've already implemented something similar to your original > suggestion. I'll be submitting a v2 of this set shortly. Ok. Thanks. I'll accept the blame if anyone doesn't like it.