mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
Add partial 6.1 support for ips40xx
This commit is contained in:
parent
06f732ecad
commit
1c57837d55
25 changed files with 3276 additions and 0 deletions
|
@ -0,0 +1,15 @@
|
|||
--- a/src/linux/ifxos_linux_thread_drv.c 2023-05-22 08:50:14.087507831 +0200
|
||||
+++ b/src/linux/ifxos_linux_thread_drv.c 2023-05-22 08:51:32.702129369 +0200
|
||||
@@ -154,8 +154,11 @@
|
||||
retVal = pThrCntrl->pThrFct(&pThrCntrl->thrParams);
|
||||
pThrCntrl->thrParams.bRunning = IFX_FALSE;
|
||||
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0))
|
||||
complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal);
|
||||
-
|
||||
+#else
|
||||
+ kthread_complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal);
|
||||
+#endif
|
||||
IFXOS_PRN_USR_DBG_NL( IFXOS, IFXOS_PRN_LEVEL_NORMAL,
|
||||
("EXIT - Kernel Thread Startup <%s>" IFXOS_CRLF,
|
||||
pThrCntrl->thrParams.pName));
|
|
@ -0,0 +1,22 @@
|
|||
--- a/src/drv_mei_cpe_linux.c 2023-05-22 14:07:34.356721319 +0200
|
||||
+++ b/src/drv_mei_cpe_linux.c 2023-05-22 14:08:02.328250656 +0200
|
||||
@@ -2062,7 +2062,7 @@
|
||||
|
||||
static int mei_proc_single_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
- return single_open(file, mei_seq_single_show, PDE_DATA(inode));
|
||||
+ return single_open(file, mei_seq_single_show, pde_data(inode));
|
||||
}
|
||||
|
||||
static void mei_proc_entry_create(struct proc_dir_entry *parent_node,
|
||||
--- a/src/drv_mei_cpe_linux_proc_config.c 2023-05-22 14:12:26.251818708 +0200
|
||||
+++ b/src/drv_mei_cpe_linux_proc_config.c 2023-05-22 14:12:51.219401891 +0200
|
||||
@@ -1274,7 +1274,7 @@
|
||||
|
||||
static int mei_proc_single_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
- return single_open(file, mei_seq_single_show, PDE_DATA(inode));
|
||||
+ return single_open(file, mei_seq_single_show, pde_data(inode));
|
||||
}
|
||||
|
||||
static struct proc_ops proc_ops = {
|
|
@ -0,0 +1,18 @@
|
|||
--- a/ep.c 2023-05-22 10:23:11.790142567 +0200
|
||||
+++ b/ep.c 2023-05-22 10:27:23.029791914 +0200
|
||||
@@ -589,13 +589,13 @@
|
||||
/* Target structures have a limit of 32 bit DMA pointers.
|
||||
* DMA pointers can be wider than 32 bits by default on some systems.
|
||||
*/
|
||||
- ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
|
||||
+ ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "32-bit DMA not available: %d\n", ret);
|
||||
goto err_region;
|
||||
}
|
||||
|
||||
- ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
|
||||
+ ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "cannot enable 32-bit consistent DMA\n");
|
||||
goto err_region;
|
|
@ -0,0 +1,325 @@
|
|||
--- a/dcdp/ptm_tc.c 2023-05-22 11:06:09.177510131 +0200
|
||||
+++ b/dcdp/ptm_tc.c 2023-05-22 11:37:23.765131033 +0200
|
||||
@@ -659,7 +659,11 @@
|
||||
memcpy(ptm_tc->outq_map, def_outq_map, sizeof(def_outq_map));
|
||||
SET_NETDEV_DEV(ptm_tc->dev, tc_priv->ep_dev[id].dev);
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,0,0)
|
||||
+ netif_napi_add(ptm_tc->dev, &ptm_tc->napi_rx, tc_priv->tc_ops.napi_rx);
|
||||
+#else
|
||||
netif_napi_add(ptm_tc->dev, &ptm_tc->napi_rx, tc_priv->tc_ops.napi_rx, NAPI_POLL_WEIGHT);
|
||||
+#endif
|
||||
netif_tx_napi_add(ptm_tc->dev, &ptm_tc->napi_tx, tc_priv->tc_ops.napi_tx, NAPI_POLL_WEIGHT);
|
||||
|
||||
err = register_netdev(ptm_tc->dev);
|
||||
@@ -3125,7 +3129,7 @@
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
- priv = (struct ptm_ep_priv *)PDE_DATA(file_inode(file));
|
||||
+ priv = (struct ptm_ep_priv *)pde_data(file_inode(file));
|
||||
|
||||
len = count < sizeof(str) ? count : sizeof(str) - 1;
|
||||
rlen = len - copy_from_user(str, buf, len);
|
||||
@@ -3335,7 +3339,7 @@
|
||||
local_buf[len] = 0;
|
||||
|
||||
num = vrx_split_buffer(local_buf, param_list, ARRAY_SIZE(param_list));
|
||||
- priv = (struct ptm_ep_priv *)PDE_DATA(file_inode(file));
|
||||
+ priv = (struct ptm_ep_priv *)pde_data(file_inode(file));
|
||||
if (priv == NULL) {
|
||||
pr_err("%s: Invalid private data\n", __func__);
|
||||
return -EINVAL;
|
||||
--- a/dcdp/inc/ptm_tc.h 2023-05-22 11:24:47.982177396 +0200
|
||||
+++ b/dcdp/inc/ptm_tc.h 2023-05-22 11:25:34.313376656 +0200
|
||||
@@ -76,6 +76,9 @@
|
||||
#define SFSM_DBACE 0x6000
|
||||
#define SFSM_CBACE 0x7100
|
||||
|
||||
+
|
||||
+#define netif_tx_napi_add netif_napi_add_tx_weight
|
||||
+
|
||||
enum {
|
||||
US_DMA_PRE_RXCH = 0,
|
||||
US_DMA_PRE_TXCH,
|
||||
--- a/dcdp/tc_proc.c 2023-05-22 11:58:32.715356238 +0200
|
||||
+++ b/dcdp/tc_proc.c 2023-05-22 11:59:13.454660657 +0200
|
||||
@@ -343,7 +343,7 @@
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
- priv = ((struct tc_comm *)PDE_DATA(file_inode(file)));
|
||||
+ priv = ((struct tc_comm *)pde_data(file_inode(file)));
|
||||
if (priv == NULL) {
|
||||
pr_err("%s: Invalid priv data\n", __func__);
|
||||
return -EFAULT;
|
||||
@@ -476,7 +476,7 @@
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
- priv = ((struct tc_comm *)PDE_DATA(file_inode(file)));
|
||||
+ priv = ((struct tc_comm *)pde_data(file_inode(file)));
|
||||
if (priv == NULL) {
|
||||
pr_err("%s: priv pointer is NULL!!!\n", __func__);
|
||||
return -EINVAL;
|
||||
@@ -746,7 +746,7 @@
|
||||
|
||||
static int proc_read_pp32_seq_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
- return single_open(file, proc_read_pp32, PDE_DATA(inode));
|
||||
+ return single_open(file, proc_read_pp32, pde_data(inode));
|
||||
}
|
||||
|
||||
static const struct proc_ops pp32_proc_fops = {
|
||||
@@ -822,7 +822,7 @@
|
||||
len = count < sizeof(str) ? count : sizeof(str) - 1;
|
||||
rlen = len - copy_from_user(str, buf, len);
|
||||
str[rlen] = 0;
|
||||
- priv = (struct tc_priv *)PDE_DATA(file_inode(file));
|
||||
+ priv = (struct tc_priv *)pde_data(file_inode(file));
|
||||
if (priv == NULL)
|
||||
return count;
|
||||
|
||||
@@ -862,7 +862,7 @@
|
||||
|
||||
static int proc_read_tc_cfg_seq_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
- return single_open(file, proc_read_tc_cfg, PDE_DATA(inode));
|
||||
+ return single_open(file, proc_read_tc_cfg, pde_data(inode));
|
||||
}
|
||||
|
||||
static const struct proc_ops tc_cfg_proc_fops = {
|
||||
@@ -888,7 +888,7 @@
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
- priv = (struct tc_priv *)PDE_DATA(file_inode(file));
|
||||
+ priv = (struct tc_priv *)pde_data(file_inode(file));
|
||||
if (priv == NULL)
|
||||
return count;
|
||||
|
||||
@@ -947,7 +947,7 @@
|
||||
|
||||
static int proc_read_dbg_seq_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
- return single_open(file, proc_read_dbg, PDE_DATA(inode));
|
||||
+ return single_open(file, proc_read_dbg, pde_data(inode));
|
||||
}
|
||||
|
||||
static const struct proc_ops tc_dbg_proc_fops = {
|
||||
@@ -970,7 +970,7 @@
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
- priv = (struct tc_priv *)PDE_DATA(file_inode(file));
|
||||
+ priv = (struct tc_priv *)pde_data(file_inode(file));
|
||||
|
||||
len = count < sizeof(str) ? count : sizeof(str) - 1;
|
||||
rlen = len - copy_from_user(str, buf, len);
|
||||
@@ -1033,7 +1033,7 @@
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
- priv = (struct tc_priv *)PDE_DATA(file_inode(file));
|
||||
+ priv = (struct tc_priv *)pde_data(file_inode(file));
|
||||
|
||||
len = count < sizeof(str) ? count : sizeof(str) - 1;
|
||||
rlen = len - copy_from_user(str, buf, len);
|
||||
@@ -1125,7 +1125,7 @@
|
||||
|
||||
static int proc_read_ver_seq_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
- return single_open(file, proc_read_ver, PDE_DATA(inode));
|
||||
+ return single_open(file, proc_read_ver, pde_data(inode));
|
||||
}
|
||||
|
||||
static const struct proc_ops tc_ver_proc_fops = {
|
||||
@@ -1159,7 +1159,7 @@
|
||||
|
||||
static int proc_read_soc_seq_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
- return single_open(file, proc_read_soc, PDE_DATA(inode));
|
||||
+ return single_open(file, proc_read_soc, pde_data(inode));
|
||||
}
|
||||
|
||||
static const struct proc_ops tc_soc_proc_fops = {
|
||||
@@ -1185,7 +1185,7 @@
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
- priv = (struct tc_priv *)PDE_DATA(file_inode(file));
|
||||
+ priv = (struct tc_priv *)pde_data(file_inode(file));
|
||||
if (priv == NULL)
|
||||
return count;
|
||||
|
||||
@@ -1264,7 +1264,7 @@
|
||||
|
||||
static int proc_read_desc_conf_seq_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
- return single_open(file, proc_read_desc_conf, PDE_DATA(inode));
|
||||
+ return single_open(file, proc_read_desc_conf, pde_data(inode));
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1343,7 +1343,7 @@
|
||||
|
||||
static int proc_read_ptm_wanmib_seq_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
- return single_open(file, proc_read_ptm_wanmib, PDE_DATA(inode));
|
||||
+ return single_open(file, proc_read_ptm_wanmib, pde_data(inode));
|
||||
}
|
||||
|
||||
static const struct proc_ops ptm_wanmib_proc_fops = {
|
||||
@@ -1382,7 +1382,7 @@
|
||||
|
||||
static int proc_read_cfg_seq_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
- return single_open(file, proc_ptm_read_cfg, PDE_DATA(inode));
|
||||
+ return single_open(file, proc_ptm_read_cfg, pde_data(inode));
|
||||
}
|
||||
|
||||
static ssize_t ptm_cfg_proc_write(struct file *file,
|
||||
@@ -1398,7 +1398,7 @@
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
- priv = (struct ptm_ep_priv *)PDE_DATA(file_inode(file));
|
||||
+ priv = (struct ptm_ep_priv *)pde_data(file_inode(file));
|
||||
if (priv == NULL) {
|
||||
pr_err("%s: Invalid private data\n", __func__);
|
||||
return -EINVAL;
|
||||
@@ -1478,7 +1478,7 @@
|
||||
p1 = local_buf;
|
||||
|
||||
num = vrx_split_buffer(local_buf, param_list, ARRAY_SIZE(param_list));
|
||||
- priv = (struct ptm_ep_priv *)PDE_DATA(file_inode(file));
|
||||
+ priv = (struct ptm_ep_priv *)pde_data(file_inode(file));
|
||||
|
||||
if (priv == NULL) {
|
||||
pr_err("%s: Invalid private data\n", __func__);
|
||||
@@ -1554,7 +1554,7 @@
|
||||
|
||||
static int proc_ptm_read_prio_seq_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
- return single_open(file, proc_ptm_read_prio, PDE_DATA(inode));
|
||||
+ return single_open(file, proc_ptm_read_prio, pde_data(inode));
|
||||
}
|
||||
|
||||
static const struct proc_ops ptm_prio_proc_fops = {
|
||||
@@ -1567,7 +1567,7 @@
|
||||
|
||||
static int proc_ptm_read_bond_seq_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
- return single_open(file, proc_ptm_read_bond, PDE_DATA(inode));
|
||||
+ return single_open(file, proc_ptm_read_bond, pde_data(inode));
|
||||
}
|
||||
|
||||
static const struct proc_ops ptm_bond_proc_fops = {
|
||||
@@ -1580,7 +1580,7 @@
|
||||
static int proc_ptm_read_bondmib_seq_open(struct inode *inode,
|
||||
struct file *file)
|
||||
{
|
||||
- return single_open(file, proc_ptm_read_bondmib, PDE_DATA(inode));
|
||||
+ return single_open(file, proc_ptm_read_bondmib, pde_data(inode));
|
||||
}
|
||||
|
||||
static const struct proc_ops ptm_bondmib_proc_fops = {
|
||||
@@ -1983,7 +1983,7 @@
|
||||
|
||||
num = vrx_split_buffer(local_buf, param_list,
|
||||
ARRAY_SIZE(param_list));
|
||||
- priv = (struct tc_comm *)PDE_DATA(file_inode(file));
|
||||
+ priv = (struct tc_comm *)pde_data(file_inode(file));
|
||||
if (priv == NULL) {
|
||||
pr_err("<%s>: Invalid private data\n", __func__);
|
||||
return count;
|
||||
@@ -2158,7 +2158,7 @@
|
||||
|
||||
static int proc_read_atm_cfg_seq_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
- return single_open(file, proc_read_atm_cfg, PDE_DATA(inode));
|
||||
+ return single_open(file, proc_read_atm_cfg, pde_data(inode));
|
||||
}
|
||||
|
||||
static ssize_t atm_cfg_proc_write(struct file *file,
|
||||
@@ -2174,7 +2174,7 @@
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
- priv = (struct atm_priv *)PDE_DATA(file_inode(file));
|
||||
+ priv = (struct atm_priv *)pde_data(file_inode(file));
|
||||
|
||||
if (!access_ok(buf, count))
|
||||
return -EFAULT;
|
||||
@@ -2238,7 +2238,7 @@
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
- priv = (struct atm_priv *)PDE_DATA(file_inode(file));
|
||||
+ priv = (struct atm_priv *)pde_data(file_inode(file));
|
||||
if (priv == NULL) {
|
||||
pr_err("%s: Invalid private data\n", __func__);
|
||||
return -EINVAL;
|
||||
@@ -2266,7 +2266,7 @@
|
||||
static int proc_read_atm_wanmib_seq_open(struct inode *inode,
|
||||
struct file *file)
|
||||
{
|
||||
- return single_open(file, proc_read_atm_wanmib, PDE_DATA(inode));
|
||||
+ return single_open(file, proc_read_atm_wanmib, pde_data(inode));
|
||||
}
|
||||
|
||||
|
||||
@@ -2281,7 +2281,7 @@
|
||||
|
||||
static int proc_read_htu_seq_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
- return single_open(file, proc_read_htu, PDE_DATA(inode));
|
||||
+ return single_open(file, proc_read_htu, pde_data(inode));
|
||||
}
|
||||
|
||||
static const struct proc_ops htu_proc_fops = {
|
||||
@@ -2293,7 +2293,7 @@
|
||||
|
||||
static int proc_read_queue_seq_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
- return single_open(file, proc_read_queue, PDE_DATA(inode));
|
||||
+ return single_open(file, proc_read_queue, pde_data(inode));
|
||||
}
|
||||
|
||||
static const struct proc_ops queue_proc_fops = {
|
||||
@@ -2350,7 +2350,7 @@
|
||||
p1 = local_buf;
|
||||
|
||||
num = vrx_split_buffer(local_buf, param_list, ARRAY_SIZE(param_list));
|
||||
- priv = (struct atm_priv *)PDE_DATA(file_inode(file));
|
||||
+ priv = (struct atm_priv *)pde_data(file_inode(file));
|
||||
if (vrx_strcmpi(param_list[0], "help") == 0)
|
||||
goto proc_atm_prio_help;
|
||||
else if (vrx_strcmpi(param_list[0], "pvc") == 0) {
|
||||
@@ -2513,7 +2513,7 @@
|
||||
|
||||
static int proc_atm_read_prio_seq_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
- return single_open(file, proc_atm_read_prio, PDE_DATA(inode));
|
||||
+ return single_open(file, proc_atm_read_prio, pde_data(inode));
|
||||
}
|
||||
|
||||
static const struct seq_operations pvc_mib_seq_ops = {
|
||||
@@ -2536,7 +2536,7 @@
|
||||
int ret = seq_open(file, &pvc_mib_seq_ops);
|
||||
if (ret == 0) {
|
||||
struct seq_file *m = file->private_data;
|
||||
- m->private = PDE_DATA(inode);
|
||||
+ m->private = pde_data(inode);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -2574,7 +2574,7 @@
|
||||
local_buf[len] = 0;
|
||||
|
||||
num = vrx_split_buffer(local_buf, param_list, ARRAY_SIZE(param_list));
|
||||
- priv = (struct atm_priv *)PDE_DATA(file_inode(file));
|
||||
+ priv = (struct atm_priv *)pde_data(file_inode(file));
|
||||
if (priv == NULL) {
|
||||
pr_err("<%s>: Invalid private data\n", __func__);
|
||||
return count;
|
Loading…
Add table
Add a link
Reference in a new issue