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

Can't receive data [was: Can't compile] #1

Open
Najsr opened this issue Oct 31, 2020 · 11 comments
Open

Can't receive data [was: Can't compile] #1

Najsr opened this issue Oct 31, 2020 · 11 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Najsr
Copy link

Najsr commented Oct 31, 2020

Hello,

I can't get this driver to compile it throws this error:
Kernel version: 4.19.0-10-amd64

make -C /lib/modules/4.19.0-10-amd64/build M=/home/user/cp210x modules
make[1]: Entering directory '/usr/src/linux-headers-4.19.0-10-amd64'
  CC [M]  /home/user/cp210x/cp210x.o
/home/user/cp210x/cp210x.c: In functioncp210x_get_tx_queue_byte_count’:
/home/user/cp210x/cp210x.c:703:26: error: dereferencing pointer to incomplete typestruct cp210x_comm_statussts = kmalloc(sizeof(*sts), GFP_KERNEL);
                          ^~~~
/home/user/cp210x/cp210x.c: In functioncp210x_get_termios_port’:
/home/user/cp210x/cp210x.c:781:9: error: passing argument 5 ofcp210x_get_configfrom incompatible pointer type [-Werror=incompatible-pointer-types]
         &bits, 2);
         ^~~~~
/home/user/cp210x/cp210x.c:389:42: note: expected ‘unsigned int *but argument is of typeu16 *’ {aka ‘short unsigned int *’}
     u8 request, int value, unsigned int *data, unsigned int size) {
                            ~~~~~~~~~~~~~~^~~~
/home/user/cp210x/cp210x.c: In functioncp210x_set_termios’:
/home/user/cp210x/cp210x.c:941:37: error: passing argument 5 ofcp210x_get_configfrom incompatible pointer type [-Werror=incompatible-pointer-types]
             CP210X_GET_LINE_CTL, 0, &bits, 2);
                                     ^~~~~
/home/user/cp210x/cp210x.c:389:42: note: expected ‘unsigned int *but argument is of typeu16 *’ {aka ‘short unsigned int *’}
     u8 request, int value, unsigned int *data, unsigned int size) {
                            ~~~~~~~~~~~~~~^~~~
/home/user/cp210x/cp210x.c:982:37: error: passing argument 5 ofcp210x_get_configfrom incompatible pointer type [-Werror=incompatible-pointer-types]
             CP210X_GET_LINE_CTL, 0, &bits, 2);
                                     ^~~~~
/home/user/cp210x/cp210x.c:389:42: note: expected ‘unsigned int *but argument is of typeu16 *’ {aka ‘short unsigned int *’}
     u8 request, int value, unsigned int *data, unsigned int size) {
                            ~~~~~~~~~~~~~~^~~~
/home/user/cp210x/cp210x.c:1009:37: error: passing argument 5 ofcp210x_get_configfrom incompatible pointer type [-Werror=incompatible-pointer-types]
             CP210X_GET_LINE_CTL, 0, &bits, 2);
                                     ^~~~~
/home/user/cp210x/cp210x.c:389:42: note: expected ‘unsigned int *but argument is of typeu16 *’ {aka ‘short unsigned int *’}
     u8 request, int value, unsigned int *data, unsigned int size) {
                            ~~~~~~~~~~~~~~^~~~
/home/user/cp210x/cp210x.c: In functioncp210x_tiocmget’:
/home/user/cp210x/cp210x.c:1099:31: error: passing argument 5 ofcp210x_get_configfrom incompatible pointer type [-Werror=incompatible-pointer-types]
         CP210X_GET_MDMSTS, 0, &control, 1);
                               ^~~~~~~~
/home/user/cp210x/cp210x.c:389:42: note: expected ‘unsigned int *but argument is of typeu8 *’ {aka ‘unsigned char *’}
     u8 request, int value, unsigned int *data, unsigned int size) {
                            ~~~~~~~~~~~~~~^~~~
/home/user/cp210x/cp210x.c: In functioncp210x_process_read_urb’:
/home/user/cp210x/cp210x.c:1238:20: warning: unused variablemax_packet_size’ [-Wunused-variable]
     unsigned short max_packet_size = 128;
                    ^~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[4]: *** [/usr/src/linux-headers-4.19.0-10-common/scripts/Makefile.build:315: /home/user/cp210x/cp210x.o] Error 1
make[3]: *** [/usr/src/linux-headers-4.19.0-10-common/Makefile:1545: _module_/home/user/cp210x] Error 2
make[2]: *** [Makefile:146: sub-make] Error 2
make[1]: *** [Makefile:8: all] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.19.0-10-amd64'
make: *** [Makefile:5: all] Error 2

Could you please help me to make it compile successfully?

@therealbstern
Copy link
Contributor

therealbstern commented Nov 3, 2020

Please try the most recent commits (as in, update to the new HEAD here).

@therealbstern therealbstern added the fixed? Patch applied, awaiting confirmation label Nov 3, 2020
@Najsr
Copy link
Author

Najsr commented Nov 4, 2020

Hey,
thanks for the fixes.
The code compiles fine but the driver does not seem to do anything. DCD pin is always HIGH.
I tried to monitor the port with ldattach 18 but the connection times out. I tried to manually change the DCD signal while monitoring via the ldattach and I get the same result.

@therealbstern
Copy link
Contributor

I suspect the underlying USB serial code has changed too much. I'll see if I can lift the changes against the old driver to the new driver instead.

@therealbstern
Copy link
Contributor

Please try the HEAD of the 4.19.154!

@Najsr
Copy link
Author

Najsr commented Nov 10, 2020

Hey, sorry for the late response. The driver still does not work even with the correct branch

@Najsr
Copy link
Author

Najsr commented Nov 10, 2020

I tried to send data with it and it works OK, but receiving does not work so there could be the core issue

@therealbstern
Copy link
Contributor

☹️ I'm sorry to hear it. There's obviously something the matter; if you're willing to keep trying, I can crank up some debugging information, but I don't want you to waste your time.

I don't have any of this hardware right now, so I can't test the changes myself.

@therealbstern therealbstern added bug Something isn't working and removed fixed? Patch applied, awaiting confirmation labels Nov 11, 2020
@therealbstern therealbstern changed the title Can't compile Can't receive data Nov 11, 2020
@therealbstern therealbstern changed the title Can't receive data Can't receive data [was: Can't compile] Nov 11, 2020
@Najsr
Copy link
Author

Najsr commented Nov 11, 2020

I don't really mind testing it. I'll leave it up to you if you want to continue tinkering with the driver.

@therealbstern
Copy link
Contributor

therealbstern commented Nov 21, 2020

I haven't forgotten this, I've just been swamped at work.

@therealbstern
Copy link
Contributor

Still swamped, still intending to get to as soon as practical.

@therealbstern therealbstern added the help wanted Extra attention is needed label Jun 1, 2021
@therealbstern
Copy link
Contributor

Still swamped but this is a real problem that deserves attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants