Skip to content

Commit

Permalink
disable completer abort (Xilinx#2351)
Browse files Browse the repository at this point in the history
* extra firewall trip clear for u50
  • Loading branch information
houlz0507 authored and sonals committed Oct 25, 2019
1 parent 278065f commit 192e706
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/runtime_src/core/pcie/driver/linux/xocl/devices.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ enum {
XOCL_DSAFLAG_DYNAMIC_IP = 0x200,
XOCL_DSAFLAG_SMARTN = 0x400,
XOCL_DSAFLAG_VERSAL = 0x800,
XOCL_DSAFLAG_EXTRA_AF_CLEAR = 0x1000,
};

#define FLASH_TYPE_SPI "spi"
Expand Down Expand Up @@ -1783,7 +1784,8 @@ struct xocl_subdev_map {

#define XOCL_BOARD_MGMT_U50 \
(struct xocl_board_private){ \
.flags = XOCL_DSAFLAG_DYNAMIC_IP, \
.flags = XOCL_DSAFLAG_DYNAMIC_IP | \
XOCL_DSAFLAG_EXTRA_AF_CLEAR, \
.subdev_info = MGMT_RES_U50, \
.subdev_num = ARRAY_SIZE(MGMT_RES_U50), \
.flash_type = FLASH_TYPE_SPI, \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ long reset_hot_ioctl(struct xclmgmt_dev *lro)
* Otherwise issue message that a warm reboot is required.
*/
do {
if (dev_info->flags & XOCL_DSAFLAG_EXTRA_AF_CLEAR)
xocl_af_clear(lro);
msleep(20);
} while (retry++ < XCLMGMT_RESET_MAX_RETRY &&
xocl_af_check(lro, NULL));
Expand Down
15 changes: 14 additions & 1 deletion src/runtime_src/core/pcie/driver/linux/xocl/xocl_subdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,8 @@ void xocl_fill_dsa_priv(xdev_handle_t xdev_hdl, struct xocl_board_private *in)
struct xocl_dev_core *core = (struct xocl_dev_core *)xdev_hdl;
struct pci_dev *pdev = core->pdev;
u32 dyn_shell_magic;
int i, ret;
int i, ret, cap;
unsigned err_cap;

memset(&core->priv, 0, sizeof(core->priv));
core->priv.vbnv = in->vbnv;
Expand All @@ -985,6 +986,18 @@ void xocl_fill_dsa_priv(xdev_handle_t xdev_hdl, struct xocl_board_private *in)
}
}
}
/* workaround firewall completer abort issue */
cap = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_ERR);
if (cap) {
ret = pci_read_config_dword(pdev, cap + PCI_ERR_UNCOR_SEVER,
&err_cap);
if (!ret) {
err_cap &= ~PCI_ERR_UNC_COMP_ABORT;
pci_write_config_dword(pdev, cap + PCI_ERR_UNCOR_SEVER,
err_cap);
}
}

/*
* follow xilinx device id, subsystem id codeing rules to set dsa
* private data. And they can be overwrited in subdev header file
Expand Down

0 comments on commit 192e706

Please sign in to comment.