Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sllin module does not compile with Linux kernel >= 4.11.9 #2

Closed
knezicm opened this issue Apr 27, 2018 · 6 comments
Closed

sllin module does not compile with Linux kernel >= 4.11.9 #2

knezicm opened this issue Apr 27, 2018 · 6 comments

Comments

@knezicm
Copy link

knezicm commented Apr 27, 2018

Due to the change in net_device structure in Linux kernel >= 4.11.9, sllin module does not compile ('destructor' field cannot be found). I applied a patch described in https://patchwork.kernel.org/patch/9826595/. However, now the reported errors are:

/home/pi/linux-lin/sllin/sllin.c: In function ‘sllin_kwthread’:
/home/pi/linux-lin/sllin/sllin.c:1175:2: error: unknown type name ‘sched_param’
sched_param schparam = { .sched_priority = 40 };
^~~~~~~~~~~

home/pi/linux-lin/sllin/sllin.c:1175:27: error: field name not in record or union initializer
sched_param schparam = { .sched_priority = 40 };
^

/home/pi/linux-lin/sllin/sllin.c:1183:42: error: passing argument 3 of ‘sched_setscheduler’ from incompatible pointer type [-Werror=incompatible-pointer-types]
sched_setscheduler(current, SCHED_FIFO, &schparam);
^

@knezicm
Copy link
Author

knezicm commented Apr 27, 2018

It seems that in recent Linux kernels (I am not sure from which version), struct sched_param has been moved from linux/sched.h to uapi/linux/sched/types.h, so that include part has to be updated in sllin.c accordingly.

Also, note that line discipline 25 is reserved for NFC NCI UART in recent kernel versions.

@knezicm
Copy link
Author

knezicm commented Apr 27, 2018

Here is the patch for the aforementioned changes.
recent-kernels-workaround.patch.txt

@ppisa
Copy link
Member

ppisa commented Aug 26, 2021

Thanks for the report. It would be great if the changes use LINUX_VERSION_CODE to allow compilation even for older kernels. I would keep at least 4.4 support still available to support Civil Infrastructure Platform supported LTS kernels. In the fact above mentioned problems seems to be solved in sl-lin "mainline"/repo of one of initial authors in 2019

ppisa@74347c3

It is little unfortunate that we have used GIT repo outside GitHub then I have found that trainman419 setup repo on GitHub without notice to us and it has been forked by many other people. Because our mainline has not been followed, I have created own fork of this repo on GitHub to at least point users to the progress by Insight Networking. So, please check state in my repo https://github.com/ppisa/linux-lin which I try to maintain, mostly in spare time, I have no actual LIN project now.

As for the line discipline collision, we need to register that into mainline and even push the project into mainline. But it depends on the some statistics and reports that our project is really in use which would backup mainlining.

@trainman419
Copy link
Collaborator

@ppisa oh hai.

Yes, I set up a mirror on github because it seemed the original project was stalled and I had to make some changes to get it to compile. It's actually been kind of annoying to have people forking and reporting bugs against a repo that I just have a mirror.

I'd be happy to transfer ownership of this repo to you if you'd like.

@ppisa
Copy link
Member

ppisa commented Aug 27, 2021

Thanks for the response. I propose to unite forces and guide all users and people willing to contribute to the single place https://github.com/lin-bus . I move my wiki there as well https://github.com/ppisa/linux-lin/wiki . More thoughts in #4

@kbader94 kbader94 linked a pull request Aug 29, 2021 that will close this issue
@ppisa
Copy link
Member

ppisa commented Sep 1, 2021

The changes based on my branch and kbader94 followup work and testing for 5.10.17 kernel committed to mainline.

@ppisa ppisa closed this as completed Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants