aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/e1000/e1000.h18
-rw-r--r--drivers/net/e1000/e1000_ethtool.c27
-rw-r--r--drivers/net/e1000/e1000_main.c86
3 files changed, 70 insertions, 61 deletions
diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h
index 65298a6d9af7..99288b95aead 100644
--- a/drivers/net/e1000/e1000.h
+++ b/drivers/net/e1000/e1000.h
@@ -324,18 +324,20 @@ enum e1000_state_t {
324extern struct net_device *e1000_get_hw_dev(struct e1000_hw *hw); 324extern struct net_device *e1000_get_hw_dev(struct e1000_hw *hw);
325#define e_dbg(format, arg...) \ 325#define e_dbg(format, arg...) \
326 netdev_dbg(e1000_get_hw_dev(hw), format, ## arg) 326 netdev_dbg(e1000_get_hw_dev(hw), format, ## arg)
327#define e_err(format, arg...) \ 327#define e_err(msglvl, format, arg...) \
328 netdev_err(adapter->netdev, format, ## arg) 328 netif_err(adapter, msglvl, adapter->netdev, format, ## arg)
329#define e_info(format, arg...) \ 329#define e_info(msglvl, format, arg...) \
330 netdev_info(adapter->netdev, format, ## arg) 330 netif_info(adapter, msglvl, adapter->netdev, format, ## arg)
331#define e_warn(format, arg...) \ 331#define e_warn(msglvl, format, arg...) \
332 netdev_warn(adapter->netdev, format, ## arg) 332 netif_warn(adapter, msglvl, adapter->netdev, format, ## arg)
333#define e_notice(format, arg...) \ 333#define e_notice(msglvl, format, arg...) \
334 netdev_notice(adapter->netdev, format, ## arg) 334 netif_notice(adapter, msglvl, adapter->netdev, format, ## arg)
335#define e_dev_info(format, arg...) \ 335#define e_dev_info(format, arg...) \
336 dev_info(&adapter->pdev->dev, format, ## arg) 336 dev_info(&adapter->pdev->dev, format, ## arg)
337#define e_dev_warn(format, arg...) \ 337#define e_dev_warn(format, arg...) \
338 dev_warn(&adapter->pdev->dev, format, ## arg) 338 dev_warn(&adapter->pdev->dev, format, ## arg)
339#define e_dev_err(format, arg...) \
340 dev_err(&adapter->pdev->dev, format, ## arg)
339 341
340extern char e1000_driver_name[]; 342extern char e1000_driver_name[];
341extern const char e1000_driver_version[]; 343extern const char e1000_driver_version[];
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index d5ff029aa7b2..f4d0922ec65b 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -346,7 +346,7 @@ static int e1000_set_tso(struct net_device *netdev, u32 data)
346 346
347 netdev->features &= ~NETIF_F_TSO6; 347 netdev->features &= ~NETIF_F_TSO6;
348 348
349 e_info("TSO is %s\n", data ? "Enabled" : "Disabled"); 349 e_info(probe, "TSO is %s\n", data ? "Enabled" : "Disabled");
350 adapter->tso_force = true; 350 adapter->tso_force = true;
351 return 0; 351 return 0;
352} 352}
@@ -714,9 +714,9 @@ static bool reg_pattern_test(struct e1000_adapter *adapter, u64 *data, int reg,
714 writel(write & test[i], address); 714 writel(write & test[i], address);
715 read = readl(address); 715 read = readl(address);
716 if (read != (write & test[i] & mask)) { 716 if (read != (write & test[i] & mask)) {
717 e_info("pattern test reg %04X failed: " 717 e_err(drv, "pattern test reg %04X failed: "
718 "got 0x%08X expected 0x%08X\n", 718 "got 0x%08X expected 0x%08X\n",
719 reg, read, (write & test[i] & mask)); 719 reg, read, (write & test[i] & mask));
720 *data = reg; 720 *data = reg;
721 return true; 721 return true;
722 } 722 }
@@ -734,7 +734,7 @@ static bool reg_set_and_check(struct e1000_adapter *adapter, u64 *data, int reg,
734 writel(write & mask, address); 734 writel(write & mask, address);
735 read = readl(address); 735 read = readl(address);
736 if ((read & mask) != (write & mask)) { 736 if ((read & mask) != (write & mask)) {
737 e_err("set/check reg %04X test failed: " 737 e_err(drv, "set/check reg %04X test failed: "
738 "got 0x%08X expected 0x%08X\n", 738 "got 0x%08X expected 0x%08X\n",
739 reg, (read & mask), (write & mask)); 739 reg, (read & mask), (write & mask));
740 *data = reg; 740 *data = reg;
@@ -779,7 +779,7 @@ static int e1000_reg_test(struct e1000_adapter *adapter, u64 *data)
779 ew32(STATUS, toggle); 779 ew32(STATUS, toggle);
780 after = er32(STATUS) & toggle; 780 after = er32(STATUS) & toggle;
781 if (value != after) { 781 if (value != after) {
782 e_err("failed STATUS register test got: " 782 e_err(drv, "failed STATUS register test got: "
783 "0x%08X expected: 0x%08X\n", after, value); 783 "0x%08X expected: 0x%08X\n", after, value);
784 *data = 1; 784 *data = 1;
785 return 1; 785 return 1;
@@ -894,7 +894,8 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data)
894 *data = 1; 894 *data = 1;
895 return -1; 895 return -1;
896 } 896 }
897 e_info("testing %s interrupt\n", (shared_int ? "shared" : "unshared")); 897 e_info(hw, "testing %s interrupt\n", (shared_int ?
898 "shared" : "unshared"));
898 899
899 /* Disable all the interrupts */ 900 /* Disable all the interrupts */
900 ew32(IMC, 0xFFFFFFFF); 901 ew32(IMC, 0xFFFFFFFF);
@@ -1561,7 +1562,7 @@ static void e1000_diag_test(struct net_device *netdev,
1561 u8 forced_speed_duplex = hw->forced_speed_duplex; 1562 u8 forced_speed_duplex = hw->forced_speed_duplex;
1562 u8 autoneg = hw->autoneg; 1563 u8 autoneg = hw->autoneg;
1563 1564
1564 e_info("offline testing starting\n"); 1565 e_info(hw, "offline testing starting\n");
1565 1566
1566 /* Link test performed before hardware reset so autoneg doesn't 1567 /* Link test performed before hardware reset so autoneg doesn't
1567 * interfere with test result */ 1568 * interfere with test result */
@@ -1601,7 +1602,7 @@ static void e1000_diag_test(struct net_device *netdev,
1601 if (if_running) 1602 if (if_running)
1602 dev_open(netdev); 1603 dev_open(netdev);
1603 } else { 1604 } else {
1604 e_info("online testing starting\n"); 1605 e_info(hw, "online testing starting\n");
1605 /* Online tests */ 1606 /* Online tests */
1606 if (e1000_link_test(adapter, &data[4])) 1607 if (e1000_link_test(adapter, &data[4]))
1607 eth_test->flags |= ETH_TEST_FL_FAILED; 1608 eth_test->flags |= ETH_TEST_FL_FAILED;
@@ -1694,8 +1695,8 @@ static void e1000_get_wol(struct net_device *netdev,
1694 wol->supported &= ~WAKE_UCAST; 1695 wol->supported &= ~WAKE_UCAST;
1695 1696
1696 if (adapter->wol & E1000_WUFC_EX) 1697 if (adapter->wol & E1000_WUFC_EX)
1697 e_err("Interface does not support " 1698 e_err(drv, "Interface does not support directed "
1698 "directed (unicast) frame wake-up packets\n"); 1699 "(unicast) frame wake-up packets\n");
1699 break; 1700 break;
1700 default: 1701 default:
1701 break; 1702 break;
@@ -1726,8 +1727,8 @@ static int e1000_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
1726 switch (hw->device_id) { 1727 switch (hw->device_id) {
1727 case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3: 1728 case E1000_DEV_ID_82546GB_QUAD_COPPER_KSP3:
1728 if (wol->wolopts & WAKE_UCAST) { 1729 if (wol->wolopts & WAKE_UCAST) {
1729 e_err("Interface does not support " 1730 e_err(drv, "Interface does not support directed "
1730 "directed (unicast) frame wake-up packets\n"); 1731 "(unicast) frame wake-up packets\n");
1731 return -EOPNOTSUPP; 1732 return -EOPNOTSUPP;
1732 } 1733 }
1733 break; 1734 break;
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 68a80893dce1..02833af8a0b1 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -275,7 +275,7 @@ static int e1000_request_irq(struct e1000_adapter *adapter)
275 err = request_irq(adapter->pdev->irq, handler, irq_flags, netdev->name, 275 err = request_irq(adapter->pdev->irq, handler, irq_flags, netdev->name,
276 netdev); 276 netdev);
277 if (err) { 277 if (err) {
278 e_err("Unable to allocate interrupt Error: %d\n", err); 278 e_err(probe, "Unable to allocate interrupt Error: %d\n", err);
279 } 279 }
280 280
281 return err; 281 return err;
@@ -657,7 +657,7 @@ void e1000_reset(struct e1000_adapter *adapter)
657 ew32(WUC, 0); 657 ew32(WUC, 0);
658 658
659 if (e1000_init_hw(hw)) 659 if (e1000_init_hw(hw))
660 e_err("Hardware Error\n"); 660 e_dev_err("Hardware Error\n");
661 e1000_update_mng_vlan(adapter); 661 e1000_update_mng_vlan(adapter);
662 662
663 /* if (adapter->hwflags & HWFLAGS_PHY_PWR_BIT) { */ 663 /* if (adapter->hwflags & HWFLAGS_PHY_PWR_BIT) { */
@@ -925,7 +925,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
925 925
926 /* initialize eeprom parameters */ 926 /* initialize eeprom parameters */
927 if (e1000_init_eeprom_params(hw)) { 927 if (e1000_init_eeprom_params(hw)) {
928 e_err("EEPROM initialization failed\n"); 928 e_err(probe, "EEPROM initialization failed\n");
929 goto err_eeprom; 929 goto err_eeprom;
930 } 930 }
931 931
@@ -936,7 +936,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
936 936
937 /* make sure the EEPROM is good */ 937 /* make sure the EEPROM is good */
938 if (e1000_validate_eeprom_checksum(hw) < 0) { 938 if (e1000_validate_eeprom_checksum(hw) < 0) {
939 e_err("The EEPROM Checksum Is Not Valid\n"); 939 e_err(probe, "The EEPROM Checksum Is Not Valid\n");
940 e1000_dump_eeprom(adapter); 940 e1000_dump_eeprom(adapter);
941 /* 941 /*
942 * set MAC address to all zeroes to invalidate and temporary 942 * set MAC address to all zeroes to invalidate and temporary
@@ -950,14 +950,14 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
950 } else { 950 } else {
951 /* copy the MAC address out of the EEPROM */ 951 /* copy the MAC address out of the EEPROM */
952 if (e1000_read_mac_addr(hw)) 952 if (e1000_read_mac_addr(hw))
953 e_err("EEPROM Read Error\n"); 953 e_err(probe, "EEPROM Read Error\n");
954 } 954 }
955 /* don't block initalization here due to bad MAC address */ 955 /* don't block initalization here due to bad MAC address */
956 memcpy(netdev->dev_addr, hw->mac_addr, netdev->addr_len); 956 memcpy(netdev->dev_addr, hw->mac_addr, netdev->addr_len);
957 memcpy(netdev->perm_addr, hw->mac_addr, netdev->addr_len); 957 memcpy(netdev->perm_addr, hw->mac_addr, netdev->addr_len);
958 958
959 if (!is_valid_ether_addr(netdev->perm_addr)) 959 if (!is_valid_ether_addr(netdev->perm_addr))
960 e_err("Invalid MAC Address\n"); 960 e_err(probe, "Invalid MAC Address\n");
961 961
962 e1000_get_bus_info(hw); 962 e1000_get_bus_info(hw);
963 963
@@ -1047,7 +1047,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
1047 goto err_register; 1047 goto err_register;
1048 1048
1049 /* print bus type/speed/width info */ 1049 /* print bus type/speed/width info */
1050 e_info("(PCI%s:%dMHz:%d-bit) %pM\n", 1050 e_info(probe, "(PCI%s:%dMHz:%d-bit) %pM\n",
1051 ((hw->bus_type == e1000_bus_type_pcix) ? "-X" : ""), 1051 ((hw->bus_type == e1000_bus_type_pcix) ? "-X" : ""),
1052 ((hw->bus_speed == e1000_bus_speed_133) ? 133 : 1052 ((hw->bus_speed == e1000_bus_speed_133) ? 133 :
1053 (hw->bus_speed == e1000_bus_speed_120) ? 120 : 1053 (hw->bus_speed == e1000_bus_speed_120) ? 120 :
@@ -1059,7 +1059,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
1059 /* carrier off reporting is important to ethtool even BEFORE open */ 1059 /* carrier off reporting is important to ethtool even BEFORE open */
1060 netif_carrier_off(netdev); 1060 netif_carrier_off(netdev);
1061 1061
1062 e_info("Intel(R) PRO/1000 Network Connection\n"); 1062 e_info(probe, "Intel(R) PRO/1000 Network Connection\n");
1063 1063
1064 cards_found++; 1064 cards_found++;
1065 return 0; 1065 return 0;
@@ -1159,7 +1159,7 @@ static int __devinit e1000_sw_init(struct e1000_adapter *adapter)
1159 /* identify the MAC */ 1159 /* identify the MAC */
1160 1160
1161 if (e1000_set_mac_type(hw)) { 1161 if (e1000_set_mac_type(hw)) {
1162 e_err("Unknown MAC Type\n"); 1162 e_err(probe, "Unknown MAC Type\n");
1163 return -EIO; 1163 return -EIO;
1164 } 1164 }
1165 1165
@@ -1192,7 +1192,7 @@ static int __devinit e1000_sw_init(struct e1000_adapter *adapter)
1192 adapter->num_rx_queues = 1; 1192 adapter->num_rx_queues = 1;
1193 1193
1194 if (e1000_alloc_queues(adapter)) { 1194 if (e1000_alloc_queues(adapter)) {
1195 e_err("Unable to allocate memory for queues\n"); 1195 e_err(probe, "Unable to allocate memory for queues\n");
1196 return -ENOMEM; 1196 return -ENOMEM;
1197 } 1197 }
1198 1198
@@ -1386,7 +1386,8 @@ static int e1000_setup_tx_resources(struct e1000_adapter *adapter,
1386 size = sizeof(struct e1000_buffer) * txdr->count; 1386 size = sizeof(struct e1000_buffer) * txdr->count;
1387 txdr->buffer_info = vmalloc(size); 1387 txdr->buffer_info = vmalloc(size);
1388 if (!txdr->buffer_info) { 1388 if (!txdr->buffer_info) {
1389 e_err("Unable to allocate memory for the Tx descriptor ring\n"); 1389 e_err(probe, "Unable to allocate memory for the Tx descriptor "
1390 "ring\n");
1390 return -ENOMEM; 1391 return -ENOMEM;
1391 } 1392 }
1392 memset(txdr->buffer_info, 0, size); 1393 memset(txdr->buffer_info, 0, size);
@@ -1401,7 +1402,8 @@ static int e1000_setup_tx_resources(struct e1000_adapter *adapter,
1401 if (!txdr->desc) { 1402 if (!txdr->desc) {
1402setup_tx_desc_die: 1403setup_tx_desc_die:
1403 vfree(txdr->buffer_info); 1404 vfree(txdr->buffer_info);
1404 e_err("Unable to allocate memory for the Tx descriptor ring\n"); 1405 e_err(probe, "Unable to allocate memory for the Tx descriptor "
1406 "ring\n");
1405 return -ENOMEM; 1407 return -ENOMEM;
1406 } 1408 }
1407 1409
@@ -1409,7 +1411,7 @@ setup_tx_desc_die:
1409 if (!e1000_check_64k_bound(adapter, txdr->desc, txdr->size)) { 1411 if (!e1000_check_64k_bound(adapter, txdr->desc, txdr->size)) {
1410 void *olddesc = txdr->desc; 1412 void *olddesc = txdr->desc;
1411 dma_addr_t olddma = txdr->dma; 1413 dma_addr_t olddma = txdr->dma;
1412 e_err("txdr align check failed: %u bytes at %p\n", 1414 e_err(tx_err, "txdr align check failed: %u bytes at %p\n",
1413 txdr->size, txdr->desc); 1415 txdr->size, txdr->desc);
1414 /* Try again, without freeing the previous */ 1416 /* Try again, without freeing the previous */
1415 txdr->desc = dma_alloc_coherent(&pdev->dev, txdr->size, 1417 txdr->desc = dma_alloc_coherent(&pdev->dev, txdr->size,
@@ -1427,7 +1429,7 @@ setup_tx_desc_die:
1427 txdr->dma); 1429 txdr->dma);
1428 dma_free_coherent(&pdev->dev, txdr->size, olddesc, 1430 dma_free_coherent(&pdev->dev, txdr->size, olddesc,
1429 olddma); 1431 olddma);
1430 e_err("Unable to allocate aligned memory " 1432 e_err(probe, "Unable to allocate aligned memory "
1431 "for the transmit descriptor ring\n"); 1433 "for the transmit descriptor ring\n");
1432 vfree(txdr->buffer_info); 1434 vfree(txdr->buffer_info);
1433 return -ENOMEM; 1435 return -ENOMEM;
@@ -1460,7 +1462,7 @@ int e1000_setup_all_tx_resources(struct e1000_adapter *adapter)
1460 for (i = 0; i < adapter->num_tx_queues; i++) { 1462 for (i = 0; i < adapter->num_tx_queues; i++) {
1461 err = e1000_setup_tx_resources(adapter, &adapter->tx_ring[i]); 1463 err = e1000_setup_tx_resources(adapter, &adapter->tx_ring[i]);
1462 if (err) { 1464 if (err) {
1463 e_err("Allocation for Tx Queue %u failed\n", i); 1465 e_err(probe, "Allocation for Tx Queue %u failed\n", i);
1464 for (i-- ; i >= 0; i--) 1466 for (i-- ; i >= 0; i--)
1465 e1000_free_tx_resources(adapter, 1467 e1000_free_tx_resources(adapter,
1466 &adapter->tx_ring[i]); 1468 &adapter->tx_ring[i]);
@@ -1580,7 +1582,8 @@ static int e1000_setup_rx_resources(struct e1000_adapter *adapter,
1580 size = sizeof(struct e1000_buffer) * rxdr->count; 1582 size = sizeof(struct e1000_buffer) * rxdr->count;
1581 rxdr->buffer_info = vmalloc(size); 1583 rxdr->buffer_info = vmalloc(size);
1582 if (!rxdr->buffer_info) { 1584 if (!rxdr->buffer_info) {
1583 e_err("Unable to allocate memory for the Rx descriptor ring\n"); 1585 e_err(probe, "Unable to allocate memory for the Rx descriptor "
1586 "ring\n");
1584 return -ENOMEM; 1587 return -ENOMEM;
1585 } 1588 }
1586 memset(rxdr->buffer_info, 0, size); 1589 memset(rxdr->buffer_info, 0, size);
@@ -1596,7 +1599,8 @@ static int e1000_setup_rx_resources(struct e1000_adapter *adapter,
1596 GFP_KERNEL); 1599 GFP_KERNEL);
1597 1600
1598 if (!rxdr->desc) { 1601 if (!rxdr->desc) {
1599 e_err("Unable to allocate memory for the Rx descriptor ring\n"); 1602 e_err(probe, "Unable to allocate memory for the Rx descriptor "
1603 "ring\n");
1600setup_rx_desc_die: 1604setup_rx_desc_die:
1601 vfree(rxdr->buffer_info); 1605 vfree(rxdr->buffer_info);
1602 return -ENOMEM; 1606 return -ENOMEM;
@@ -1606,7 +1610,7 @@ setup_rx_desc_die:
1606 if (!e1000_check_64k_bound(adapter, rxdr->desc, rxdr->size)) { 1610 if (!e1000_check_64k_bound(adapter, rxdr->desc, rxdr->size)) {
1607 void *olddesc = rxdr->desc; 1611 void *olddesc = rxdr->desc;
1608 dma_addr_t olddma = rxdr->dma; 1612 dma_addr_t olddma = rxdr->dma;
1609 e_err("rxdr align check failed: %u bytes at %p\n", 1613 e_err(rx_err, "rxdr align check failed: %u bytes at %p\n",
1610 rxdr->size, rxdr->desc); 1614 rxdr->size, rxdr->desc);
1611 /* Try again, without freeing the previous */ 1615 /* Try again, without freeing the previous */
1612 rxdr->desc = dma_alloc_coherent(&pdev->dev, rxdr->size, 1616 rxdr->desc = dma_alloc_coherent(&pdev->dev, rxdr->size,
@@ -1615,8 +1619,8 @@ setup_rx_desc_die:
1615 if (!rxdr->desc) { 1619 if (!rxdr->desc) {
1616 dma_free_coherent(&pdev->dev, rxdr->size, olddesc, 1620 dma_free_coherent(&pdev->dev, rxdr->size, olddesc,
1617 olddma); 1621 olddma);
1618 e_err("Unable to allocate memory for the Rx descriptor " 1622 e_err(probe, "Unable to allocate memory for the Rx "
1619 "ring\n"); 1623 "descriptor ring\n");
1620 goto setup_rx_desc_die; 1624 goto setup_rx_desc_die;
1621 } 1625 }
1622 1626
@@ -1626,8 +1630,8 @@ setup_rx_desc_die:
1626 rxdr->dma); 1630 rxdr->dma);
1627 dma_free_coherent(&pdev->dev, rxdr->size, olddesc, 1631 dma_free_coherent(&pdev->dev, rxdr->size, olddesc,
1628 olddma); 1632 olddma);
1629 e_err("Unable to allocate aligned memory for the Rx " 1633 e_err(probe, "Unable to allocate aligned memory for "
1630 "descriptor ring\n"); 1634 "the Rx descriptor ring\n");
1631 goto setup_rx_desc_die; 1635 goto setup_rx_desc_die;
1632 } else { 1636 } else {
1633 /* Free old allocation, new allocation was successful */ 1637 /* Free old allocation, new allocation was successful */
@@ -1659,7 +1663,7 @@ int e1000_setup_all_rx_resources(struct e1000_adapter *adapter)
1659 for (i = 0; i < adapter->num_rx_queues; i++) { 1663 for (i = 0; i < adapter->num_rx_queues; i++) {
1660 err = e1000_setup_rx_resources(adapter, &adapter->rx_ring[i]); 1664 err = e1000_setup_rx_resources(adapter, &adapter->rx_ring[i]);
1661 if (err) { 1665 if (err) {
1662 e_err("Allocation for Rx Queue %u failed\n", i); 1666 e_err(probe, "Allocation for Rx Queue %u failed\n", i);
1663 for (i-- ; i >= 0; i--) 1667 for (i-- ; i >= 0; i--)
1664 e1000_free_rx_resources(adapter, 1668 e1000_free_rx_resources(adapter,
1665 &adapter->rx_ring[i]); 1669 &adapter->rx_ring[i]);
@@ -2110,7 +2114,7 @@ static void e1000_set_rx_mode(struct net_device *netdev)
2110 u32 *mcarray = kcalloc(mta_reg_count, sizeof(u32), GFP_ATOMIC); 2114 u32 *mcarray = kcalloc(mta_reg_count, sizeof(u32), GFP_ATOMIC);
2111 2115
2112 if (!mcarray) { 2116 if (!mcarray) {
2113 e_err("memory allocation failed\n"); 2117 e_err(probe, "memory allocation failed\n");
2114 return; 2118 return;
2115 } 2119 }
2116 2120
@@ -2648,7 +2652,8 @@ static bool e1000_tx_csum(struct e1000_adapter *adapter,
2648 break; 2652 break;
2649 default: 2653 default:
2650 if (unlikely(net_ratelimit())) 2654 if (unlikely(net_ratelimit()))
2651 e_warn("checksum_partial proto=%x!\n", skb->protocol); 2655 e_warn(drv, "checksum_partial proto=%x!\n",
2656 skb->protocol);
2652 break; 2657 break;
2653 } 2658 }
2654 2659
@@ -2992,7 +2997,8 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
2992 /* fall through */ 2997 /* fall through */
2993 pull_size = min((unsigned int)4, skb->data_len); 2998 pull_size = min((unsigned int)4, skb->data_len);
2994 if (!__pskb_pull_tail(skb, pull_size)) { 2999 if (!__pskb_pull_tail(skb, pull_size)) {
2995 e_err("__pskb_pull_tail failed.\n"); 3000 e_err(drv, "__pskb_pull_tail "
3001 "failed.\n");
2996 dev_kfree_skb_any(skb); 3002 dev_kfree_skb_any(skb);
2997 return NETDEV_TX_OK; 3003 return NETDEV_TX_OK;
2998 } 3004 }
@@ -3140,7 +3146,7 @@ static int e1000_change_mtu(struct net_device *netdev, int new_mtu)
3140 3146
3141 if ((max_frame < MINIMUM_ETHERNET_FRAME_SIZE) || 3147 if ((max_frame < MINIMUM_ETHERNET_FRAME_SIZE) ||
3142 (max_frame > MAX_JUMBO_FRAME_SIZE)) { 3148 (max_frame > MAX_JUMBO_FRAME_SIZE)) {
3143 e_err("Invalid MTU setting\n"); 3149 e_err(probe, "Invalid MTU setting\n");
3144 return -EINVAL; 3150 return -EINVAL;
3145 } 3151 }
3146 3152
@@ -3148,7 +3154,7 @@ static int e1000_change_mtu(struct net_device *netdev, int new_mtu)
3148 switch (hw->mac_type) { 3154 switch (hw->mac_type) {
3149 case e1000_undefined ... e1000_82542_rev2_1: 3155 case e1000_undefined ... e1000_82542_rev2_1:
3150 if (max_frame > (ETH_FRAME_LEN + ETH_FCS_LEN)) { 3156 if (max_frame > (ETH_FRAME_LEN + ETH_FCS_LEN)) {
3151 e_err("Jumbo Frames not supported.\n"); 3157 e_err(probe, "Jumbo Frames not supported.\n");
3152 return -EINVAL; 3158 return -EINVAL;
3153 } 3159 }
3154 break; 3160 break;
@@ -3500,7 +3506,7 @@ static bool e1000_clean_tx_irq(struct e1000_adapter *adapter,
3500 !(er32(STATUS) & E1000_STATUS_TXOFF)) { 3506 !(er32(STATUS) & E1000_STATUS_TXOFF)) {
3501 3507
3502 /* detected Tx unit hang */ 3508 /* detected Tx unit hang */
3503 e_err("Detected Tx Unit Hang\n" 3509 e_err(drv, "Detected Tx Unit Hang\n"
3504 " Tx Queue <%lu>\n" 3510 " Tx Queue <%lu>\n"
3505 " TDH <%x>\n" 3511 " TDH <%x>\n"
3506 " TDT <%x>\n" 3512 " TDT <%x>\n"
@@ -3749,7 +3755,7 @@ static bool e1000_clean_jumbo_rx_irq(struct e1000_adapter *adapter,
3749 3755
3750 /* eth type trans needs skb->data to point to something */ 3756 /* eth type trans needs skb->data to point to something */
3751 if (!pskb_may_pull(skb, ETH_HLEN)) { 3757 if (!pskb_may_pull(skb, ETH_HLEN)) {
3752 e_err("pskb_may_pull failed.\n"); 3758 e_err(drv, "pskb_may_pull failed.\n");
3753 dev_kfree_skb(skb); 3759 dev_kfree_skb(skb);
3754 goto next_desc; 3760 goto next_desc;
3755 } 3761 }
@@ -3874,7 +3880,7 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter,
3874 3880
3875 if (adapter->discarding) { 3881 if (adapter->discarding) {
3876 /* All receives must fit into a single buffer */ 3882 /* All receives must fit into a single buffer */
3877 e_info("Receive packet consumed multiple buffers\n"); 3883 e_dbg("Receive packet consumed multiple buffers\n");
3878 /* recycle */ 3884 /* recycle */
3879 buffer_info->skb = skb; 3885 buffer_info->skb = skb;
3880 if (status & E1000_RXD_STAT_EOP) 3886 if (status & E1000_RXD_STAT_EOP)
@@ -3986,8 +3992,8 @@ e1000_alloc_jumbo_rx_buffers(struct e1000_adapter *adapter,
3986 /* Fix for errata 23, can't cross 64kB boundary */ 3992 /* Fix for errata 23, can't cross 64kB boundary */
3987 if (!e1000_check_64k_bound(adapter, skb->data, bufsz)) { 3993 if (!e1000_check_64k_bound(adapter, skb->data, bufsz)) {
3988 struct sk_buff *oldskb = skb; 3994 struct sk_buff *oldskb = skb;
3989 e_err("skb align check failed: %u bytes at %p\n", 3995 e_err(rx_err, "skb align check failed: %u bytes at "
3990 bufsz, skb->data); 3996 "%p\n", bufsz, skb->data);
3991 /* Try again, without freeing the previous */ 3997 /* Try again, without freeing the previous */
3992 skb = netdev_alloc_skb_ip_align(netdev, bufsz); 3998 skb = netdev_alloc_skb_ip_align(netdev, bufsz);
3993 /* Failed allocation, critical failure */ 3999 /* Failed allocation, critical failure */
@@ -4095,8 +4101,8 @@ static void e1000_alloc_rx_buffers(struct e1000_adapter *adapter,
4095 /* Fix for errata 23, can't cross 64kB boundary */ 4101 /* Fix for errata 23, can't cross 64kB boundary */
4096 if (!e1000_check_64k_bound(adapter, skb->data, bufsz)) { 4102 if (!e1000_check_64k_bound(adapter, skb->data, bufsz)) {
4097 struct sk_buff *oldskb = skb; 4103 struct sk_buff *oldskb = skb;
4098 e_err("skb align check failed: %u bytes at %p\n", 4104 e_err(rx_err, "skb align check failed: %u bytes at "
4099 bufsz, skb->data); 4105 "%p\n", bufsz, skb->data);
4100 /* Try again, without freeing the previous */ 4106 /* Try again, without freeing the previous */
4101 skb = netdev_alloc_skb_ip_align(netdev, bufsz); 4107 skb = netdev_alloc_skb_ip_align(netdev, bufsz);
4102 /* Failed allocation, critical failure */ 4108 /* Failed allocation, critical failure */
@@ -4141,8 +4147,8 @@ map_skb:
4141 if (!e1000_check_64k_bound(adapter, 4147 if (!e1000_check_64k_bound(adapter,
4142 (void *)(unsigned long)buffer_info->dma, 4148 (void *)(unsigned long)buffer_info->dma,
4143 adapter->rx_buffer_len)) { 4149 adapter->rx_buffer_len)) {
4144 e_err("dma align check failed: %u bytes at %p\n", 4150 e_err(rx_err, "dma align check failed: %u bytes at "
4145 adapter->rx_buffer_len, 4151 "%p\n", adapter->rx_buffer_len,
4146 (void *)(unsigned long)buffer_info->dma); 4152 (void *)(unsigned long)buffer_info->dma);
4147 dev_kfree_skb(skb); 4153 dev_kfree_skb(skb);
4148 buffer_info->skb = NULL; 4154 buffer_info->skb = NULL;
@@ -4355,7 +4361,7 @@ void e1000_pci_set_mwi(struct e1000_hw *hw)
4355 int ret_val = pci_set_mwi(adapter->pdev); 4361 int ret_val = pci_set_mwi(adapter->pdev);
4356 4362
4357 if (ret_val) 4363 if (ret_val)
4358 e_err("Error in setting MWI\n"); 4364 e_err(probe, "Error in setting MWI\n");
4359} 4365}
4360 4366
4361void e1000_pci_clear_mwi(struct e1000_hw *hw) 4367void e1000_pci_clear_mwi(struct e1000_hw *hw)
@@ -4486,7 +4492,7 @@ int e1000_set_spd_dplx(struct e1000_adapter *adapter, u16 spddplx)
4486 /* Fiber NICs only allow 1000 gbps Full duplex */ 4492 /* Fiber NICs only allow 1000 gbps Full duplex */
4487 if ((hw->media_type == e1000_media_type_fiber) && 4493 if ((hw->media_type == e1000_media_type_fiber) &&
4488 spddplx != (SPEED_1000 + DUPLEX_FULL)) { 4494 spddplx != (SPEED_1000 + DUPLEX_FULL)) {
4489 e_err("Unsupported Speed/Duplex configuration\n"); 4495 e_err(probe, "Unsupported Speed/Duplex configuration\n");
4490 return -EINVAL; 4496 return -EINVAL;
4491 } 4497 }
4492 4498
@@ -4509,7 +4515,7 @@ int e1000_set_spd_dplx(struct e1000_adapter *adapter, u16 spddplx)
4509 break; 4515 break;
4510 case SPEED_1000 + DUPLEX_HALF: /* not supported */ 4516 case SPEED_1000 + DUPLEX_HALF: /* not supported */
4511 default: 4517 default:
4512 e_err("Unsupported Speed/Duplex configuration\n"); 4518 e_err(probe, "Unsupported Speed/Duplex configuration\n");
4513 return -EINVAL; 4519 return -EINVAL;
4514 } 4520 }
4515 return 0; 4521 return 0;