# Atheros AR8132 problem on FreeNAS v8.0



## Ratko (May 9, 2011)

Hi,
Please can somebody help me to resolve strange problem with FreeNAS v8.0 installed on desktop computer with Atheros AR8132 network controller embedded on motherboard.

Problem description:

When FreeNAS PC is connected to Planet 24 port Gigabit Internet switch (10/100/1000), FreeNAS could not be pinged and FreeNAS cannot see other computers on the same network. *pciconf -lv | grep -B3 network* confirms that Atheros Network Card is recognized.

When same FreeNAS computer is connected to 8 port 10/100 Internet switch which is further connected to above mentioned Planet Gigabit switch everything works fine. FreeNAS can be pinged from other computers and managed through GUI interface.

When same PC is booted with Windows XP Pro and connected to Planet 24 port Gigabit Internet switch (10/100/1000) exactly like FreeNAS, everything works OK! PC could see other computers on LAN and could be pinged and accessed from other computers in the network.

It must be something in FreeNAS v8.0 config of AR8132 Atheros Network card that does not behave as expected.

Thanks in advance for your time and good will. I am a new to the FreeNAS arena and I am sorry if this is stupid problem and question.
Ratko


----------



## SirDice (May 9, 2011)

[thread=7290]Topics about PC-BSD | FreeNAS | DesktopBSD | m0N0WALL | pfSense | Debian GNU/kFreeBSD[/thread]


----------



## wblock@ (May 9, 2011)

Some variations of the 8132 have a gigabit PHY on a 10/100 interface.  That's consistent with the problem you describe, but the pciconf output is not shown to tell for sure.  Fixing that requires forcing the media type so that it doesn't wrongly choose gigabit.  On FreeBSD, edit /etc/rc.conf.  With FreeNAS, the setting may be done through the web interface or maybe the console.


----------



## Ratko (May 9, 2011)

wblock - You are suggesting something that was deep in my mind according to testing I did. "Something" in configuration file defines strange/wrong behavior of Atheros AR8132 network card.

Unfortunately I have no idea where to look and what I can change to correct that. Result of pciconfig command is shown below (redirected to to RAID disk where I can read it from Windows PC in the network):

`%pciconfig -lv | grep -B3 network > /mnt/PetraRAID1/Test/pciconfig1.txt`


```
alc0@pci0:1:0:0:	class=0x020000 card=0x10621849 chip=0x10621969 rev=0xc0 hdr=0x00
    vendor     = 'Attansic (Now owned by Atheros)'
    device     = 'Atheros AR8132 PCI-E Fast Ethernet Controller (AR8132)'
    class      = network
```

What else can I do to better document my problem?

I have checked /etc/rc.conf but I found nothing there that could trigger ideas... 

Thank you for your time!
Ratko


----------



## Ratko (May 10, 2011)

*Temporary solution for AR8132 problem on FreeNAS v8.0*

After investigation (limited by knowledge) I found a temporary solution for above mentioned problem of Atheros AR8132 NIC not being recognized when connected to 10/100/1000 Mbps Switch.

Commands that must be executed in shell mode for temporary correction:

```
ifconfig -m alc0
ifconfig alc0 media 100baseTX
ifconfig alc0 down
ifconfig alc0 up
ifconfig -m alc0
```

Complete (internal document) description is attached to this post in file _ReadMe_02.01.txt

I still need support if somebody knows how Atheros driver could be updated to avoid similar problems!

Regards
Ratko


----------



## yongari@ (May 10, 2011)

It seems AR8132 PHY has link establishment issue with gigabit link partner. I didn't see this issue on my sample board though. As you know, AR8132 is fast ethernet but its PHY capability reports it supports 1000baseT. This may cause problems under certain situations.
Anyway, could you file a new PR and let me know the PR number?


----------



## Ratko (May 10, 2011)

*Temporary solution for AR8132 problem on FreeNAS v8.0*

Yongari, I will file a new PR as you suggested.

In the mean time with help of my gray cells I found temporary solution that will survive boot .

After changing Atheros AR8132 config with commands mentioned in previous post connectivity with LAN is established. By entering FreeNAS GUI end changing configuration data for NIC interface by entering "mode 100baseTX" into "options" field problem is solved.

Of course for permanent solution some other changes must be provided on the FreeNAS installation level.

For detail updated instructions and picture of GUI changes please see attached files.

Best regards
Ratko


----------



## Ratko (May 10, 2011)

*Temporary solution for AR8132 problem on FreeNAS v8.0 - PR submited*

yongari,

I have filed PR as you suggested.

Only number I know about filed PR is number presented as picture: N576KH5S
Date/time of filing PR is: 2011-05-10, 20:30 under my name.

Thanks and best regards
Ratko


----------



## Ratko (May 10, 2011)

Yongary,

Sorry - I have just now received mail with following text:

Thank you very much for your problem report.
It has the internal identification `conf/156935'.
The individual assigned to look at your
report is: freebsd-bugs. 

Ratko


----------



## wblock@ (May 10, 2011)

It's PR PR 156935.


----------



## yongari@ (May 10, 2011)

Thanks. Grabbed the PR.


----------



## wblock@ (May 11, 2011)

My Acer D250 does this also, and can run test code if needed.  It's 8-stable i386 right now.


----------



## yongari@ (May 12, 2011)

Fixed in HEAD(r221817). Will MFC to stable/8 and stable/7.


----------



## Ratko (May 13, 2011)

*Patch for AR8132 problem on FreeNAS v8.0  - How to apply?*

I have a patch that Yongary provided as a solution to a problem discussed in this thread. Unfortunately, due to lack of knowledge and experience with FreeNAS v8.0, I am not able to apply and implement this patch as a permanent solution.

Please, can somebody tell me how to do that, because standard FreeBSD procedure:

```
cd /usr/src
patch < atphystable8.diff
```
does not work as the /usr/src folder does not exist on my FreeNAS installation.

What commands I have to use to properly apply this patch to my installed FreeNAS system?

Thanks
Ratko


----------

