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

alx drivers fails to build in 3.7.x Arch linux kernel for device AR8161 #2

Open
hadrons123 opened this Issue Jan 26, 2013 · 14 comments

Comments

Projects
None yet
5 participants
@hadrons123
Copy link

hadrons123 commented Jan 26, 2013

alx drivers doesnt build in in 3.7.4 kernel.
make
./scripts/gen-compat-autoconf.sh /home/flexible/Downloads/compat-wireless-2012-12-18-p/.config /home/flexible/Downloads/compat-wireless-2012-12-18-p/config.mk > include/linux/compat_autoconf.h
make -C /lib/modules/3.7.4-1-ARCH/build M=/home/flexible/Downloads/compat-wireless-2012-12-18-p modules
make[1]: Entering directory /usr/src/linux-3.7.4-1-ARCH' CC [M] /home/flexible/Downloads/compat-wireless-2012-12-18-p/compat/main.o CC [M] /home/flexible/Downloads/compat-wireless-2012-12-18-p/compat/compat-3.8.o LD [M] /home/flexible/Downloads/compat-wireless-2012-12-18-p/compat/compat.o scripts/Makefile.build:44: /home/flexible/Downloads/compat-wireless-2012-12-18-p/drivers/net/ethernet/atheros/alx/Makefile: No such file or directory make[4]: *** No rule to make target/home/flexible/Downloads/compat-wireless-2012-12-18-p/drivers/net/ethernet/atheros/alx/Makefile'. Stop.
make[3]: *** [/home/flexible/Downloads/compat-wireless-2012-12-18-p/drivers/net/ethernet/atheros/alx] Error 2
make[2]: *** [/home/flexible/Downloads/compat-wireless-2012-12-18-p/drivers/net/ethernet/atheros] Error 2
make[1]: *** [module/home/flexible/Downloads/compat-wireless-2012-12-18-p] Error 2
make[1]: Leaving directory `/usr/src/linux-3.7.4-1-ARCH'
make: *** [modules] Error 2
[root@arch compat-wireless-2012-12-18-p]#

Any idea how to handle this?

@mishudark

This comment has been minimized.

Copy link

mishudark commented Feb 5, 2013

I have the same problem

@ivansyi

This comment has been minimized.

Copy link

ivansyi commented Feb 7, 2013

The same issue on Fedora 18 with kernel 3.7.4-204.fc18.x86_64.

The workaround is:
download the latest version compat-drivers-2013-02-03.tar.gz and then copy the alx driver from old release:
"cp compat-wireless-3.6.6-1/drivers/net/ethernet/atheros/alx compat-drivers-2013-02-03/drivers/net/ethernet/atheros/"
then run "./script/driver-select alx" and "make & make install".

It works on my Fedora 18.

@hadrons123

This comment has been minimized.

Copy link
Author

hadrons123 commented Feb 7, 2013

where did you get the compat-drivers-2013-02-03 ? I couldn't find it. please can you provide me the link?

@ivansyi

This comment has been minimized.

Copy link

ivansyi commented Feb 7, 2013

Just find that at daily release:

http://www.kernel.org/pub/linux/kernel/projects/backports/2013/02/02/

-Shunli

On 02/07/2013 10:34 PM, hadrons123 wrote:

where did you get the compat-drivers-2013-02-03 ? I couldn't find it.
please can you provide me the link?


Reply to this email directly or view it on GitHub
#2 (comment).

@hadrons123

This comment has been minimized.

Copy link
Author

hadrons123 commented Feb 7, 2013

Thanks for the link. But in arch linux it doesn't work the way I am trying.
I 'm not sure what else I could do. this is the error.
make: *** /lib/modules/3.7.4-1-ARCH/build: No such file or directory. Stop.
make: *** [modules] Error 2

@hadrons123

This comment has been minimized.

Copy link
Author

hadrons123 commented Feb 7, 2013

Tried with a different kernel. Different error with warning. Couldn't make out what it means.

cc1: some warnings being treated as errors
make[4]: *** [/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.o] Error 1
make[3]: *** [/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx] Error 2
make[2]: *** [/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros] Error 2
make[1]: *** [module/home/freedom/Downloads/compat-drivers-2013-02-03] Error 2
make[1]: Leaving directory `/usr/src/linux-3.7.5-2-ck'
make: *** [modules] Error 2

