Bug 196039

Summary: Lenovo g505s: alc driver does not work on 10.1
Product: Base System Reporter: Rami <rami.bachar>
Component: kernAssignee: freebsd-net (Nobody) <net>
Status: New ---    
Severity: Affects Only Me CC: op, yongari
Priority: ---    
Version: 10.1-RELEASE   
Hardware: amd64   
OS: Any   

Description Rami 2014-12-16 21:40:58 UTC

I just got a new Lenovo g505s for FreeBSD use only and i have an issue with the Network Interface (and many more obviously) 

Onboard Atheros Interface 10/100 (nit 1g adapter) alc driver

Stopped working and recognised.

It was working before with FreeBSD 10.1 after reinstalling its stopped completely working.

- I guess it might be bios settings but i have tried all the combinations possible

- also might be an hardware error but installing windows/linux the adapter is working fine

This issue appears starting from the installation media when configuring the network

i get not network interface

output from pciconf

none2@pci0:1:0:0:	class=0x020000 card=0x380617aa chip=0x10a01969 rev=0x10 hdr=0x00
    vendor     = 'Atheros Communications Inc.'
    class      = network
    subclass   = ethernet
    cap 01[40] = powerspec 3  supports D0 D3  current D0
    cap 10[58] = PCI-Express 1 endpoint max data 128(4096) link x1(x1)
                 speed 2.5(2.5) ASPM L0s/L1(L0s/L1)
    cap 05[c0] = MSI supports 16 messages, 64 bit, vector masks
    cap 11[d8] = MSI-X supports 16 messages
                 Table in map 0x10[0x2000], PBA in map 0x10[0x3000]
    ecap 0001[100] = AER 1 0 fatal 0 non-fatal 1 corrected
    ecap 0003[180] = Serial 1 ff2cd967f8a963ff
Comment 1 Rami 2014-12-16 22:23:11 UTC
dmesg |grep net

<network, ethernet> at device 0.0 (no driver attached)
Comment 2 Oliver Pinter freebsd_committer 2014-12-17 10:21:59 UTC
try similar workaround: http://0xfeedface.org/2014/12/11/FreeBSD-Intel-wifi-via-bhyve.html ;)
Comment 3 Rami 2014-12-17 11:10:22 UTC
This is an issue with Ethernet adapter not WiFi, the card was working 3 days before and stopped working out of the blue (when is still working under linux/windows running on the same hardware)

Thank you for your replay, i know its sounds like the bios/hardware issue but i have tried all the options,that is why i am here.

i am familier with other virtualization solution but i this hardware i want to run desktop FreeBSD
Comment 4 Rami 2014-12-17 12:09:41 UTC
I think I might have an idea about this issue

In a strange way which I cannot explain FreeBSD 10.1 was working with the Lenovo g505s built in interface using alc driver which is for Atheros AR8161 10/100/1000

I dont know how it happened but as a fact i was working with it for few days (alc0)

The internal adapter is Atheros AR8152 10/100 and not AR8161 

I will check it again and see if this adapter is supported with a different driver

(alx on Linux)
Comment 5 Oliver Pinter freebsd_committer 2014-12-17 12:27:30 UTC
From 11-CURRENT's dev/alc/if_alcreg.h seems like this is a AR8172 device.

#define DEVICEID_ATHEROS_AR8172         0x10A0
Comment 6 Oliver Pinter freebsd_committer 2014-12-17 12:29:42 UTC
and added with this commit: https://github.com/freebsd/freebsd/commit/2e1d5c2b85e069254d7317839b75530172fcc116 to 11-CURRENT
Comment 7 Rami 2014-12-17 12:43:48 UTC
this device is Atheros AR8152 and should work with alc 

I will search for a possible firmware update for this device because its defensively a strange beehiver.

this bug is probably not related to FreeBSD unless it happened as a result of using it but not likely
Comment 8 Rami 2014-12-17 22:08:33 UTC
Sorry for all the trouble, but somehow (many usb sticks around me ) i was working with a version of 11-CURRENT where this adapter is supported, so I'm back with 11-CURRENT

and the card is working and i can continue and work on the radeon kms driver

thanks and sorry for the wrong place to complain
Comment 9 Pyun YongHyeon freebsd_committer 2014-12-18 01:03:27 UTC
The pciconf(8) output indicates your controller is AR8172.
If alx is picked up under Linux it also indicates your controller is either AR816x or AR817x. I'm not sure why you think your controller is AR8152.  What makes me wonder is how you were able to use the controller with FreeBSD 10.1 release. Maybe you've installed alternative driver written by others?
Support for AR816x/AR817x was added shortly before FreeBSD 10.1 release so FreeBSD 10.1 does not ship the updated driver. You have to update to stable 9/stable 10 or CURRENT to use the controller. You can also manually patch alc(4) from latest stable branches.
Comment 10 Rami 2014-12-18 05:25:44 UTC
I understand wha you say but The card was recognised during the installation of FreeBSD 11-CURRENT and not on 10.1 and the driver didn't work with this laptop. now it works with 11-CURRENT without any special configuration.Thanks