diff --git a/QDMA/linux-kernel/RELEASE b/QDMA/linux-kernel/RELEASE index 8733947c26f7063640def7eef5a704a6b9b1aa2f..39807d72560cb8f0fe4812f3b6c2bd716c7be92b 100755 --- a/QDMA/linux-kernel/RELEASE +++ b/QDMA/linux-kernel/RELEASE @@ -180,8 +180,11 @@ DRIVER LIMITATIONS: - For optimal QDMA streaming performance, packet buffers of the descriptor ring should be aligned to at least 256 bytes. - FLR is not supported in the Driver for CentOS because linux kernels provided in CentOS versions does not support the driver call back registration for FLR functionality - - +- XRT Only + - QDMA: Bypass user BAR check for XRT application + - The existing driver code assmues the presence of the user BAR as indicated in the functional example design. If this user BAR is not detected during the driver probing process, + it results in a failure. However, this check is specific to example design and some customer designs might not contain user BAR. So bypassing the user BAR check to prevent + driver returning error and proceed further. diff --git a/QDMA/linux-kernel/driver/libqdma/xdev.c b/QDMA/linux-kernel/driver/libqdma/xdev.c index a524e4d0e92f59ec8d0de57cbe839beb100b7682..19880a515b2745bcffe91a810ba2dc1a7a89cd23 100755 --- a/QDMA/linux-kernel/driver/libqdma/xdev.c +++ b/QDMA/linux-kernel/driver/libqdma/xdev.c @@ -42,6 +42,9 @@ #ifdef DEBUGFS #include "qdma_debugfs_dev.h" #endif +#ifdef __XRT__ +#include "qdma_access_errors.h" +#endif #ifdef __LIST_NEXT_ENTRY__ #define list_next_entry(pos, member) \ @@ -535,6 +538,7 @@ static int xdev_map_bars(struct xlnx_dma_dev *xdev, struct pci_dev *pdev) static int xdev_identify_bars(struct xlnx_dma_dev *xdev, struct pci_dev *pdev) { int bar_idx = 0; + int rv = 0; u8 num_bars_present = 0; int bar_id_list[QDMA_BAR_NUM]; int bar_id_idx = 0; @@ -553,7 +557,6 @@ static int xdev_identify_bars(struct xlnx_dma_dev *xdev, struct pci_dev *pdev) } if (num_bars_present > 1) { - int rv = 0; /* AXI Master Lite BAR IDENTIFICATION */ if ((xdev->version_info.ip_type == QDMA_VERSAL_HARD_IP) && @@ -575,7 +578,14 @@ static int xdev_identify_bars(struct xlnx_dma_dev *xdev, struct pci_dev *pdev) if (rv < 0) { pr_err("get AXI Master Lite bar failed with error = %d", rv); +#ifdef __XRT__ + /** This change is for XRT application, + * when there is no user BAR in desin + */ + rv = QDMA_ERR_HWACC_BAR_NOT_FOUND; +#else return xdev->hw.qdma_get_error_code(rv); +#endif } pr_info("AXI Master Lite BAR %d.\n", @@ -598,7 +608,7 @@ static int xdev_identify_bars(struct xlnx_dma_dev *xdev, struct pci_dev *pdev) } } } - return 0; + return rv; } /*****************************************************************************/ @@ -1167,7 +1177,7 @@ int qdma_device_open(const char *mod_name, struct qdma_dev_conf *conf, } rv = xdev_identify_bars(xdev, pdev); - if (rv) { + if (rv < 0) { pr_err("Failed to identify bars, err %d", rv); goto unmap_bars; } @@ -1185,7 +1195,7 @@ int qdma_device_open(const char *mod_name, struct qdma_dev_conf *conf, *dev_hndl = (unsigned long)xdev; - return 0; + return rv; cleanup_qdma: qdma_device_offline(pdev, (unsigned long)xdev, XDEV_FLR_INACTIVE);