* r8169 misleading firmware error messages
@ 2011-04-16 8:27 Fejes József
2011-04-16 11:04 ` François Romieu
0 siblings, 1 reply; 5+ messages in thread
From: Fejes József @ 2011-04-16 8:27 UTC (permalink / raw)
To: netdev
Hi,
I'm using Linux 2.6.38.3 with a Realtek 8169 card, ID: 10ec:8168
(integrated into an Intel D945GSEJT mobo). It never needed any firmware
files, and when I was using 2.6.37, it never complained about it either.
Now it does complain (but it still works perfectly):
r8169 0000:01:00.0: eth0: unable to apply firmware patch
Also when I do initramfs stuff:
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168d-2.fw for
module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168d-1.fw for
module r8169
So then I installed the rtl_nic firmware files, and the error messages
were gone.
How do I know if it actually tries to load the firmware at all? I see
there's a condition, if an rtl_readphy returns a wrong value, it doesn't
even try to load the firmware and just prints the message. Although this
wouldn't explain why the error message disappeared when the files were
there.
Clearly, my device works without these firmware files. If my device
works better with them, or if there are other similar devices which
require it, I think there should be a configuration option to disable
this firmware stuff and its benefits altogether so that it doesn't even
report that it needs it.
Best regards,
--
Fejes József
http://joco.name
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: r8169 misleading firmware error messages
2011-04-16 8:27 r8169 misleading firmware error messages Fejes József
@ 2011-04-16 11:04 ` François Romieu
2011-04-16 12:06 ` Fejes József
0 siblings, 1 reply; 5+ messages in thread
From: François Romieu @ 2011-04-16 11:04 UTC (permalink / raw)
To: Fejes József; +Cc: netdev
On Sat, Apr 16, 2011 at 10:27:01AM +0200, Fejes József wrote:
[...]
> So then I installed the rtl_nic firmware files, and the error
> messages were gone.
>
> How do I know if it actually tries to load the firmware at all?
Currently: remove it and the driver will tell you that it could not
load the firmware.
It's a bit rough. I'll report something through ethtool (-i).
> I see there's a condition, if an rtl_readphy returns a wrong value, it
> doesn't even try to load the firmware and just prints the message.
> Although this wouldn't explain why the error message disappeared
> when the files were there.
I don't get your point.
> Clearly, my device works without these firmware files. If my device
> works better with them, or if there are other similar devices which
> require it, I think there should be a configuration option to
> disable this firmware stuff and its benefits altogether so that it
> doesn't even report that it needs it.
The driver uses netif_warn, not netif_err.
I think the driver is nevrotic enough as is and I will not add
what I consider a silly if not unusable configuration option.
Feel free to send patches if you think they really add some
value.
--
Ueimor
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: r8169 misleading firmware error messages
2011-04-16 11:04 ` François Romieu
@ 2011-04-16 12:06 ` Fejes József
2011-04-16 15:34 ` Ben Hutchings
2011-04-17 14:38 ` François Romieu
0 siblings, 2 replies; 5+ messages in thread
From: Fejes József @ 2011-04-16 12:06 UTC (permalink / raw)
To: François Romieu; +Cc: netdev
>> I see there's a condition, if an rtl_readphy returns a wrong value, it
>> doesn't even try to load the firmware and just prints the message.
>> Although this wouldn't explain why the error message disappeared
>> when the files were there.
>
> I don't get your point.
I meant this:
2233 if ((rtl_readphy(tp, 0x06) != 0xbf00) ||
2234 (rtl_apply_firmware(tp, FIRMWARE_8168D_1) < 0)) {
2235 netif_warn(tp, probe, tp->dev, "unable to apply
firmware patch\n");
2236 }
So if a user sees this warning, they don't know if the right firmware is
missing or something else is wrong with the device and it doesn't even
try to load the firmware.
>
>> Clearly, my device works without these firmware files. If my device
>> works better with them, or if there are other similar devices which
>> require it, I think there should be a configuration option to
>> disable this firmware stuff and its benefits altogether so that it
>> doesn't even report that it needs it.
>
> The driver uses netif_warn, not netif_err.
>
> I think the driver is nevrotic enough as is and I will not add
> what I consider a silly if not unusable configuration option.
>
> Feel free to send patches if you think they really add some
> value.
>
I took a deeper look. It seems to me that the firmware files are not the
usual microcode type that the device can't function without, it just
sets up some registers, which supposedly already contain some sensible
values, so it's more like patching. That explains why this device still
works without the firmware. So my actual question is this: what do I
gain if I use the firmware, what do I lose if I don't? Since the
previous kernel version, either something pretty important was moved out
of the code into the firmware file, in which case it's a bad idea not to
use them, or they add some features to an already perfectly working
device, in which case I thought it could be a good idea to make it a
configuration option. I'd just like to understand because I couldn't
find any documentation, I don't mean to question your decisions.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: r8169 misleading firmware error messages
2011-04-16 12:06 ` Fejes József
@ 2011-04-16 15:34 ` Ben Hutchings
2011-04-17 14:38 ` François Romieu
1 sibling, 0 replies; 5+ messages in thread
From: Ben Hutchings @ 2011-04-16 15:34 UTC (permalink / raw)
To: Fejes József; +Cc: François Romieu, netdev
[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]
On Sat, 2011-04-16 at 14:06 +0200, Fejes József wrote:
[...]
> I took a deeper look. It seems to me that the firmware files are not the
> usual microcode type that the device can't function without, it just
> sets up some registers, which supposedly already contain some sensible
> values, so it's more like patching.
Some of the R8169 variants have a microcontroller in the PHY running
firmware that is initially loaded from non-volatile memory (maybe
eFuse?). These blobs contain bug fixes for the original PHY firmware.
> That explains why this device still
> works without the firmware. So my actual question is this: what do I
> gain if I use the firmware, what do I lose if I don't?
[...]
The original firmware apparently is unable to establish a stable link
against some link partners.
This warning:
> W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168d-2.fw for
> module r8169
> W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168d-1.fw for
> module r8169
is purely based on the MODULE_FIRMWARE annotations, which do not
distinguish which devices might require which files.
Ben.
--
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: r8169 misleading firmware error messages
2011-04-16 12:06 ` Fejes József
2011-04-16 15:34 ` Ben Hutchings
@ 2011-04-17 14:38 ` François Romieu
1 sibling, 0 replies; 5+ messages in thread
From: François Romieu @ 2011-04-17 14:38 UTC (permalink / raw)
To: Fejes József; +Cc: netdev
On Sat, Apr 16, 2011 at 02:06:38PM +0200, Fejes József wrote:
[...]
> I meant this:
>
> 2233 if ((rtl_readphy(tp, 0x06) != 0xbf00) ||
> 2234 (rtl_apply_firmware(tp, FIRMWARE_8168D_1) < 0)) {
> 2235 netif_warn(tp, probe, tp->dev, "unable to apply
> firmware patch\n");
> 2236 }
Ok.
This part is about to be reworked in Linus's tree.
[...]
> I took a deeper look. It seems to me that the firmware files are not
> the usual microcode type that the device can't function without, it
> just sets up some registers, which supposedly already contain some
> sensible values, so it's more like patching. That explains why this
> device still works without the firmware. So my actual question is
> this: what do I gain if I use the firmware, what do I lose if I
> don't ?
As Ben stated, if everything seems ok with your link partner and you
do not use the firmware, using the firmware will not make things work
better.
--
Ueimor
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-04-17 14:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-16 8:27 r8169 misleading firmware error messages Fejes József
2011-04-16 11:04 ` François Romieu
2011-04-16 12:06 ` Fejes József
2011-04-16 15:34 ` Ben Hutchings
2011-04-17 14:38 ` François Romieu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).