Skip to content
Snippets Groups Projects
Unverified Commit 3fa4e569 authored by Suryanarayana Raju Sangani's avatar Suryanarayana Raju Sangani
Browse files

Linux Driver 2022.1.4 patch: Added support for more than 2k queues and also Fedora36

Linux Driver 2022.1.4 patch: Added support for more than 2k queues and also Fedora36
parent a7431f70
No related branches found
No related tags found
No related merge requests found
......@@ -871,7 +871,7 @@ static void parse_config_file(const char *cfg_fname)
printf("Could not open %s\n", rng_sz_path);
exit(1);
}
ret = read(rng_sz_fd, &rng_sz[1], 100);
ret = read(rng_sz_fd, &rng_sz[1], 99);
if (ret < 0) {
printf("Error: Could not read the file\n");
exit(1);
......
......@@ -1051,7 +1051,7 @@ static void parse_config_file(const char *cfg_fname)
printf("Could not open %s\n", rng_sz_path);
exit(1);
}
ret = read(rng_sz_fd, &rng_sz[1], 100);
ret = read(rng_sz_fd, &rng_sz[1], 99);
if (ret < 0) {
printf("Error: Could not read the file\n");
exit(1);
......
......@@ -1481,7 +1481,9 @@ int qdma_queue_add(unsigned long dev_hndl, struct qdma_queue_conf *qconf,
qcnt = qdma_get_device_active_queue_count(xdev->dma_device_index,
xdev->func_id, qconf->q_type);
#else
spin_unlock(&qdev->lock);
qdma_dev_get_active_qcnt(xdev, &h2c_qcnt, &c2h_qcnt, &cmpt_qcnt);
spin_lock(&qdev->lock);
if (qconf->q_type == Q_H2C)
qcnt = h2c_qcnt;
else if (qconf->q_type == Q_C2H)
......
......@@ -162,7 +162,7 @@ union qdma_ind_ctxt_cmd {
uint32_t busy:1;
uint32_t sel:4;
uint32_t op:2;
uint32_t qid:11;
uint32_t qid:12;
uint32_t rsvd:14;
} bits;
};
......
......@@ -204,8 +204,6 @@ int qdma_device_prep_q_resource(struct xlnx_dma_dev *xdev)
struct qdma_dev *qdev = xdev_2_qdev(xdev);
int rv = 0;
spin_lock(&qdev->lock);
if (qdev->init_qrange)
goto done;
......@@ -217,8 +215,6 @@ int qdma_device_prep_q_resource(struct xlnx_dma_dev *xdev)
if (rv < 0)
goto done;
done:
spin_unlock(&qdev->lock);
return rv;
}
......
......@@ -33,8 +33,8 @@
/** QDMA character device class name */
#define QDMA_CDEV_CLASS_NAME DRV_MODULE_NAME
/** QDMA character device max minor number*/
#define QDMA_MINOR_MAX (2048)
/** QDMA character device max minor number to support 4k queues */
#define QDMA_MINOR_MAX (4096)
/* per pci device control */
/**
......
......@@ -1114,10 +1114,10 @@ int xpdev_queue_delete(struct xlnx_pci_dev *xpdev, unsigned int qidx, u8 q_type,
if (q_type != Q_CMPT) {
spin_lock(&xpdev->cdev_lock);
qdata->xcdev->dir_init &= ~(1 << (q_type ? 1 : 0));
spin_unlock(&xpdev->cdev_lock);
if (!qdata->xcdev->dir_init)
qdma_cdev_destroy(qdata->xcdev);
spin_unlock(&xpdev->cdev_lock);
}
memset(qdata, 0, sizeof(*qdata));
......@@ -1644,7 +1644,6 @@ static void xpdev_device_cleanup(struct xlnx_pci_dev *xpdev)
struct xlnx_qdata *qdata = xpdev->qdata;
struct xlnx_qdata *qmax = qdata + (xpdev->qmax * 2); /* h2c and c2h */
spin_lock(&xpdev->cdev_lock);
for (; qdata != qmax; qdata++) {
if (qdata->xcdev) {
/* if either h2c(1) or c2h(2) bit set, but not both */
......@@ -1652,12 +1651,13 @@ static void xpdev_device_cleanup(struct xlnx_pci_dev *xpdev)
qdata->xcdev->dir_init == 2) {
qdma_cdev_destroy(qdata->xcdev);
} else { /* both bits are set so remove one */
spin_lock(&xpdev->cdev_lock);
qdata->xcdev->dir_init >>= 1;
spin_unlock(&xpdev->cdev_lock);
}
}
memset(qdata, 0, sizeof(*qdata));
}
spin_unlock(&xpdev->cdev_lock);
}
static void remove_one(struct pci_dev *pdev)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment