Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751729AbdGaU1F (ORCPT ); Mon, 31 Jul 2017 16:27:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:36590 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751017AbdGaU1E (ORCPT ); Mon, 31 Jul 2017 16:27:04 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5E68922B5D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=helgaas@kernel.org Date: Mon, 31 Jul 2017 15:27:00 -0500 From: Bjorn Helgaas To: Logan Gunthorpe Cc: linux-ntb@googlegroups.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Greg Kroah-Hartman , Kurt Schwemmer , Stephen Bates , Serge Semin Subject: Re: [PATCH v3 12/16] switchtec_ntb: add link management Message-ID: <20170731202700.GE9303@bhelgaas-glaptop.roam.corp.google.com> References: <20170725205753.4735-1-logang@deltatee.com> <20170725205753.4735-13-logang@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170725205753.4735-13-logang@deltatee.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 628 Lines: 15 On Tue, Jul 25, 2017 at 02:57:49PM -0600, Logan Gunthorpe wrote: > switchtec_ntb checks for a link by looking at the shared memory > window. If the magic number is correct and the otherside indicates > their link is enabled then we take the link to be up. > > Whenever we change our local link status we send a msg to the > otherside to check whether it's up and change their status. s/otherside/other side/ (twice) > The current status is maintained in a flag so ntb_is_link_up > can return quickly. > > We utilize Switchtec's link status notifier to also check link changes > when the switch notices a port changes state.