Bug 11434 - r8169 exits with error -22
Summary: r8169 exits with error -22
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Network (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Francois Romieu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-27 12:07 UTC by Georg Grabler
Modified: 2022-09-26 08:22 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.26
Subsystem:
Regression: No
Bisected commit-id:


Attachments
kernel.log - 2008-08-29 (103.97 KB, text/plain)
2008-08-28 16:19 UTC, Georg Grabler
Details

Description Georg Grabler 2008-08-27 12:07:01 UTC
Latest working kernel version: -
Earliest failing kernel version: 2.6.26
Distribution: ARCH Linux
Hardware Environment: Dell Vostro 1510
Software Environment: Linux x86 (i686)
Problem Description:
The driver sometimes fails, sometime does not fail.
If it does not fail to load, I am not able to connect to any network.

The latest realtec 8168 drivers work (http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=13&PFid=5&Level=5&Conn=4&DownTypeID=3&GetDown=false)

Additional information:
https://bugs.launchpad.net/ubuntu/+bug/231102

Steps to reproduce:
Uhm, plug in a network cable and try to do some networking?
Comment 1 Francois Romieu 2008-08-27 13:22:19 UTC
Can you:
1. set the r8169.debug option at 65535 before inserting the module
2. send the complete dmesg with a recent kernel (2.6.26 or above) after 1.
   It should include a line with the 'XID' pattern.
3. try 2.6.27-rc4. It includes some fixes.

-- 
Ueimor
Comment 2 Georg Grabler 2008-08-28 16:17:50 UTC
I'll answer this questions tomorrow. For some reason, 1 hour ago it stopped dropping errors (without updating - basically from one insert of the module to the next one).

The only answer which I can give for now is:
eth0: RTL8168c/8111c at 0xf8878000, 00:21:70:a2:9d:1b, XID 3c4000c0 IRQ 16

I've attached my todays kernel.log, showing the errors (first) and later that it's working.
Comment 3 Georg Grabler 2008-08-28 16:19:11 UTC
Created attachment 17514 [details]
kernel.log - 2008-08-29
Comment 4 Georg Grabler 2008-08-31 03:09:31 UTC
Seems to be fixed in 2.6.27-rc4.
Comment 5 Francois Romieu 2008-08-31 04:36:25 UTC
It could be consistent with the wrecking of the PCI configuration space
which has been fixed in commit 77332894c21165404496c56763d7df6c15c4bb09
between 2.6.26 and 2.6.27-rc1 (more or less random failures).

I'll close the bug for now. If it reappears, a bisection could be very
helpful.

-- 
Ueimor
Comment 6 Georg Grabler 2008-08-31 04:51:32 UTC
I'll watch out for the bug reappearing. Currently running the rc4 is "the solution", since I did not encounter any problems since then.

It seemed like a PCI bug, reason:
-> The module loaded first, but had IRQ problems or similar (didn't respond)
-> The module unloaded and loaded again did just crash with error -22

Thanks for the help anyway. I'll report back if it appears again with 2.6.27.

Thanks,
Georg
Comment 7 Yves-Alexis Perez 2008-09-22 06:40:07 UTC
Hmmh, it seems that I get the same problem. I'm using debian Lenny, which has kernel 2.6.26 (at the moment at version 2.6.26.4). It seems that the fix is in 2.6.26.3, but I still get it.

I've opened a bug on Debian BTS where you can find the dmesg (I can provide the complete dmesg)

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=499763

Cheers,
Comment 8 Francois Romieu 2008-09-22 12:17:36 UTC
It is fixed by patches #0001...#0008 of the series at:
http://userweb.kernel.org/~romieu/r8169/2.6.27-rc6/20080913/

-- 
Ueimor
Comment 9 Francois Romieu 2008-09-22 13:31:08 UTC
Regarding the Debian bugreport, even if the -22 symptom and the random PCI
config writes are fixed in 2.6.22.3, I would not claim the 8101 support to
be completely reliable without the aforementioned patches.

-- 
Ueimor
Comment 10 Yves-Alexis Perez 2008-09-24 07:16:51 UTC
Is there a chance that those patches could be backported to 2.6.26?
Comment 11 Georg Grabler 2008-09-24 07:21:31 UTC
For me personally, the 2.6.27rc1 works pretty well.

I had a lot of troubles with 2.6.26.4 as well, the module was not reliable in any way.

Running now for some time on 2.6.27rc1 (soon one month). Maybe try to compile the vanilla 2.6.27rc1, using the configuration of debian.
Comment 12 Yves-Alexis Perez 2008-09-24 07:25:57 UTC
It's on a production box. I would prefer using a stock debian kernel for that, so using a custom made kernel is not a good idea, and using a rc one is not really an option :/
Comment 13 Francois Romieu 2008-09-24 12:30:30 UTC
corsac@debian.org  2008-09-24 07:16 :
> Is there a chance that those patches could be backported to 2.6.26?

Patches #0001 .. #0008 can be applied "as is" to 2.6.26.5 but I doubt
that people can be convinced that they are kosher for 2.6.26 (once they
are included in 2.6.28-rc of course).
Comment 14 michelro 2011-03-26 15:18:27 UTC
Hello,

with kernel 2.6.38, i have this message:

r8169 0000:02:00.0: eth0: unable to apply firmware patch
r8169 0000:02:00.0: eth0: link down
r8169 0000:02:00.0: eth0: link down
r8169 0000:02:00.0: eth0: link up
Comment 15 Ken Sharp 2017-11-07 03:11:30 UTC
Could someone please remove the alias from this bug report? It messes with the search function.
Comment 16 Rafael Ristovski 2022-09-25 22:42:29 UTC
(In reply to Ken Sharp from comment #15)
> Could someone please remove the alias from this bug report? It messes with
> the search function.

+1 for this. The alias makes it impossible to search for `r8169` as it automatically redirects to this bug report.

Note You need to log in before you can comment on or make changes to this bug.