Re: [GIT] Networking

From: Ben Hutchings
Date: Fri Jan 07 2011 - 14:07:24 EST


On Fri, Jan 07, 2011 at 10:46:48AM -0800, Linus Torvalds wrote:
> On Thu, Jan 6, 2011 at 12:20 PM, David Miller <davem@xxxxxxxxxxxxx> wrote:
> >
> > Plus the usual spattering of wireless, bluetooth, and wired driver
> > updates.
>
> Grr.
>
> This breaks booting for me.
>
> [torvalds@i5 linux]$ git bisect good
> bca03d5f32c8ee9b5cfa1d32640a63fded6cb3c0 is the first bad commit
> commit bca03d5f32c8ee9b5cfa1d32640a63fded6cb3c0
> Author: françois romieu <romieu@xxxxxxxxxxxxx>
> Date: Mon Jan 3 15:07:31 2011 +0000
>
> r8169: remove the firmware of RTL8111D.
>
> The binary file of the firmware is moved to linux-firmware repository.
> The firmwares are rtl_nic/rtl8168d-1.fw and rtl_nic/rtl8168d-2.fw.
> The driver goes along if the firmware couldn't be found. However, it
> is suggested to be done with the suitable firmware.
>
> Some wrong PHY parameters are directly corrected in the driver.
>
> Simple firmware checking added per Ben Hutchings suggestion.
>
> Signed-off-by: Hayes Wang <hayeswang@xxxxxxxxxxx>
> Signed-off-by: Francois Romieu <romieu@xxxxxxxxxxxxx>
> Cc: Ben Hutchings <benh@xxxxxxxxxx>
> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
>
> and the behavior is very broken: it just hangs at boot-time. No
> messages from the driver (certainly not any messages about missing
> firmware), no nothing. The thing is just hung.

This is because the driver is requesting firmware during probe, before
there is a firmware agent available (maybe even before / is mounted?)
rather than when the interface is brought up, as many other network
drivers do.

At the very least, we ought to make firmware loading fail fast and
noisily if this happens.

[...]
> Quite frankly, that commit looks broken anyway. It doesn't just switch
> to the firmware loader, it also seems to change other things (ie
> removed some mdio writes, added others).

There were some tables of PHY registers to poke that were a mixture of
control register writes and transfer of firmware to the microcontroller.
Hayes and Francois have separated those out.

[...]
> I bet I can make it work by making it a module, and installing the
> firmware manually. But it's supposed to work even without that.

Right. This is very vaguely based on a patch I applied in Debian
where we build r8169 as a module, and I don't think anyone reported
this behaviour.

Ben.

--
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
- Albert Camus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/