Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#561309: firmware-linux-nonfree: needs firmware for module r8169 (/rtl8168d-{1, 2}.fw)

33 views
Skip to first unread message

Miles Bader

unread,
Dec 15, 2009, 8:30:02 PM12/15/09
to
Package: firmware-linux-nonfree
Version: 0.21
Severity: normal


Installing the new kernel package "linux-image-2.6.32-trunk-amd64"
results in new warning messages like:

W: Possible missing firmware /lib/firmware/rtl8168d-2.fw for module r8169

It looks like this firmware was removed from the kernel proper as part
of the non-free firmware removal process, which suggests that it should
be included in firmware-linux-nonfree instead.

Thanks,

-Miles


-- System Information:
Debian Release: squeeze/sid
APT prefers oldstable
APT policy: (500, 'oldstable'), (500, 'unstable'), (500, 'testing'), (101, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.31-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

firmware-linux-nonfree depends on no packages.

firmware-linux-nonfree recommends no packages.

Versions of packages firmware-linux-nonfree suggests:
ii initramfs-tools 0.93.4 tools for generating an initramfs
ii linux-image-2.6.31-1-amd64 [l 2.6.31-2 Linux 2.6.31 for 64-bit PCs
ii linux-image-2.6.32-trunk-amd6 2.6.32-1 Linux 2.6.32 for 64-bit PCs

-- no debconf information

--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Ben Hutchings

unread,
Dec 15, 2009, 9:00:02 PM12/15/09
to
On Wed, 2009-12-16 at 10:11 +0900, Miles Bader wrote:
> Package: firmware-linux-nonfree
> Version: 0.21
> Severity: normal
>
>
> Installing the new kernel package "linux-image-2.6.32-trunk-amd64"
> results in new warning messages like:
>
> W: Possible missing firmware /lib/firmware/rtl8168d-2.fw for module r8169
>
> It looks like this firmware was removed from the kernel proper as part
> of the non-free firmware removal process, which suggests that it should
> be included in firmware-linux-nonfree instead.

We don't yet have clear permission to distribute this. However, it is
only required for a chip which is newly supported by the r8169 driver in
2.6.32. If the driver worked for you before, it will continue to work
now.

Ben.

--
Ben Hutchings
Hoare's Law of Large Problems:
Inside every large problem is a small problem struggling to get out.

signature.asc

Ben Hutchings

unread,
Dec 18, 2009, 7:40:01 PM12/18/09
to
It seems RTL8168D version 1 (but not version 2) was previously supported
without the need for this firmware update (rtl8168d-1.fw). So perhaps
the driver should carry on without it if it is missing. Please try
applying the following patch, which implements that behaviour.

Ben.

diff -u b/drivers/net/r8169.c b/drivers/net/r8169.c
--- b/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -1709,7 +1709,7 @@
rtl8168c_3_hw_phy_config(ioaddr);
}

-static int rtl8168d_1_hw_phy_config(struct rtl8169_private *tp)
+static void rtl8168d_1_hw_phy_config(struct rtl8169_private *tp)
{
static struct phy_reg phy_reg_init_0[] = {
{ 0x1f, 0x0001 },
@@ -1739,11 +1739,6 @@
};
void __iomem *ioaddr = tp->mmio_addr;
const struct firmware *fw;
- int rc;
-
- rc = request_firmware(&fw, "rtl8168d-1.fw", &tp->pci_dev->dev);
- if (rc)
- return rc;

rtl_phy_write(ioaddr, phy_reg_init_0, ARRAY_SIZE(phy_reg_init_0));

@@ -1801,15 +1796,15 @@
mdio_plus_minus(ioaddr, 0x02, 0x0100, 0x0600);
mdio_plus_minus(ioaddr, 0x03, 0x0000, 0xe000);

- rtl_phy_write_fw(ioaddr, fw);
-
- release_firmware(fw);
- return 0;
+ if (request_firmware(&fw, "rtl8168d-1.fw", &tp->pci_dev->dev) == 0) {
+ rtl_phy_write_fw(ioaddr, fw);
+ release_firmware(fw);
+ }
}

MODULE_FIRMWARE("rtl8168d-1.fw");

-static int rtl8168d_2_hw_phy_config(struct rtl8169_private *tp)
+static void rtl8168d_2_hw_phy_config(struct rtl8169_private *tp)
{
static struct phy_reg phy_reg_init_0[] = {
{ 0x1f, 0x0001 },
@@ -1838,11 +1833,6 @@
};
void __iomem *ioaddr = tp->mmio_addr;
const struct firmware *fw;
- int rc;
-
- rc = request_firmware(&fw, "rtl8168d-2.fw", &tp->pci_dev->dev);
- if (rc)
- return rc;

rtl_phy_write(ioaddr, phy_reg_init_0, ARRAY_SIZE(phy_reg_init_0));

@@ -1896,10 +1886,10 @@
mdio_write(ioaddr, 0x1f, 0x0002);
mdio_patch(ioaddr, 0x0f, 0x0017);

- rtl_phy_write_fw(ioaddr, fw);
-
- release_firmware(fw);
- return 0;
+ if (request_firmware(&fw, "rtl8168d-2.fw", &tp->pci_dev->dev) == 0) {
+ rtl_phy_write_fw(ioaddr, fw);
+ release_firmware(fw);
+ }
}

MODULE_FIRMWARE("rtl8168d-2.fw");
@@ -2039,9 +2029,11 @@
rtl8168cp_2_hw_phy_config(ioaddr);
break;
case RTL_GIGA_MAC_VER_25:
- return rtl8168d_1_hw_phy_config(tp);
+ rtl8168d_1_hw_phy_config(tp);
+ break;
case RTL_GIGA_MAC_VER_26:
- return rtl8168d_2_hw_phy_config(tp);
+ rtl8168d_2_hw_phy_config(tp);
+ break;
case RTL_GIGA_MAC_VER_27:
rtl8168d_3_hw_phy_config(ioaddr);
break;
--- END ---

--
Ben Hutchings
Humans are not rational beings; they are rationalising beings.

signature.asc

Stefan Lippers-Hollmann

unread,
Dec 18, 2009, 9:30:02 PM12/18/09
to
Hi

On Saturday 19 December 2009, Ben Hutchings wrote:
> It seems RTL8168D version 1 (but not version 2) was previously supported
> without the need for this firmware update (rtl8168d-1.fw). So perhaps
> the driver should carry on without it if it is missing. Please try
> applying the following patch, which implements that behaviour.

[...]

This works for me, although it delays the system boot for 60s - waiting
for the non-existing firmware file to appear. Maybe the module should
additionally complain if the firmware couldn't be found or allow some other
method to avoid waiting for a non-existing firmware image?

$ dmesg | grep -i -e firmware -e eth0 -e 8169 -e 8168
r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
r8169 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
r8169 0000:01:00.0: setting latency timer to 64
r8169 0000:01:00.0: irq 28 for MSI/MSI-X
eth0: RTL8168d/8111d at 0xf7c6e000, 00:1c:c0:ee:22:88, XID 081000c0 IRQ 28
r8169 0000:01:00.0: firmware: requesting rtl8168d-1.fw
r8169: eth0: link up
r8169: eth0: link up
eth0: no IPv6 routers present

[...]


> diff -u b/drivers/net/r8169.c b/drivers/net/r8169.c
> --- b/drivers/net/r8169.c
> +++ b/drivers/net/r8169.c

[...]


> @@ -1801,15 +1796,15 @@
> mdio_plus_minus(ioaddr, 0x02, 0x0100, 0x0600);
> mdio_plus_minus(ioaddr, 0x03, 0x0000, 0xe000);
>
> - rtl_phy_write_fw(ioaddr, fw);
> -
> - release_firmware(fw);
> - return 0;
> + if (request_firmware(&fw, "rtl8168d-1.fw", &tp->pci_dev->dev) == 0) {
> + rtl_phy_write_fw(ioaddr, fw);
> + release_firmware(fw);

} else {
printk(KERN_INFO "%s: "
"Failed to load rtl8168d-1.fw.\n", dev->name);


> + }
> }
>
> MODULE_FIRMWARE("rtl8168d-1.fw");
>
> -static int rtl8168d_2_hw_phy_config(struct rtl8169_private *tp)
> +static void rtl8168d_2_hw_phy_config(struct rtl8169_private *tp)
> {
> static struct phy_reg phy_reg_init_0[] = {
> { 0x1f, 0x0001 },

[...]
perhaps?

Would it be possible to provide some kind of firmware-cutter, to let the
user generate the required firmwares from a vanilla kernel checkout on the
target system, if needed (and if no copyright statement can be achieved)?

Regards
Stefan Lippers-Hollmann


--
To UNSUBSCRIBE, email to debian-ker...@lists.debian.org

0 new messages