@mishudark

This comment has been minimized.

Copy link

mishudark commented Feb 7, 2013

Ensure you have linux-headers installed

mishudark
Enviado con Sparrow (http://www.sparrowmailapp.com/?sig)

El jueves, 7 de febrero de 2013 a las 10:06, hadrons123 escribió:

Thanks for the link. But in arch linux it doesn't work the way I am trying.
I 'm not sure what else I could do. this is the error.
make: *** /lib/modules/3.7.4-1-ARCH/build: No such file or directory. Stop.
make: *** [modules] Error 2


Reply to this email directly or view it on GitHub (#2 (comment)).

@hadrons123

This comment has been minimized.

Copy link
Author

hadrons123 commented Feb 7, 2013

That's what I thought first and tried with a custom kernel from https://aur.archlinux.org/packages/linux-ck/ which has headers installed. I 'm not sure if any patches in the this CK kernel is preventing the build process.

@mishudark

This comment has been minimized.

Copy link

mishudark commented Feb 7, 2013

In the arch forum I saw that could be solved with kernel 3.8 rc, but I'm not sure.

mishudark
Enviado con Sparrow (http://www.sparrowmailapp.com/?sig)

El jueves, 7 de febrero de 2013 a las 10:25, hadrons123 escribió:

That's what I thought first and tried with a custom kernel from https://aur.archlinux.org/packages/linux-ck/ which has headers installed. I 'm not sure if any patches in the this CK kernel is preventing the build process.


Reply to this email directly or view it on GitHub (#2 (comment)).

@ivansyi

This comment has been minimized.

Copy link

ivansyi commented Feb 8, 2013

If you encountered an "Wanning As Error" about __netdev_printk(), following
is my workaround:
Just comment that function call and replace it with the else code:

if (hw && hw->adpt && hw->adpt->netdev)
    //__netdev_printk(level, hw->adpt->netdev, &vaf);
    printk("%salx_hw: %pV", level, &vaf);
else
    printk("%salx_hw: %pV", level, &vaf);

I know this don't solve this issue actually, but anyway, the
__netdev_printk() is doing the same with printk.

So, nothing functionality impacts (just want to driver the NIC card).

-Shunli

On 8 February 2013 01:10, mishudark notifications@github.com wrote:

In the arch forum I saw that could be solved with kernel 3.8 rc, but I'm
not sure.

mishudark
Enviado con Sparrow (http://www.sparrowmailapp.com/?sig)

El jueves, 7 de febrero de 2013 a las 10:25, hadrons123 escribió:

That's what I thought first and tried with a custom kernel from
https://aur.archlinux.org/packages/linux-ck/ which has headers installed.
I 'm not sure if any patches in the this CK kernel is preventing the build
process.


Reply to this email directly or view it on GitHub (
#2 (comment)).


Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-13246683.

Thanks!

Yi Shunli

@hadrons123

This comment has been minimized.

Copy link
Author

hadrons123 commented Feb 8, 2013

Now I am trying with mainline kernel and thanks for your tip. I got past the first error. But I still have some more errors.
[root@arch compat-drivers-2013-02-03]# make
make -C /lib/modules/3.8.0-1-mainline/build M=/home/freedom/Downloads/compat-drivers-2013-02-03 modules
make[1]: Entering directory /usr/src/linux-3.8.0-1-mainline' CC [M] /home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.o /home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:1962:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘alx_init_adapter_special’ /home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:2017:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘alx_init_adapter’ /home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:3479:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘alx_init’ /home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:3787:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘alx_remove’ /home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:3910:17: error: ‘alx_init’ undeclared here (not in a function) /home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:3911:2: error: implicit declaration of function ‘__devexit_p’ [-Werror=implicit-function-declaration] /home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:3911:29: error: ‘alx_remove’ undeclared here (not in a function) /home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:142:12: warning: ‘alx_validate_mac_addr’ defined but not used [-Wunused-function] /home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:217:12: warning: ‘alx_init_hw_callbacks’ defined but not used [-Wunused-function] /home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:1705:12: warning: ‘alx_alloc_all_rtx_queue’ defined but not used [-Wunused-function] /home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:1764:13: warning: ‘alx_free_all_rtx_queue’ defined but not used [-Wunused-function] /home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:1780:12: warning: ‘alx_set_interrupt_param’ defined but not used [-Wunused-function] /home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:1831:13: warning: ‘alx_reset_interrupt_param’ defined but not used [-Wunused-function] /home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:1921:12: warning: ‘alx_set_interrupt_mode’ defined but not used [-Wunused-function] /home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:1948:13: warning: ‘alx_reset_interrupt_mode’ defined but not used [-Wunused-function] /home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:2132:12: warning: ‘alx_set_register_info_special’ defined but not used [-Wunused-function] /home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:3050:13: warning: ‘alx_timer_routine’ defined but not used [-Wunused-function] /home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c:3071:13: warning: ‘alx_task_routine’ defined but not used [-Wunused-function] cc1: some warnings being treated as errors make[4]: *** [/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.o] Error 1 make[3]: *** [/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx] Error 2 make[2]: *** [/home/freedom/Downloads/compat-drivers-2013-02-03/drivers/net/ethernet/atheros] Error 2 make[1]: *** [_module_/home/freedom/Downloads/compat-drivers-2013-02-03] Error 2 make[1]: Leaving directory/usr/src/linux-3.8.0-1-mainline'
make: *** [modules] Error 2
[root@arch compat-drivers-2013-02-03]#

@hadrons123

This comment has been minimized.

Copy link
Author

hadrons123 commented Feb 8, 2013

Ok, I got back to 3.7.4 kernel and it worked with your tip. thank you.

@reflectivedevelopment

This comment has been minimized.

Copy link

reflectivedevelopment commented Mar 3, 2013

This works for me.

diff -r compat-wireless-2012-03-12-p/drivers/net/ethernet/atheros/alx/alx_main.c compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c
1961c1961
< static int __devinit alx_init_adapter_special(struct alx_adapter *adpt)
---
> static int alx_init_adapter_special(struct alx_adapter *adpt)
2016c2016
< static int __devinit alx_init_adapter(struct alx_adapter *adpt)
---
> static int  alx_init_adapter(struct alx_adapter *adpt)
3478c3478
< static int __devinit alx_init(struct pci_dev *pdev,
---
> static int  alx_init(struct pci_dev *pdev,
3786c3786
< static void __devexit alx_remove(struct pci_dev *pdev)
---
> static void alx_remove(struct pci_dev *pdev)
3910c3910
<       .remove      = __devexit_p(alx_remove),
---
>       .remove      = alx_remove,

references for changes https://patchwork.kernel.org/patch/2012501/

uname -a

Linux USSTiconderoga 3.8.1-201.fc18.x86_64 #1 SMP Thu Feb 28 19:23:08 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

@kaechele

This comment has been minimized.

Copy link

kaechele commented Mar 3, 2013

I've sent a pull request for this specific problem. See the pull requests for more information.

reflectivedevelopment notifications@github.com schrieb:

This works for me.

diff -r
compat-wireless-2012-03-12-p/drivers/net/ethernet/atheros/alx/alx_main.c
compat-drivers-2013-02-03/drivers/net/ethernet/atheros/alx/alx_main.c
1961c1961
< static int __devinit alx_init_adapter_special(struct alx_adapter
*adpt)
---
> static int alx_init_adapter_special(struct alx_adapter *adpt)
2016c2016
< static int __devinit alx_init_adapter(struct alx_adapter *adpt)
---
> static int  alx_init_adapter(struct alx_adapter *adpt)
3478c3478
< static int __devinit alx_init(struct pci_dev *pdev,
---
> static int  alx_init(struct pci_dev *pdev,
3786c3786
< static void __devexit alx_remove(struct pci_dev *pdev)
---
> static void alx_remove(struct pci_dev *pdev)
3910c3910
<       .remove      = __devexit_p(alx_remove),
---
>       .remove      = alx_remove,

Reply to this email directly or view it on GitHub:
#2 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.