aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/r8169.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/r8169.c')
-rw-r--r--drivers/net/r8169.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index c821da21d8eb..cd9a21581f56 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -1947,11 +1947,11 @@ static void rtl_init_mac_address(struct rtl8169_private *tp,
1947 u8 cfg1; 1947 u8 cfg1;
1948 int vpd_cap; 1948 int vpd_cap;
1949 u8 mac[8]; 1949 u8 mac[8];
1950 DECLARE_MAC_BUF(buf);
1951 1950
1952 cfg1 = RTL_R8(Config1); 1951 cfg1 = RTL_R8(Config1);
1953 if (!(cfg1 & VPD)) { 1952 if (!(cfg1 & VPD)) {
1954 dprintk("VPD access not enabled, enabling\n"); 1953 if (netif_msg_probe(tp))
1954 dev_info(&pdev->dev, "VPD access disabled, enabling\n");
1955 RTL_W8(Cfg9346, Cfg9346_Unlock); 1955 RTL_W8(Cfg9346, Cfg9346_Unlock);
1956 RTL_W8(Config1, cfg1 | VPD); 1956 RTL_W8(Config1, cfg1 | VPD);
1957 RTL_W8(Cfg9346, Cfg9346_Lock); 1957 RTL_W8(Cfg9346, Cfg9346_Lock);
@@ -1969,11 +1969,19 @@ static void rtl_init_mac_address(struct rtl8169_private *tp,
1969 */ 1969 */
1970 if (rtl_eeprom_read(pdev, vpd_cap, 0x000e, (__le32*)&mac[0]) < 0 || 1970 if (rtl_eeprom_read(pdev, vpd_cap, 0x000e, (__le32*)&mac[0]) < 0 ||
1971 rtl_eeprom_read(pdev, vpd_cap, 0x0012, (__le32*)&mac[4]) < 0) { 1971 rtl_eeprom_read(pdev, vpd_cap, 0x0012, (__le32*)&mac[4]) < 0) {
1972 dprintk("Reading MAC address from EEPROM failed\n"); 1972 if (netif_msg_probe(tp)) {
1973 dev_warn(&pdev->dev,
1974 "reading MAC address from EEPROM failed\n");
1975 }
1973 return; 1976 return;
1974 } 1977 }
1975 1978
1976 dprintk("MAC address found in EEPROM: %s\n", print_mac(buf, mac)); 1979 if (netif_msg_probe(tp)) {
1980 DECLARE_MAC_BUF(buf);
1981
1982 dev_info(&pdev->dev, "MAC address found in EEPROM: %s\n",
1983 print_mac(buf, mac));
1984 }
1977 1985
1978 /* Write MAC address */ 1986 /* Write MAC address */
1979 rtl_rar_set(tp, mac); 1987 rtl_rar_set(tp, mac);