-
Notifications
You must be signed in to change notification settings - Fork 5
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
Module won't compile on 5.13.13 #1
Comments
Yes. Not only macros have been reworked. There has also been added a functionality to retrieve raw DLC values from Classical CAN controllers (aka len8_dlc). So the macro improvements have to been adapted and it should be checked if the gs_usb_fd controller supports len8_dlc for Classical CAN. FYI the mainline gs_usb.c driver supports it: |
With fairly minor changes, I've managed to get this driver to compile & work nicely under 5.11.0:
|
For 5.14 there are 3 more changes necessary:
|
Are you sure |
Yes, torvalds/linux@cc69837 introduced this also in the upstream gs_usb.c driver, because it was removed as implicit include through netdevice.h. |
For example enum ethtool_phys_id_state is defined in ethtool.h. |
Hm, that's interesting! Seems to be the only CAN driver using this include ... Thanks! |
Hi @hartkopp, would you mind taking a peek at https://github.com/pfink-christ/net-next/tree/canfd-mainline-conservative-rc2? I don't completely like the idea of only sending parts of the gs_host_frame in case of classical candlelight or if the workaround is not used, but the alternative would be to use at least two different gs_host_frame structs and then quite some parts of the driver would have to be rewritten to cope with that. What do you think? |
Hi @pfink-christ , The best way to discuss these patches is to post them with |
Looks like the CAN interface changed a bit--a couple macros have disappeared and some function prototypes changed.
Snippet of compile output:
/home/ethanzonca/Projects/gs_usb_fd/gs_usb_fd.c: In function ‘gs_usb_receive_bulk_callback’:
/home/ethanzonca/Projects/gs_usb_fd/gs_usb_fd.c:342:36: error: implicit declaration of function ‘can_dlc2len’; did you mean ‘can_fd_dlc2len’? [-Werror=implicit-function-declaration]
342 | cfd->len = can_dlc2len(hf->can_dlc);
| ^~~~~~~~~~~
| can_fd_dlc2len
/home/ethanzonca/Projects/gs_usb_fd/gs_usb_fd.c:355:39: error: implicit declaration of function ‘get_can_dlc’ [-Werror=implicit-function-declaration]
355 | cf->can_dlc = get_can_dlc(hf->can_dlc);
| ^~~~~~~~~~~
/home/ethanzonca/Projects/gs_usb_fd/gs_usb_fd.c:388:17: error: too few arguments to function ‘can_get_echo_skb’
388 | can_get_echo_skb(netdev, hf->echo_id);
| ^~~~~~~~~~~~~~~~
In file included from ./include/linux/can/dev.h:23,
from /home/ethanzonca/Projects/gs_usb_fd/gs_usb_fd.c:19:
The text was updated successfully, but these errors were encountered: