NTB: MFV 78958433: Enable Snoop on Primary Side
Enable Snoop from Primary to Secondary side on BAR23 and BAR45 on all TLPs. Previously, Snoop was only enabled from Secondary to Primary side. This can have a performance improvement on some workloads. Also, make the code more obvious about how the link is being enabled. Authored by: Jon Mason Obtained from: Linux (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
4402204d47
commit
ab64537884
@ -1050,12 +1050,18 @@ ntb_handle_link_event(struct ntb_softc *ntb, int link_state)
|
||||
static void
|
||||
ntb_hw_link_up(struct ntb_softc *ntb)
|
||||
{
|
||||
uint32_t cntl;
|
||||
|
||||
if (ntb->conn_type == NTB_CONN_TRANSPARENT)
|
||||
if (ntb->conn_type == NTB_CONN_TRANSPARENT) {
|
||||
ntb_handle_link_event(ntb, NTB_LINK_UP);
|
||||
else
|
||||
ntb_reg_write(4, ntb->reg_ofs.lnk_cntl,
|
||||
NTB_CNTL_BAR23_SNOOP | NTB_CNTL_BAR45_SNOOP);
|
||||
return;
|
||||
}
|
||||
|
||||
cntl = ntb_reg_read(4, ntb->reg_ofs.lnk_cntl);
|
||||
cntl &= ~(NTB_CNTL_LINK_DISABLE | NTB_CNTL_CFG_LOCK);
|
||||
cntl |= NTB_CNTL_P2S_BAR23_SNOOP | NTB_CNTL_S2P_BAR23_SNOOP;
|
||||
cntl |= NTB_CNTL_P2S_BAR45_SNOOP | NTB_CNTL_S2P_BAR45_SNOOP;
|
||||
ntb_reg_write(4, ntb->reg_ofs.lnk_cntl, cntl);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1069,8 +1075,9 @@ ntb_hw_link_down(struct ntb_softc *ntb)
|
||||
}
|
||||
|
||||
cntl = ntb_reg_read(4, ntb->reg_ofs.lnk_cntl);
|
||||
cntl &= ~(NTB_CNTL_BAR23_SNOOP | NTB_CNTL_BAR45_SNOOP);
|
||||
cntl |= NTB_CNTL_LINK_DISABLE;
|
||||
cntl &= ~(NTB_CNTL_P2S_BAR23_SNOOP | NTB_CNTL_S2P_BAR23_SNOOP);
|
||||
cntl &= ~(NTB_CNTL_P2S_BAR45_SNOOP | NTB_CNTL_S2P_BAR45_SNOOP);
|
||||
cntl |= NTB_CNTL_LINK_DISABLE | NTB_CNTL_CFG_LOCK;
|
||||
ntb_reg_write(4, ntb->reg_ofs.lnk_cntl, cntl);
|
||||
}
|
||||
|
||||
|
@ -116,11 +116,13 @@
|
||||
#define SOC_LTSSMSTATEJMP_FORCEDETECT (1 << 2)
|
||||
#define SOC_IBIST_ERR_OFLOW 0x7fff7fff
|
||||
|
||||
#define NTB_CNTL_CFG_LOCK (1 << 0)
|
||||
#define NTB_CNTL_LINK_DISABLE (1 << 1)
|
||||
#define NTB_CNTL_BAR23_SNOOP (1 << 2)
|
||||
#define NTB_CNTL_BAR45_SNOOP (1 << 6)
|
||||
#define SOC_CNTL_LINK_DOWN (1 << 16)
|
||||
#define NTB_CNTL_CFG_LOCK (1 << 0)
|
||||
#define NTB_CNTL_LINK_DISABLE (1 << 1)
|
||||
#define NTB_CNTL_S2P_BAR23_SNOOP (1 << 2)
|
||||
#define NTB_CNTL_P2S_BAR23_SNOOP (1 << 4)
|
||||
#define NTB_CNTL_S2P_BAR45_SNOOP (1 << 6)
|
||||
#define NTB_CNTL_P2S_BAR45_SNOOP (1 << 8)
|
||||
#define SOC_CNTL_LINK_DOWN (1 << 16)
|
||||
|
||||
#define XEON_PBAR23SZ_OFFSET 0x00d0
|
||||
#define XEON_PBAR45SZ_OFFSET 0x00d1
|
||||
|
Loading…
Reference in New Issue
Block a user