[asterisk-bugs] [JIRA] (DAHLIN-394) DAHDI with CONFIG_DAHDI_NET fails to compile with kernels >= 5.14

Martin Hauke (JIRA) noreply at issues.asterisk.org
Sun Nov 28 14:27:34 CST 2021


     [ https://issues.asterisk.org/jira/browse/DAHLIN-394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Hauke updated DAHLIN-394:
--------------------------------

    Description: 
Since the "split out ndo_siowandev ioctl" changset in the upstream kernel  from July DAHDI with CONFIG_DAHDI_NET fails to compile:
https://www.spinics.net/lists/netdev/msg755198.html

{code}
make -C /lib/modules/5.15.3-1-default/build M=/home/mhauke/tmp/DAHDI/linux/drivers/dahdi DAHDI_INCLUDE=/home/mhauke/tmp/DAHDI/linux/include DAHDI_MODULES_EXTRA=" " HOTPLUG_FIRMWARE=yes modules DAHDI_BUILD_ALL=m
make[1]: Verzeichnis „/usr/src/linux-5.15.3-1-obj/x86_64/default“ wird betreten
  CC [M]  /home/mhauke/tmp/DAHDI/linux/drivers/dahdi/dahdi-base.o
>>>> This is the error Harald's patch fixed
>>>> /home/mhauke/tmp/DAHDI/linux/drivers/dahdi/dahdi-base.c: In function ‘dahdi_xmit’:
>>>> /home/mhauke/tmp/DAHDI/linux/drivers/dahdi/dahdi-base.c:2139:20: error: ‘struct net_device’ has no member named >>>> ‘trans_start’
>>>>  2139 |                 dev->trans_start = jiffies;
>>>>      |                    ^~
/home/mhauke/tmp/DAHDI/linux/drivers/dahdi/dahdi-base.c: In function ‘dahdi_net_ioctl’:
/home/mhauke/tmp/DAHDI/linux/drivers/dahdi/dahdi-base.c:2153:32: error: passing argument 2 of ‘hdlc_ioctl’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 2153 |         return hdlc_ioctl(dev, ifr, cmd);
      |                                ^~~
      |                                |
      |                                struct ifreq *
In file included from /home/mhauke/tmp/DAHDI/linux/include/dahdi/kernel.h:48,
                 from /home/mhauke/tmp/DAHDI/linux/drivers/dahdi/dahdi-base.c:64:
/usr/src/linux-5.15.3-1/include/linux/hdlc.h:57:60: note: expected ‘struct if_settings *’ but argument is of type ‘struct ifreq *’
   57 | int hdlc_ioctl(struct net_device *dev, struct if_settings *ifs);
      |                                        ~~~~~~~~~~~~~~~~~~~~^~~
/home/mhauke/tmp/DAHDI/linux/drivers/dahdi/dahdi-base.c:2153:16: error: too many arguments to function ‘hdlc_ioctl’
 2153 |         return hdlc_ioctl(dev, ifr, cmd);
      |                ^~~~~~~~~~
In file included from /home/mhauke/tmp/DAHDI/linux/include/dahdi/kernel.h:48,
                 from /home/mhauke/tmp/DAHDI/linux/drivers/dahdi/dahdi-base.c:64:
/usr/src/linux-5.15.3-1/include/linux/hdlc.h:57:5: note: declared here
   57 | int hdlc_ioctl(struct net_device *dev, struct if_settings *ifs);
      |     ^~~~~~~~~~
{code}

  was:
Since the "split out ndo_siowandev ioctl" changset in the upstream kernel  from July DAHDI with CONFIG_DAHDI_NET fails to compile:
https://www.spinics.net/lists/netdev/msg755198.html

{code}
make -C /lib/modules/5.15.3-1-default/build M=/home/mhauke/tmp/DAHDI/linux/drivers/dahdi DAHDI_INCLUDE=/home/mhauke/tmp/DAHDI/linux/include DAHDI_MODULES_EXTRA=" " HOTPLUG_FIRMWARE=yes modules DAHDI_BUILD_ALL=m
make[1]: Verzeichnis „/usr/src/linux-5.15.3-1-obj/x86_64/default“ wird betreten
  CC [M]  /home/mhauke/tmp/DAHDI/linux/drivers/dahdi/dahdi-base.o
/home/mhauke/tmp/DAHDI/linux/drivers/dahdi/dahdi-base.c: In function ‘dahdi_xmit’:
/home/mhauke/tmp/DAHDI/linux/drivers/dahdi/dahdi-base.c:2139:20: error: ‘struct net_device’ has no member named ‘trans_start’
 2139 |                 dev->trans_start = jiffies;
      |                    ^~
/home/mhauke/tmp/DAHDI/linux/drivers/dahdi/dahdi-base.c: In function ‘dahdi_net_ioctl’:
/home/mhauke/tmp/DAHDI/linux/drivers/dahdi/dahdi-base.c:2153:32: error: passing argument 2 of ‘hdlc_ioctl’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 2153 |         return hdlc_ioctl(dev, ifr, cmd);
      |                                ^~~
      |                                |
      |                                struct ifreq *
In file included from /home/mhauke/tmp/DAHDI/linux/include/dahdi/kernel.h:48,
                 from /home/mhauke/tmp/DAHDI/linux/drivers/dahdi/dahdi-base.c:64:
/usr/src/linux-5.15.3-1/include/linux/hdlc.h:57:60: note: expected ‘struct if_settings *’ but argument is of type ‘struct ifreq *’
   57 | int hdlc_ioctl(struct net_device *dev, struct if_settings *ifs);
      |                                        ~~~~~~~~~~~~~~~~~~~~^~~
/home/mhauke/tmp/DAHDI/linux/drivers/dahdi/dahdi-base.c:2153:16: error: too many arguments to function ‘hdlc_ioctl’
 2153 |         return hdlc_ioctl(dev, ifr, cmd);
      |                ^~~~~~~~~~
In file included from /home/mhauke/tmp/DAHDI/linux/include/dahdi/kernel.h:48,
                 from /home/mhauke/tmp/DAHDI/linux/drivers/dahdi/dahdi-base.c:64:
/usr/src/linux-5.15.3-1/include/linux/hdlc.h:57:5: note: declared here
   57 | int hdlc_ioctl(struct net_device *dev, struct if_settings *ifs);
      |     ^~~~~~~~~~
{code}


> DAHDI with CONFIG_DAHDI_NET fails to compile with kernels >= 5.14
> -----------------------------------------------------------------
>
>                 Key: DAHLIN-394
>                 URL: https://issues.asterisk.org/jira/browse/DAHLIN-394
>             Project: DAHDI-Linux
>          Issue Type: Bug
>      Security Level: None
>          Components: General
>    Affects Versions: 3.1.0
>         Environment: openSUSE Tumbleweed, kernel 5.15.3, gcc 11.2.1
>            Reporter: Martin Hauke
>            Assignee: Duncan Patterson
>            Severity: Major
>
> Since the "split out ndo_siowandev ioctl" changset in the upstream kernel  from July DAHDI with CONFIG_DAHDI_NET fails to compile:
> https://www.spinics.net/lists/netdev/msg755198.html
> {code}
> make -C /lib/modules/5.15.3-1-default/build M=/home/mhauke/tmp/DAHDI/linux/drivers/dahdi DAHDI_INCLUDE=/home/mhauke/tmp/DAHDI/linux/include DAHDI_MODULES_EXTRA=" " HOTPLUG_FIRMWARE=yes modules DAHDI_BUILD_ALL=m
> make[1]: Verzeichnis „/usr/src/linux-5.15.3-1-obj/x86_64/default“ wird betreten
>   CC [M]  /home/mhauke/tmp/DAHDI/linux/drivers/dahdi/dahdi-base.o
> >>>> This is the error Harald's patch fixed
> >>>> /home/mhauke/tmp/DAHDI/linux/drivers/dahdi/dahdi-base.c: In function ‘dahdi_xmit’:
> >>>> /home/mhauke/tmp/DAHDI/linux/drivers/dahdi/dahdi-base.c:2139:20: error: ‘struct net_device’ has no member named >>>> ‘trans_start’
> >>>>  2139 |                 dev->trans_start = jiffies;
> >>>>      |                    ^~
> /home/mhauke/tmp/DAHDI/linux/drivers/dahdi/dahdi-base.c: In function ‘dahdi_net_ioctl’:
> /home/mhauke/tmp/DAHDI/linux/drivers/dahdi/dahdi-base.c:2153:32: error: passing argument 2 of ‘hdlc_ioctl’ from incompatible pointer type [-Werror=incompatible-pointer-types]
>  2153 |         return hdlc_ioctl(dev, ifr, cmd);
>       |                                ^~~
>       |                                |
>       |                                struct ifreq *
> In file included from /home/mhauke/tmp/DAHDI/linux/include/dahdi/kernel.h:48,
>                  from /home/mhauke/tmp/DAHDI/linux/drivers/dahdi/dahdi-base.c:64:
> /usr/src/linux-5.15.3-1/include/linux/hdlc.h:57:60: note: expected ‘struct if_settings *’ but argument is of type ‘struct ifreq *’
>    57 | int hdlc_ioctl(struct net_device *dev, struct if_settings *ifs);
>       |                                        ~~~~~~~~~~~~~~~~~~~~^~~
> /home/mhauke/tmp/DAHDI/linux/drivers/dahdi/dahdi-base.c:2153:16: error: too many arguments to function ‘hdlc_ioctl’
>  2153 |         return hdlc_ioctl(dev, ifr, cmd);
>       |                ^~~~~~~~~~
> In file included from /home/mhauke/tmp/DAHDI/linux/include/dahdi/kernel.h:48,
>                  from /home/mhauke/tmp/DAHDI/linux/drivers/dahdi/dahdi-base.c:64:
> /usr/src/linux-5.15.3-1/include/linux/hdlc.h:57:5: note: declared here
>    57 | int hdlc_ioctl(struct net_device *dev, struct if_settings *ifs);
>       |     ^~~~~~~~~~
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list