From fc90609debf45e79712caabb7668e6f32eb02b69 Mon Sep 17 00:00:00 2001 From: Mursalin Akon Date: Mon, 5 Aug 2013 14:59:38 -0700 Subject: Make firmware loading of R8169 optional According to Realtek, the firmware provides power optimizations. The driver works without the firmware. Plus, there are scenarios where the firmware is not available, which makes the driver wait at request_firmware call (i.e., 60 sec wait). Bug 1236060 Bug 991551 Change-Id: Ifcaa4b2dd48c4111ded33cf2bade7dc1f6422821 Signed-off-by: Mursalin Akon Reviewed-on: http://git-master/r/258353 GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro --- drivers/net/Kconfig | 27 ++++++++++++++++++--------- drivers/net/r8169.c | 4 ++++ 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 41b279abbd5c..1c3fac524474 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -2237,18 +2237,27 @@ config R8169 To compile this driver as a module, choose M here: the module will be called r8169. This is recommended. -config SB1250_MAC - tristate "SB1250 Gigabit Ethernet support" - depends on SIBYTE_SB1xxx_SOC - select PHYLIB +config R8169 + tristate "Realtek 8169 gigabit ethernet support" + depends on PCI + select CRC32 + select MII ---help--- - This driver supports Gigabit Ethernet interfaces based on the - Broadcom SiByte family of System-On-a-Chip parts. They include - the BCM1120, BCM1125, BCM1125H, BCM1250, BCM1255, BCM1280, BCM1455 - and BCM1480 chips. + Say Y here if you have a Realtek 8169 PCI Gigabit Ethernet adapter. To compile this driver as a module, choose M here: the module - will be called sb1250-mac. + will be called r8169. This is recommended. + +config R8169_FW_LOAD + bool "Load firmware for Realtek 8169" + depends on R8169 + select FW_LOADER + default y + ---help--- + This enables runtime loading of optional firmware by the Realtek 8169 + driver. Some environments do not require firmware, or prefer not to delay + the boot process when firmware is not available. Say N here to disable + firmware loading. If unsure, say Y. config SIS190 tristate "SiS190/SiS191 gigabit ethernet support" diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 6d657cabb951..a7ff1005ea64 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -1327,7 +1327,11 @@ static int rtl8169_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) static const char *rtl_lookup_firmware_name(struct rtl8169_private *tp) { +#ifdef CONFIG_R8169_FW_LOAD return rtl_chip_infos[tp->mac_version].fw_name; +#else + return NULL; +#endif } static void rtl8169_get_drvinfo(struct net_device *dev, -- cgit v1.2.3