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 compile the driver on 22.04 LTS #3

Open
mscheltienne opened this issue Mar 23, 2023 · 0 comments
Open

Can't compile the driver on 22.04 LTS #3

mscheltienne opened this issue Mar 23, 2023 · 0 comments

Comments

@mscheltienne
Copy link

This card is driving me mad.. I can not get it to work on Linux (POP_OS 22.04 LTS).

Using this repository, sudo make raises:

rm -f *.mod.c *.o *.ko .*.cmd *.symvers
make -C /lib/modules/6.2.6-76060206-generic/build/   M=/home/scheltie/Downloads/asix_ax99100_linux-master modules
make[1]: Entering directory '/usr/src/linux-headers-6.2.6-76060206-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0
  You are using:           gcc-12 (Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0
  CC [M]  /home/scheltie/Downloads/asix_ax99100_linux-master/ax99100_spi.o
/home/scheltie/Downloads/asix_ax99100_linux-master/ax99100_spi.c:86:27: error: initialization of ‘char * (*)(const struct device *, umode_t *)’ {aka ‘char * (*)(const struct device *, short unsigned int *)’} from incompatible pointer type ‘char * (*)(struct device *, umode_t *)’ {aka ‘char * (*)(struct device *, short unsigned int *)’} [-Werror=incompatible-pointer-types]
   86 |         .devnode        = ax_devnode,
      |                           ^~~~~~~~~~
/home/scheltie/Downloads/asix_ax99100_linux-master/ax99100_spi.c:86:27: note: (near initialization for ‘ax_spi_class.devnode’)
/home/scheltie/Downloads/asix_ax99100_linux-master/ax99100_spi.c: In function ‘spi99100_remove_one’:
/home/scheltie/Downloads/asix_ax99100_linux-master/ax99100_spi.c:395:9: error: implicit declaration of function ‘pci_free_consistent’ [-Werror=implicit-function-declaration]
  395 |         pci_free_consistent(dev, DMA_BUFFER_SZ, axspi->tx_dma_v,axspi->tx_dma_p);
      |         ^~~~~~~~~~~~~~~~~~~
/home/scheltie/Downloads/asix_ax99100_linux-master/ax99100_spi.c: In function ‘init_local_data’:
/home/scheltie/Downloads/asix_ax99100_linux-master/ax99100_spi.c:463:25: error: implicit declaration of function ‘pci_alloc_consistent’ [-Werror=implicit-function-declaration]
  463 |                 (char *)pci_alloc_consistent(dev,DMA_BUFFER_SZ,&axspi->tx_dma_p);
      |                         ^~~~~~~~~~~~~~~~~~~~
/home/scheltie/Downloads/asix_ax99100_linux-master/ax99100_spi.c:463:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  463 |                 (char *)pci_alloc_consistent(dev,DMA_BUFFER_SZ,&axspi->tx_dma_p);
      |                 ^
/home/scheltie/Downloads/asix_ax99100_linux-master/ax99100_spi.c:471:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  471 |                 (char *)pci_alloc_consistent(dev,DMA_BUFFER_SZ,&axspi->rx_dma_p);
      |                 ^
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:252: /home/scheltie/Downloads/asix_ax99100_linux-master/ax99100_spi.o] Error 1
make[1]: *** [Makefile:2021: /home/scheltie/Downloads/asix_ax99100_linux-master] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.2.6-76060206-generic'
make: *** [Makefile:41: default] Error 2

Any idea? I am not very experienced with compiling softwares..

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

No branches or pull requests

1 participant