Linux PCI Non-Transparent Bridge framework and drivers
 help / color / mirror / Atom feed
From: Jon Mason <jdmason@kudzu.us>
To: Allen Hubbe <Allen.Hubbe@dell.com>
Cc: 'Shyam Sundar S K' <ssundark@amd.com>,
	"'Yu, Xiangliang'" <Xiangliang.Yu@amd.com>,
	dave.jiang@intel.com, "'Shah,
	Nehal-bakulchandra'" <Nehal-bakulchandra.Shah@amd.com>,
	"'Subramaniyan, Ramkumar'" <ramkumar.ks@amd.com>,
	"'Su, Richard (Bin)'" <Richard1.Su@amd.com>,
	linux-ntb@googlegroups.com
Subject: Re: [PATCH] NTB: add support for hotplug feature
Date: Wed, 21 Dec 2016 12:03:03 -0500	[thread overview]
Message-ID: <20161221170302.GH32599@kudzu.us> (raw)
In-Reply-To: <000101d24fcc$ae2af820$0a80e860$@dell.com>

On Tue, Dec 06, 2016 at 09:26:05AM -0500, Allen Hubbe wrote:
> From: Shyam Sundar S K
> > Hi Allen, Jon
> > 
> > Any feedback on the below changes ?
> > 
> 
> Acked-by: Allen Hubbe <Allen.Hubbe@dell.com>
> 
> > Thanks,
> > Shyam
> > 
> > On 11/18/2016 2:51 PM, Shyam Sundar S K wrote:
> > > From: Xiangliang Yu <Xiangliang.Yu@amd.com>
> > >
> > > AMD NTB support hotplug under B2B mode. NTB will trigger link
> > > up/down interrupt event when doing plug add/remove, this patch
> > > implements the two interrupt event to support B2B hotplug function.
> > >
> > > Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
> > > Signed-off-by: S-k, Shyam-sundar <Shyam-sundar.S-k@amd.com>

I have applied this to my ntb branch.  However, the signed-off-by
above does not conform to the "firstname lastname", due to the comma
and flip of the names.  I see in the maintainer patch that this is
flipped.  So, I am going to correct this by hand.  In the future,
please use
    Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>

Thanks,
Jon

> > > ---
> > >  drivers/ntb/hw/amd/ntb_hw_amd.c | 9 ++++++++-
> > >  drivers/ntb/hw/amd/ntb_hw_amd.h | 5 ++++-
> > >  2 files changed, 12 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/ntb/hw/amd/ntb_hw_amd.c b/drivers/ntb/hw/amd/ntb_hw_amd.c
> > > index 9bbe3e0..2fc202c 100644
> > > --- a/drivers/ntb/hw/amd/ntb_hw_amd.c
> > > +++ b/drivers/ntb/hw/amd/ntb_hw_amd.c
> > > @@ -194,6 +194,11 @@ static int amd_link_is_up(struct amd_ntb_dev *ndev)
> > >  	if (!ndev->peer_sta)
> > >  		return NTB_LNK_STA_ACTIVE(ndev->cntl_sta);
> > >
> > > +	if (ndev->peer_sta & AMD_LINK_UP_EVENT) {
> > > +		ndev->peer_sta = 0;
> > > +		return 1;
> > > +	}
> > > +
> > >  	/* If peer_sta is reset or D0 event, the ISR has
> > >  	 * started a timer to check link status of hardware.
> > >  	 * So here just clear status bit. And if peer_sta is
> > > @@ -202,7 +207,7 @@ static int amd_link_is_up(struct amd_ntb_dev *ndev)
> > >  	 */
> > >  	if (ndev->peer_sta & AMD_PEER_RESET_EVENT)
> > >  		ndev->peer_sta &= ~AMD_PEER_RESET_EVENT;
> > > -	else if (ndev->peer_sta & AMD_PEER_D0_EVENT)
> > > +	else if (ndev->peer_sta & (AMD_PEER_D0_EVENT | AMD_LINK_DOWN_EVENT))
> > >  		ndev->peer_sta = 0;
> > >
> > >  	return 0;
> > > @@ -480,6 +485,8 @@ static void amd_handle_event(struct amd_ntb_dev *ndev, int vec)
> > >  		break;
> > >  	case AMD_PEER_D3_EVENT:
> > >  	case AMD_PEER_PMETO_EVENT:
> > > +	case AMD_LINK_UP_EVENT:
> > > +	case AMD_LINK_DOWN_EVENT:
> > >  		amd_ack_smu(ndev, status);
> > >
> > >  		/* link down */
> > > diff --git a/drivers/ntb/hw/amd/ntb_hw_amd.h b/drivers/ntb/hw/amd/ntb_hw_amd.h
> > > index 2eac3cd..13d73ed 100644
> > > --- a/drivers/ntb/hw/amd/ntb_hw_amd.h
> > > +++ b/drivers/ntb/hw/amd/ntb_hw_amd.h
> > > @@ -148,9 +148,12 @@ enum {
> > >  	AMD_PEER_D3_EVENT	= BIT(2),
> > >  	AMD_PEER_PMETO_EVENT	= BIT(3),
> > >  	AMD_PEER_D0_EVENT	= BIT(4),
> > > +	AMD_LINK_UP_EVENT	= BIT(5),
> > > +	AMD_LINK_DOWN_EVENT	= BIT(6),
> > >  	AMD_EVENT_INTMASK	= (AMD_PEER_FLUSH_EVENT |
> > >  				AMD_PEER_RESET_EVENT | AMD_PEER_D3_EVENT |
> > > -				AMD_PEER_PMETO_EVENT | AMD_PEER_D0_EVENT),
> > > +				AMD_PEER_PMETO_EVENT | AMD_PEER_D0_EVENT |
> > > +				AMD_LINK_UP_EVENT | AMD_LINK_DOWN_EVENT),
> > >
> > >  	AMD_PMESTAT_OFFSET	= 0x480,
> > >  	AMD_PMSGTRIG_OFFSET	= 0x490,
> > >
> 

      reply	other threads:[~2016-12-21 17:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-18  9:21 [PATCH] NTB: add support for hotplug feature Shyam Sundar S K
2016-12-06  7:32 ` Shyam Sundar S K
2016-12-06 14:26   ` Allen Hubbe
2016-12-21 17:03     ` Jon Mason [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161221170302.GH32599@kudzu.us \
    --to=jdmason@kudzu.us \
    --cc=Allen.Hubbe@dell.com \
    --cc=Nehal-bakulchandra.Shah@amd.com \
    --cc=Richard1.Su@amd.com \
    --cc=Xiangliang.Yu@amd.com \
    --cc=dave.jiang@intel.com \
    --cc=linux-ntb@googlegroups.com \
    --cc=ramkumar.ks@amd.com \
    --cc=ssundark@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox