Le 29/06/2010 20:46, Fridiric URBAN a icrit :
4.7, but it only fix the hardware initialization. I've got all interface available in ifconfig and known by the kernel but thoses who useally don't get initialized doesn't work when you plug the cable, there must be a similar problem when bringing up the link.

The problem, I fixed on hw_init was simply a failing mutex (in if_em_hw.c) . When interrogating the PHY registers at the end of em_setup_copper_link(), if the PHY is busy, the function em_read_phy_reg() return an error (E1000_ERR_PHY) which is brought on the function stack and lead to hardware initialization failure... So i took the code from e1000_82575.c of the freebsd project and this is over. Now this is uglyly coded, it need to be rewritten to feet with the OpenBSD em(4) philosophy which is totaly different from freebsd em/igb code. I will be busy at work but i'll try to keep on working on that during my free time. If somebody wants to help/go on, mail me ;)

PS: I'll have fiber card soon, we'll see they have the same problem.

Fred

Ok it's confirmed, the PHY used on the card has a strange behavior. Each time that the function em_read_phy_reg() is used there is a risk of failure, The PHY is more often busy than useall. I added some debug information in the code which show the return code of em_read_phy_reg() and sometimes E1000_ERR_PHY is returned.This function is called very very often (which is obvious). When it happends the interface won't work.

I partially fixed the hardware initialization by adding a timed retry when the PHY is busy (in em_setup_copper_link()), but there is still lots of occurrence of em_read_phy_reg() that need to be modified (ie: I already had error in em_copper_link_autoneg()) and it's the first time I put my finger inside a device driver :E So maybe there is a better way to fix it ! We need a kernel guru !!! :D

Fred

Btw, I took the idea of the timed retry of em_read_phy_reg() from FreeBSD igb driver, in their equivalent of em_setup_copper_link(), they use it.


Le 29/06/2010 18:29, w...@wootsie.com a icrit :
4.6 or 4.7 code?

-Bill

On Tue, Jun 29, 2010 at 10:48 AM, Fridiric URBAN
<frederic.ur...@ircad.u-strasbg.fr>  wrote:
Le 29/06/2010 14:16, uhu a C)crit :
FrC)dC)ric URBAN<frederic.urban<at>   ircad.u-strasbg.fr>   writes:


.....
I didn't find any bug report yet on the OpenBSD official Website, this
is a different case than the one  reported here:
http://cvs.openbsd.org/cgi-bin/query-pr-wrapper?full=yes&numbers=6301
<http://cvs.openbsd.org/cgi-bin/query-pr-wrapper?full=yes&numbers=6301>

Can somebody report it with a dmesg on 4.7 ?



I reported it some days ago, got an error message, but the bug report
seems to be here since 07/23:

http://cvs.openbsd.org/cgi-bin/query-pr-wrapper?full=yes&numbers=6408

Uwe


Hello again,

Maybe i got a fix, I modified some lines of code inside the driver... I
booted 4x times without nics that has failed... But i'll try it more before
saying victory ;)

Fred

Reply via email to