Commit 396e799c authored by Emil Tantilov's avatar Emil Tantilov Committed by David S. Miller

ixgbe: use netif_<level> instead of netdev_<level>

This patch restores the ability to set msglvl through ethtool.
The issue was introduced by:
commit 849c4542

CC: Joe Perches <joe@perches.com>
Reported-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarEmil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4478a9cd
...@@ -715,7 +715,7 @@ static s32 ixgbe_setup_mac_link_smartspeed(struct ixgbe_hw *hw, ...@@ -715,7 +715,7 @@ static s32 ixgbe_setup_mac_link_smartspeed(struct ixgbe_hw *hw,
out: out:
if (link_up && (link_speed == IXGBE_LINK_SPEED_1GB_FULL)) if (link_up && (link_speed == IXGBE_LINK_SPEED_1GB_FULL))
e_info("Smartspeed has downgraded the link speed from " e_info(hw, "Smartspeed has downgraded the link speed from "
"the maximum advertised\n"); "the maximum advertised\n");
return status; return status;
} }
......
...@@ -108,16 +108,6 @@ s32 ixgbe_blink_led_stop_generic(struct ixgbe_hw *hw, u32 index); ...@@ -108,16 +108,6 @@ s32 ixgbe_blink_led_stop_generic(struct ixgbe_hw *hw, u32 index);
extern struct net_device *ixgbe_get_hw_dev(struct ixgbe_hw *hw); extern struct net_device *ixgbe_get_hw_dev(struct ixgbe_hw *hw);
#define hw_dbg(hw, format, arg...) \ #define hw_dbg(hw, format, arg...) \
netdev_dbg(ixgbe_get_hw_dev(hw), format, ##arg) netdev_dbg(ixgbe_get_hw_dev(hw), format, ##arg)
#define e_err(format, arg...) \
netdev_err(adapter->netdev, format, ## arg)
#define e_info(format, arg...) \
netdev_info(adapter->netdev, format, ## arg)
#define e_warn(format, arg...) \
netdev_warn(adapter->netdev, format, ## arg)
#define e_notice(format, arg...) \
netdev_notice(adapter->netdev, format, ## arg)
#define e_crit(format, arg...) \
netdev_crit(adapter->netdev, format, ## arg)
#define e_dev_info(format, arg...) \ #define e_dev_info(format, arg...) \
dev_info(&adapter->pdev->dev, format, ## arg) dev_info(&adapter->pdev->dev, format, ## arg)
#define e_dev_warn(format, arg...) \ #define e_dev_warn(format, arg...) \
...@@ -126,5 +116,12 @@ extern struct net_device *ixgbe_get_hw_dev(struct ixgbe_hw *hw); ...@@ -126,5 +116,12 @@ extern struct net_device *ixgbe_get_hw_dev(struct ixgbe_hw *hw);
dev_err(&adapter->pdev->dev, format, ## arg) dev_err(&adapter->pdev->dev, format, ## arg)
#define e_dev_notice(format, arg...) \ #define e_dev_notice(format, arg...) \
dev_notice(&adapter->pdev->dev, format, ## arg) dev_notice(&adapter->pdev->dev, format, ## arg)
#define e_info(msglvl, format, arg...) \
netif_info(adapter, msglvl, adapter->netdev, format, ## arg)
#define e_err(msglvl, format, arg...) \
netif_err(adapter, msglvl, adapter->netdev, format, ## arg)
#define e_warn(msglvl, format, arg...) \
netif_warn(adapter, msglvl, adapter->netdev, format, ## arg)
#define e_crit(msglvl, format, arg...) \
netif_crit(adapter, msglvl, adapter->netdev, format, ## arg)
#endif /* IXGBE_COMMON */ #endif /* IXGBE_COMMON */
...@@ -121,7 +121,7 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state) ...@@ -121,7 +121,7 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
goto out; goto out;
if (!(adapter->flags & IXGBE_FLAG_MSIX_ENABLED)) { if (!(adapter->flags & IXGBE_FLAG_MSIX_ENABLED)) {
e_err("Enable failed, needs MSI-X\n"); e_err(drv, "Enable failed, needs MSI-X\n");
err = 1; err = 1;
goto out; goto out;
} }
......
...@@ -301,7 +301,7 @@ static int ixgbe_set_settings(struct net_device *netdev, ...@@ -301,7 +301,7 @@ static int ixgbe_set_settings(struct net_device *netdev,
hw->mac.autotry_restart = true; hw->mac.autotry_restart = true;
err = hw->mac.ops.setup_link(hw, advertised, true, true); err = hw->mac.ops.setup_link(hw, advertised, true, true);
if (err) { if (err) {
e_info("setup link failed with code %d\n", err); e_info(probe, "setup link failed with code %d\n", err);
hw->mac.ops.setup_link(hw, old, true, true); hw->mac.ops.setup_link(hw, old, true, true);
} }
} else { } else {
...@@ -1194,7 +1194,7 @@ static struct ixgbe_reg_test reg_test_82598[] = { ...@@ -1194,7 +1194,7 @@ static struct ixgbe_reg_test reg_test_82598[] = {
writel((_test[pat] & W), (adapter->hw.hw_addr + R)); \ writel((_test[pat] & W), (adapter->hw.hw_addr + R)); \
val = readl(adapter->hw.hw_addr + R); \ val = readl(adapter->hw.hw_addr + R); \
if (val != (_test[pat] & W & M)) { \ if (val != (_test[pat] & W & M)) { \
e_err("pattern test reg %04X failed: got " \ e_err(drv, "pattern test reg %04X failed: got " \
"0x%08X expected 0x%08X\n", \ "0x%08X expected 0x%08X\n", \
R, val, (_test[pat] & W & M)); \ R, val, (_test[pat] & W & M)); \
*data = R; \ *data = R; \
...@@ -1212,7 +1212,7 @@ static struct ixgbe_reg_test reg_test_82598[] = { ...@@ -1212,7 +1212,7 @@ static struct ixgbe_reg_test reg_test_82598[] = {
writel((W & M), (adapter->hw.hw_addr + R)); \ writel((W & M), (adapter->hw.hw_addr + R)); \
val = readl(adapter->hw.hw_addr + R); \ val = readl(adapter->hw.hw_addr + R); \
if ((W & M) != (val & M)) { \ if ((W & M) != (val & M)) { \
e_err("set/check reg %04X test failed: got 0x%08X " \ e_err(drv, "set/check reg %04X test failed: got 0x%08X " \
"expected 0x%08X\n", R, (val & M), (W & M)); \ "expected 0x%08X\n", R, (val & M), (W & M)); \
*data = R; \ *data = R; \
writel(before, (adapter->hw.hw_addr + R)); \ writel(before, (adapter->hw.hw_addr + R)); \
...@@ -1246,8 +1246,8 @@ static int ixgbe_reg_test(struct ixgbe_adapter *adapter, u64 *data) ...@@ -1246,8 +1246,8 @@ static int ixgbe_reg_test(struct ixgbe_adapter *adapter, u64 *data)
IXGBE_WRITE_REG(&adapter->hw, IXGBE_STATUS, toggle); IXGBE_WRITE_REG(&adapter->hw, IXGBE_STATUS, toggle);
after = IXGBE_READ_REG(&adapter->hw, IXGBE_STATUS) & toggle; after = IXGBE_READ_REG(&adapter->hw, IXGBE_STATUS) & toggle;
if (value != after) { if (value != after) {
e_err("failed STATUS register test got: 0x%08X expected: " e_err(drv, "failed STATUS register test got: 0x%08X "
"0x%08X\n", after, value); "expected: 0x%08X\n", after, value);
*data = 1; *data = 1;
return 1; return 1;
} }
...@@ -1347,7 +1347,7 @@ static int ixgbe_intr_test(struct ixgbe_adapter *adapter, u64 *data) ...@@ -1347,7 +1347,7 @@ static int ixgbe_intr_test(struct ixgbe_adapter *adapter, u64 *data)
*data = 1; *data = 1;
return -1; return -1;
} }
e_info("testing %s interrupt\n", shared_int ? e_info(hw, "testing %s interrupt\n", shared_int ?
"shared" : "unshared"); "shared" : "unshared");
/* Disable all the interrupts */ /* Disable all the interrupts */
...@@ -1853,7 +1853,7 @@ static void ixgbe_diag_test(struct net_device *netdev, ...@@ -1853,7 +1853,7 @@ static void ixgbe_diag_test(struct net_device *netdev,
if (eth_test->flags == ETH_TEST_FL_OFFLINE) { if (eth_test->flags == ETH_TEST_FL_OFFLINE) {
/* Offline tests */ /* Offline tests */
e_info("offline testing starting\n"); e_info(hw, "offline testing starting\n");
/* Link test performed before hardware reset so autoneg doesn't /* Link test performed before hardware reset so autoneg doesn't
* interfere with test result */ * interfere with test result */
...@@ -1886,17 +1886,17 @@ static void ixgbe_diag_test(struct net_device *netdev, ...@@ -1886,17 +1886,17 @@ static void ixgbe_diag_test(struct net_device *netdev,
else else
ixgbe_reset(adapter); ixgbe_reset(adapter);
e_info("register testing starting\n"); e_info(hw, "register testing starting\n");
if (ixgbe_reg_test(adapter, &data[0])) if (ixgbe_reg_test(adapter, &data[0]))
eth_test->flags |= ETH_TEST_FL_FAILED; eth_test->flags |= ETH_TEST_FL_FAILED;
ixgbe_reset(adapter); ixgbe_reset(adapter);
e_info("eeprom testing starting\n"); e_info(hw, "eeprom testing starting\n");
if (ixgbe_eeprom_test(adapter, &data[1])) if (ixgbe_eeprom_test(adapter, &data[1]))
eth_test->flags |= ETH_TEST_FL_FAILED; eth_test->flags |= ETH_TEST_FL_FAILED;
ixgbe_reset(adapter); ixgbe_reset(adapter);
e_info("interrupt testing starting\n"); e_info(hw, "interrupt testing starting\n");
if (ixgbe_intr_test(adapter, &data[2])) if (ixgbe_intr_test(adapter, &data[2]))
eth_test->flags |= ETH_TEST_FL_FAILED; eth_test->flags |= ETH_TEST_FL_FAILED;
...@@ -1904,13 +1904,14 @@ static void ixgbe_diag_test(struct net_device *netdev, ...@@ -1904,13 +1904,14 @@ static void ixgbe_diag_test(struct net_device *netdev,
* loopback diagnostic. */ * loopback diagnostic. */
if (adapter->flags & (IXGBE_FLAG_SRIOV_ENABLED | if (adapter->flags & (IXGBE_FLAG_SRIOV_ENABLED |
IXGBE_FLAG_VMDQ_ENABLED)) { IXGBE_FLAG_VMDQ_ENABLED)) {
e_info("Skip MAC loopback diagnostic in VT mode\n"); e_info(hw, "Skip MAC loopback diagnostic in VT "
"mode\n");
data[3] = 0; data[3] = 0;
goto skip_loopback; goto skip_loopback;
} }
ixgbe_reset(adapter); ixgbe_reset(adapter);
e_info("loopback testing starting\n"); e_info(hw, "loopback testing starting\n");
if (ixgbe_loopback_test(adapter, &data[3])) if (ixgbe_loopback_test(adapter, &data[3]))
eth_test->flags |= ETH_TEST_FL_FAILED; eth_test->flags |= ETH_TEST_FL_FAILED;
...@@ -1921,7 +1922,7 @@ static void ixgbe_diag_test(struct net_device *netdev, ...@@ -1921,7 +1922,7 @@ static void ixgbe_diag_test(struct net_device *netdev,
if (if_running) if (if_running)
dev_open(netdev); dev_open(netdev);
} else { } else {
e_info("online testing starting\n"); e_info(hw, "online testing starting\n");
/* Online tests */ /* Online tests */
if (ixgbe_link_test(adapter, &data[4])) if (ixgbe_link_test(adapter, &data[4]))
eth_test->flags |= ETH_TEST_FL_FAILED; eth_test->flags |= ETH_TEST_FL_FAILED;
...@@ -2139,7 +2140,8 @@ static int ixgbe_set_coalesce(struct net_device *netdev, ...@@ -2139,7 +2140,8 @@ static int ixgbe_set_coalesce(struct net_device *netdev,
adapter->flags2 &= ~IXGBE_FLAG2_RSC_ENABLED; adapter->flags2 &= ~IXGBE_FLAG2_RSC_ENABLED;
if (netdev->features & NETIF_F_LRO) { if (netdev->features & NETIF_F_LRO) {
netdev->features &= ~NETIF_F_LRO; netdev->features &= ~NETIF_F_LRO;
e_info("rx-usecs set to 0, disabling RSC\n"); e_info(probe, "rx-usecs set to 0, "
"disabling RSC\n");
} }
need_reset = true; need_reset = true;
} }
...@@ -2239,7 +2241,7 @@ static int ixgbe_set_flags(struct net_device *netdev, u32 data) ...@@ -2239,7 +2241,7 @@ static int ixgbe_set_flags(struct net_device *netdev, u32 data)
} else if (!adapter->rx_itr_setting) { } else if (!adapter->rx_itr_setting) {
netdev->features &= ~NETIF_F_LRO; netdev->features &= ~NETIF_F_LRO;
if (data & ETH_FLAG_LRO) if (data & ETH_FLAG_LRO)
e_info("rx-usecs set to 0, " e_info(probe, "rx-usecs set to 0, "
"LRO/RSC cannot be enabled.\n"); "LRO/RSC cannot be enabled.\n");
} }
} }
......
...@@ -164,19 +164,19 @@ int ixgbe_fcoe_ddp_get(struct net_device *netdev, u16 xid, ...@@ -164,19 +164,19 @@ int ixgbe_fcoe_ddp_get(struct net_device *netdev, u16 xid,
adapter = netdev_priv(netdev); adapter = netdev_priv(netdev);
if (xid >= IXGBE_FCOE_DDP_MAX) { if (xid >= IXGBE_FCOE_DDP_MAX) {
e_warn("xid=0x%x out-of-range\n", xid); e_warn(drv, "xid=0x%x out-of-range\n", xid);
return 0; return 0;
} }
fcoe = &adapter->fcoe; fcoe = &adapter->fcoe;
if (!fcoe->pool) { if (!fcoe->pool) {
e_warn("xid=0x%x no ddp pool for fcoe\n", xid); e_warn(drv, "xid=0x%x no ddp pool for fcoe\n", xid);
return 0; return 0;
} }
ddp = &fcoe->ddp[xid]; ddp = &fcoe->ddp[xid];
if (ddp->sgl) { if (ddp->sgl) {
e_err("xid 0x%x w/ non-null sgl=%p nents=%d\n", e_err(drv, "xid 0x%x w/ non-null sgl=%p nents=%d\n",
xid, ddp->sgl, ddp->sgc); xid, ddp->sgl, ddp->sgc);
return 0; return 0;
} }
...@@ -185,14 +185,14 @@ int ixgbe_fcoe_ddp_get(struct net_device *netdev, u16 xid, ...@@ -185,14 +185,14 @@ int ixgbe_fcoe_ddp_get(struct net_device *netdev, u16 xid,
/* setup dma from scsi command sgl */ /* setup dma from scsi command sgl */
dmacount = pci_map_sg(adapter->pdev, sgl, sgc, DMA_FROM_DEVICE); dmacount = pci_map_sg(adapter->pdev, sgl, sgc, DMA_FROM_DEVICE);
if (dmacount == 0) { if (dmacount == 0) {
e_err("xid 0x%x DMA map error\n", xid); e_err(drv, "xid 0x%x DMA map error\n", xid);
return 0; return 0;
} }
/* alloc the udl from our ddp pool */ /* alloc the udl from our ddp pool */
ddp->udl = pci_pool_alloc(fcoe->pool, GFP_KERNEL, &ddp->udp); ddp->udl = pci_pool_alloc(fcoe->pool, GFP_KERNEL, &ddp->udp);
if (!ddp->udl) { if (!ddp->udl) {
e_err("failed allocated ddp context\n"); e_err(drv, "failed allocated ddp context\n");
goto out_noddp_unmap; goto out_noddp_unmap;
} }
ddp->sgl = sgl; ddp->sgl = sgl;
...@@ -205,7 +205,7 @@ int ixgbe_fcoe_ddp_get(struct net_device *netdev, u16 xid, ...@@ -205,7 +205,7 @@ int ixgbe_fcoe_ddp_get(struct net_device *netdev, u16 xid,
while (len) { while (len) {
/* max number of buffers allowed in one DDP context */ /* max number of buffers allowed in one DDP context */
if (j >= IXGBE_BUFFCNT_MAX) { if (j >= IXGBE_BUFFCNT_MAX) {
e_err("xid=%x:%d,%d,%d:addr=%llx " e_err(drv, "xid=%x:%d,%d,%d:addr=%llx "
"not enough descriptors\n", "not enough descriptors\n",
xid, i, j, dmacount, (u64)addr); xid, i, j, dmacount, (u64)addr);
goto out_noddp_free; goto out_noddp_free;
...@@ -385,7 +385,7 @@ int ixgbe_fso(struct ixgbe_adapter *adapter, ...@@ -385,7 +385,7 @@ int ixgbe_fso(struct ixgbe_adapter *adapter,
struct fc_frame_header *fh; struct fc_frame_header *fh;
if (skb_is_gso(skb) && (skb_shinfo(skb)->gso_type != SKB_GSO_FCOE)) { if (skb_is_gso(skb) && (skb_shinfo(skb)->gso_type != SKB_GSO_FCOE)) {
e_err("Wrong gso type %d:expecting SKB_GSO_FCOE\n", e_err(drv, "Wrong gso type %d:expecting SKB_GSO_FCOE\n",
skb_shinfo(skb)->gso_type); skb_shinfo(skb)->gso_type);
return -EINVAL; return -EINVAL;
} }
...@@ -412,7 +412,7 @@ int ixgbe_fso(struct ixgbe_adapter *adapter, ...@@ -412,7 +412,7 @@ int ixgbe_fso(struct ixgbe_adapter *adapter,
fcoe_sof_eof |= IXGBE_ADVTXD_FCOEF_SOF; fcoe_sof_eof |= IXGBE_ADVTXD_FCOEF_SOF;
break; break;
default: default:
e_warn("unknown sof = 0x%x\n", sof); e_warn(drv, "unknown sof = 0x%x\n", sof);
return -EINVAL; return -EINVAL;
} }
...@@ -439,7 +439,7 @@ int ixgbe_fso(struct ixgbe_adapter *adapter, ...@@ -439,7 +439,7 @@ int ixgbe_fso(struct ixgbe_adapter *adapter,
fcoe_sof_eof |= IXGBE_ADVTXD_FCOEF_EOF_A; fcoe_sof_eof |= IXGBE_ADVTXD_FCOEF_EOF_A;
break; break;
default: default:
e_warn("unknown eof = 0x%x\n", eof); e_warn(drv, "unknown eof = 0x%x\n", eof);
return -EINVAL; return -EINVAL;
} }
...@@ -515,7 +515,7 @@ void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter) ...@@ -515,7 +515,7 @@ void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter)
adapter->pdev, IXGBE_FCPTR_MAX, adapter->pdev, IXGBE_FCPTR_MAX,
IXGBE_FCPTR_ALIGN, PAGE_SIZE); IXGBE_FCPTR_ALIGN, PAGE_SIZE);
if (!fcoe->pool) if (!fcoe->pool)
e_err("failed to allocated FCoE DDP pool\n"); e_err(drv, "failed to allocated FCoE DDP pool\n");
spin_lock_init(&fcoe->lock); spin_lock_init(&fcoe->lock);
} }
...@@ -611,7 +611,7 @@ int ixgbe_fcoe_enable(struct net_device *netdev) ...@@ -611,7 +611,7 @@ int ixgbe_fcoe_enable(struct net_device *netdev)
if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED)
goto out_enable; goto out_enable;
e_info("Enabling FCoE offload features.\n"); e_info(drv, "Enabling FCoE offload features.\n");
if (netif_running(netdev)) if (netif_running(netdev))
netdev->netdev_ops->ndo_stop(netdev); netdev->netdev_ops->ndo_stop(netdev);
...@@ -657,7 +657,7 @@ int ixgbe_fcoe_disable(struct net_device *netdev) ...@@ -657,7 +657,7 @@ int ixgbe_fcoe_disable(struct net_device *netdev)
if (!(adapter->flags & IXGBE_FLAG_FCOE_ENABLED)) if (!(adapter->flags & IXGBE_FLAG_FCOE_ENABLED))
goto out_disable; goto out_disable;
e_info("Disabling FCoE offload features.\n"); e_info(drv, "Disabling FCoE offload features.\n");
if (netif_running(netdev)) if (netif_running(netdev))
netdev->netdev_ops->ndo_stop(netdev); netdev->netdev_ops->ndo_stop(netdev);
......
...@@ -696,7 +696,7 @@ static inline bool ixgbe_check_tx_hang(struct ixgbe_adapter *adapter, ...@@ -696,7 +696,7 @@ static inline bool ixgbe_check_tx_hang(struct ixgbe_adapter *adapter,
/* detected Tx unit hang */ /* detected Tx unit hang */
union ixgbe_adv_tx_desc *tx_desc; union ixgbe_adv_tx_desc *tx_desc;
tx_desc = IXGBE_TX_DESC_ADV(*tx_ring, eop); tx_desc = IXGBE_TX_DESC_ADV(*tx_ring, eop);
e_err("Detected Tx Unit Hang\n" e_err(drv, "Detected Tx Unit Hang\n"
" Tx Queue <%d>\n" " Tx Queue <%d>\n"
" TDH, TDT <%x>, <%x>\n" " TDH, TDT <%x>, <%x>\n"
" next_to_use <%x>\n" " next_to_use <%x>\n"
...@@ -812,8 +812,8 @@ static bool ixgbe_clean_tx_irq(struct ixgbe_q_vector *q_vector, ...@@ -812,8 +812,8 @@ static bool ixgbe_clean_tx_irq(struct ixgbe_q_vector *q_vector,
if (adapter->detect_tx_hung) { if (adapter->detect_tx_hung) {
if (ixgbe_check_tx_hang(adapter, tx_ring, i)) { if (ixgbe_check_tx_hang(adapter, tx_ring, i)) {
/* schedule immediate reset if we believe we hung */ /* schedule immediate reset if we believe we hung */
e_info("tx hang %d detected, resetting adapter\n", e_info(probe, "tx hang %d detected, resetting "
adapter->tx_timeout_count + 1); "adapter\n", adapter->tx_timeout_count + 1);
ixgbe_tx_timeout(adapter->netdev); ixgbe_tx_timeout(adapter->netdev);
} }
} }
...@@ -1652,8 +1652,8 @@ static void ixgbe_check_overtemp_task(struct work_struct *work) ...@@ -1652,8 +1652,8 @@ static void ixgbe_check_overtemp_task(struct work_struct *work)
return; return;
break; break;
} }
e_crit("Network adapter has been stopped because it " e_crit(drv, "Network adapter has been stopped because it has "
"has over heated. Restart the computer. If the problem " "over heated. Restart the computer. If the problem "
"persists, power off the system and replace the " "persists, power off the system and replace the "
"adapter\n"); "adapter\n");
/* write to clear the interrupt */ /* write to clear the interrupt */
...@@ -1667,7 +1667,7 @@ static void ixgbe_check_fan_failure(struct ixgbe_adapter *adapter, u32 eicr) ...@@ -1667,7 +1667,7 @@ static void ixgbe_check_fan_failure(struct ixgbe_adapter *adapter, u32 eicr)
if ((adapter->flags & IXGBE_FLAG_FAN_FAIL_CAPABLE) && if ((adapter->flags & IXGBE_FLAG_FAN_FAIL_CAPABLE) &&
(eicr & IXGBE_EICR_GPI_SDP1)) { (eicr & IXGBE_EICR_GPI_SDP1)) {
e_crit("Fan has stopped, replace the adapter\n"); e_crit(probe, "Fan has stopped, replace the adapter\n");
/* write to clear the interrupt */ /* write to clear the interrupt */
IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP1); IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP1);
} }
...@@ -2153,7 +2153,7 @@ static int ixgbe_request_msix_irqs(struct ixgbe_adapter *adapter) ...@@ -2153,7 +2153,7 @@ static int ixgbe_request_msix_irqs(struct ixgbe_adapter *adapter)
handler, 0, adapter->name[vector], handler, 0, adapter->name[vector],
adapter->q_vector[vector]); adapter->q_vector[vector]);
if (err) { if (err) {
e_err("request_irq failed for MSIX interrupt: " e_err(probe, "request_irq failed for MSIX interrupt "
"Error: %d\n", err); "Error: %d\n", err);
goto free_queue_irqs; goto free_queue_irqs;
} }
...@@ -2163,7 +2163,7 @@ static int ixgbe_request_msix_irqs(struct ixgbe_adapter *adapter) ...@@ -2163,7 +2163,7 @@ static int ixgbe_request_msix_irqs(struct ixgbe_adapter *adapter)
err = request_irq(adapter->msix_entries[vector].vector, err = request_irq(adapter->msix_entries[vector].vector,
ixgbe_msix_lsc, 0, adapter->name[vector], netdev); ixgbe_msix_lsc, 0, adapter->name[vector], netdev);
if (err) { if (err) {
e_err("request_irq for msix_lsc failed: %d\n", err); e_err(probe, "request_irq for msix_lsc failed: %d\n", err);
goto free_queue_irqs; goto free_queue_irqs;
} }
...@@ -2349,7 +2349,7 @@ static int ixgbe_request_irq(struct ixgbe_adapter *adapter) ...@@ -2349,7 +2349,7 @@ static int ixgbe_request_irq(struct ixgbe_adapter *adapter)
} }
if (err) if (err)
e_err("request_irq failed, Error %d\n", err); e_err(probe, "request_irq failed, Error %d\n", err);
return err; return err;
} }
...@@ -2420,7 +2420,7 @@ static void ixgbe_configure_msi_and_legacy(struct ixgbe_adapter *adapter) ...@@ -2420,7 +2420,7 @@ static void ixgbe_configure_msi_and_legacy(struct ixgbe_adapter *adapter)
map_vector_to_rxq(adapter, 0, 0); map_vector_to_rxq(adapter, 0, 0);
map_vector_to_txq(adapter, 0, 0); map_vector_to_txq(adapter, 0, 0);
e_info("Legacy interrupt IVAR setup done\n"); e_info(hw, "Legacy interrupt IVAR setup done\n");
} }
/** /**
...@@ -3316,7 +3316,7 @@ static inline void ixgbe_rx_desc_queue_enable(struct ixgbe_adapter *adapter, ...@@ -3316,7 +3316,7 @@ static inline void ixgbe_rx_desc_queue_enable(struct ixgbe_adapter *adapter,
msleep(1); msleep(1);
} }
if (k >= IXGBE_MAX_RX_DESC_POLL) { if (k >= IXGBE_MAX_RX_DESC_POLL) {
e_err("RXDCTL.ENABLE on Rx queue %d not set within " e_err(drv, "RXDCTL.ENABLE on Rx queue %d not set within "
"the polling period\n", rxr); "the polling period\n", rxr);
} }
ixgbe_release_rx_desc(&adapter->hw, adapter->rx_ring[rxr], ixgbe_release_rx_desc(&adapter->hw, adapter->rx_ring[rxr],
...@@ -3446,7 +3446,7 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter) ...@@ -3446,7 +3446,7 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter)
} while (--wait_loop && } while (--wait_loop &&
!(txdctl & IXGBE_TXDCTL_ENABLE)); !(txdctl & IXGBE_TXDCTL_ENABLE));
if (!wait_loop) if (!wait_loop)
e_err("Could not enable Tx Queue %d\n", j); e_err(drv, "Could not enable Tx Queue %d\n", j);
} }
} }
...@@ -3494,7 +3494,7 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter) ...@@ -3494,7 +3494,7 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter)
if (adapter->flags & IXGBE_FLAG_FAN_FAIL_CAPABLE) { if (adapter->flags & IXGBE_FLAG_FAN_FAIL_CAPABLE) {
u32 esdp = IXGBE_READ_REG(hw, IXGBE_ESDP); u32 esdp = IXGBE_READ_REG(hw, IXGBE_ESDP);
if (esdp & IXGBE_ESDP_SDP1) if (esdp & IXGBE_ESDP_SDP1)
e_crit("Fan has stopped, replace the adapter\n"); e_crit(drv, "Fan has stopped, replace the adapter\n");
} }
/* /*
...@@ -3523,7 +3523,7 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter) ...@@ -3523,7 +3523,7 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter)
} else { } else {
err = ixgbe_non_sfp_link_config(hw); err = ixgbe_non_sfp_link_config(hw);
if (err) if (err)
e_err("link_config FAILED %d\n", err); e_err(probe, "link_config FAILED %d\n", err);
} }
for (i = 0; i < adapter->num_tx_queues; i++) for (i = 0; i < adapter->num_tx_queues; i++)
...@@ -3977,12 +3977,12 @@ static inline bool ixgbe_set_fcoe_queues(struct ixgbe_adapter *adapter) ...@@ -3977,12 +3977,12 @@ static inline bool ixgbe_set_fcoe_queues(struct ixgbe_adapter *adapter)
adapter->num_tx_queues = 1; adapter->num_tx_queues = 1;
#ifdef CONFIG_IXGBE_DCB #ifdef CONFIG_IXGBE_DCB
if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) { if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
e_info("FCoE enabled with DCB\n"); e_info(probe, "FCoE enabled with DCB\n");
ixgbe_set_dcb_queues(adapter); ixgbe_set_dcb_queues(adapter);
} }
#endif #endif
if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) { if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) {
e_info("FCoE enabled with RSS\n"); e_info(probe, "FCoE enabled with RSS\n");
if ((adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) || if ((adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) ||
(adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE)) (adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE))
ixgbe_set_fdir_queues(adapter); ixgbe_set_fdir_queues(adapter);
...@@ -4711,7 +4711,7 @@ static void ixgbe_sfp_task(struct work_struct *work) ...@@ -4711,7 +4711,7 @@ static void ixgbe_sfp_task(struct work_struct *work)
"supported module.\n"); "supported module.\n");
unregister_netdev(adapter->netdev); unregister_netdev(adapter->netdev);
} else { } else {
e_info("detected SFP+: %d\n", hw->phy.sfp_type); e_info(probe, "detected SFP+: %d\n", hw->phy.sfp_type);
} }
/* don't need this routine any more */ /* don't need this routine any more */
clear_bit(__IXGBE_SFP_MODULE_NOT_FOUND, &adapter->state); clear_bit(__IXGBE_SFP_MODULE_NOT_FOUND, &adapter->state);
...@@ -4891,7 +4891,7 @@ int ixgbe_setup_tx_resources(struct ixgbe_adapter *adapter, ...@@ -4891,7 +4891,7 @@ int ixgbe_setup_tx_resources(struct ixgbe_adapter *adapter,
err: err:
vfree(tx_ring->tx_buffer_info); vfree(tx_ring->tx_buffer_info);
tx_ring->tx_buffer_info = NULL; tx_ring->tx_buffer_info = NULL;
e_err("Unable to allocate memory for the Tx descriptor ring\n"); e_err(probe, "Unable to allocate memory for the Tx descriptor ring\n");
return -ENOMEM; return -ENOMEM;
} }
...@@ -4913,7 +4913,7 @@ static int ixgbe_setup_all_tx_resources(struct ixgbe_adapter *adapter) ...@@ -4913,7 +4913,7 @@ static int ixgbe_setup_all_tx_resources(struct ixgbe_adapter *adapter)
err = ixgbe_setup_tx_resources(adapter, adapter->tx_ring[i]); err = ixgbe_setup_tx_resources(adapter, adapter->tx_ring[i]);
if (!err) if (!err)
continue; continue;
e_err("Allocation for Tx Queue %u failed\n", i); e_err(probe, "Allocation for Tx Queue %u failed\n", i);
break; break;
} }
...@@ -4938,7 +4938,8 @@ int ixgbe_setup_rx_resources(struct ixgbe_adapter *adapter, ...@@ -4938,7 +4938,8 @@ int ixgbe_setup_rx_resources(struct ixgbe_adapter *adapter,
if (!rx_ring->rx_buffer_info) if (!rx_ring->rx_buffer_info)
rx_ring->rx_buffer_info = vmalloc(size); rx_ring->rx_buffer_info = vmalloc(size);
if (!rx_ring->rx_buffer_info) { if (!rx_ring->rx_buffer_info) {
e_err("vmalloc allocation failed for the Rx desc ring\n"); e_err(probe, "vmalloc allocation failed for the Rx "
"descriptor ring\n");
goto alloc_failed; goto alloc_failed;
} }
memset(rx_ring->rx_buffer_info, 0, size); memset(rx_ring->rx_buffer_info, 0, size);
...@@ -4951,7 +4952,8 @@ int ixgbe_setup_rx_resources(struct ixgbe_adapter *adapter, ...@@ -4951,7 +4952,8 @@ int ixgbe_setup_rx_resources(struct ixgbe_adapter *adapter,
&rx_ring->dma, GFP_KERNEL); &rx_ring->dma, GFP_KERNEL);
if (!rx_ring->desc) { if (!rx_ring->desc) {
e_err("Memory allocation failed for the Rx desc ring\n"); e_err(probe, "Memory allocation failed for the Rx "
"descriptor ring\n");
vfree(rx_ring->rx_buffer_info); vfree(rx_ring->rx_buffer_info);
goto alloc_failed; goto alloc_failed;
} }
...@@ -4984,7 +4986,7 @@ static int ixgbe_setup_all_rx_resources(struct ixgbe_adapter *adapter) ...@@ -4984,7 +4986,7 @@ static int ixgbe_setup_all_rx_resources(struct ixgbe_adapter *adapter)
err = ixgbe_setup_rx_resources(adapter, adapter->rx_ring[i]); err = ixgbe_setup_rx_resources(adapter, adapter->rx_ring[i]);
if (!err) if (!err)
continue; continue;
e_err("Allocation for Rx Queue %u failed\n", i); e_err(probe, "Allocation for Rx Queue %u failed\n", i);
break; break;
} }
...@@ -5083,7 +5085,7 @@ static int ixgbe_change_mtu(struct net_device *netdev, int new_mtu) ...@@ -5083,7 +5085,7 @@ static int ixgbe_change_mtu(struct net_device *netdev, int new_mtu)
if ((new_mtu < 68) || (max_frame > IXGBE_MAX_JUMBO_FRAME_SIZE)) if ((new_mtu < 68) || (max_frame > IXGBE_MAX_JUMBO_FRAME_SIZE))
return -EINVAL; return -EINVAL;
e_info("changing MTU from %d to %d\n", netdev->mtu, new_mtu); e_info(probe, "changing MTU from %d to %d\n", netdev->mtu, new_mtu);
/* must set new MTU before calling down or up */ /* must set new MTU before calling down or up */
netdev->mtu = new_mtu; netdev->mtu = new_mtu;
...@@ -5597,7 +5599,7 @@ static void ixgbe_fdir_reinit_task(struct work_struct *work) ...@@ -5597,7 +5599,7 @@ static void ixgbe_fdir_reinit_task(struct work_struct *work)
set_bit(__IXGBE_FDIR_INIT_DONE, set_bit(__IXGBE_FDIR_INIT_DONE,
&(adapter->tx_ring[i]->reinit_state)); &(adapter->tx_ring[i]->reinit_state));
} else { } else {
e_err("failed to finish FDIR re-initialization, " e_err(probe, "failed to finish FDIR re-initialization, "
"ignored adding FDIR ATR filters\n"); "ignored adding FDIR ATR filters\n");
} }
/* Done FDIR Re-initialization, enable transmits */ /* Done FDIR Re-initialization, enable transmits */
...@@ -5669,7 +5671,7 @@ static void ixgbe_watchdog_task(struct work_struct *work) ...@@ -5669,7 +5671,7 @@ static void ixgbe_watchdog_task(struct work_struct *work)
flow_tx = !!(rmcs & IXGBE_RMCS_TFCE_802_3X); flow_tx = !!(rmcs & IXGBE_RMCS_TFCE_802_3X);
} }
e_info("NIC Link is Up %s, Flow Control: %s\n", e_info(drv, "NIC Link is Up %s, Flow Control: %s\n",
(link_speed == IXGBE_LINK_SPEED_10GB_FULL ? (link_speed == IXGBE_LINK_SPEED_10GB_FULL ?
"10 Gbps" : "10 Gbps" :
(link_speed == IXGBE_LINK_SPEED_1GB_FULL ? (link_speed == IXGBE_LINK_SPEED_1GB_FULL ?
...@@ -5687,7 +5689,7 @@ static void ixgbe_watchdog_task(struct work_struct *work) ...@@ -5687,7 +5689,7 @@ static void ixgbe_watchdog_task(struct work_struct *work)
adapter->link_up = false; adapter->link_up = false;
adapter->link_speed = 0; adapter->link_speed = 0;
if (netif_carrier_ok(netdev)) { if (netif_carrier_ok(netdev)) {
e_info("NIC Link is Down\n"); e_info(drv, "NIC Link is Down\n");
netif_carrier_off(netdev); netif_carrier_off(netdev);
} }
} }
...@@ -5863,8 +5865,9 @@ static bool ixgbe_tx_csum(struct ixgbe_adapter *adapter, ...@@ -5863,8 +5865,9 @@ static bool ixgbe_tx_csum(struct ixgbe_adapter *adapter,
break; break;
default: default:
if (unlikely(net_ratelimit())) { if (unlikely(net_ratelimit())) {
e_warn("partial checksum but " e_warn(probe, "partial checksum "
"proto=%x!\n", skb->protocol); "but proto=%x!\n",
skb->protocol);
} }
break; break;
} }
...@@ -6472,7 +6475,7 @@ static void __devinit ixgbe_probe_vf(struct ixgbe_adapter *adapter, ...@@ -6472,7 +6475,7 @@ static void __devinit ixgbe_probe_vf(struct ixgbe_adapter *adapter,
adapter->flags |= IXGBE_FLAG_SRIOV_ENABLED; adapter->flags |= IXGBE_FLAG_SRIOV_ENABLED;
err = pci_enable_sriov(adapter->pdev, adapter->num_vfs); err = pci_enable_sriov(adapter->pdev, adapter->num_vfs);
if (err) { if (err) {
e_err("Failed to enable PCI sriov: %d\n", err); e_err(probe, "Failed to enable PCI sriov: %d\n", err);
goto err_novfs; goto err_novfs;
} }
/* If call to enable VFs succeeded then allocate memory /* If call to enable VFs succeeded then allocate memory
...@@ -6496,8 +6499,8 @@ static void __devinit ixgbe_probe_vf(struct ixgbe_adapter *adapter, ...@@ -6496,8 +6499,8 @@ static void __devinit ixgbe_probe_vf(struct ixgbe_adapter *adapter,
} }
/* Oh oh */ /* Oh oh */
e_err("Unable to allocate memory for VF Data Storage - SRIOV " e_err(probe, "Unable to allocate memory for VF Data Storage - "
"disabled\n"); "SRIOV disabled\n");
pci_disable_sriov(adapter->pdev); pci_disable_sriov(adapter->pdev);
err_novfs: err_novfs:
...@@ -6667,7 +6670,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, ...@@ -6667,7 +6670,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
if (adapter->flags & IXGBE_FLAG_FAN_FAIL_CAPABLE) { if (adapter->flags & IXGBE_FLAG_FAN_FAIL_CAPABLE) {
u32 esdp = IXGBE_READ_REG(hw, IXGBE_ESDP); u32 esdp = IXGBE_READ_REG(hw, IXGBE_ESDP);
if (esdp & IXGBE_ESDP_SDP1) if (esdp & IXGBE_ESDP_SDP1)
e_crit("Fan has stopped, replace the adapter\n"); e_crit(probe, "Fan has stopped, replace the adapter\n");
} }
/* reset_hw fills in the perm_addr as well */ /* reset_hw fills in the perm_addr as well */
...@@ -6851,7 +6854,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, ...@@ -6851,7 +6854,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
} }
#endif #endif
if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) { if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) {
e_info("IOV is enabled with %d VFs\n", adapter->num_vfs); e_info(probe, "IOV is enabled with %d VFs\n", adapter->num_vfs);
for (i = 0; i < adapter->num_vfs; i++) for (i = 0; i < adapter->num_vfs; i++)
ixgbe_vf_configuration(pdev, (i | 0x10000000)); ixgbe_vf_configuration(pdev, (i | 0x10000000));
} }
...@@ -6999,7 +7002,7 @@ static pci_ers_result_t ixgbe_io_slot_reset(struct pci_dev *pdev) ...@@ -6999,7 +7002,7 @@ static pci_ers_result_t ixgbe_io_slot_reset(struct pci_dev *pdev)
int err; int err;
if (pci_enable_device_mem(pdev)) { if (pci_enable_device_mem(pdev)) {
e_err("Cannot re-enable PCI device after reset.\n"); e_err(probe, "Cannot re-enable PCI device after reset.\n");
result = PCI_ERS_RESULT_DISCONNECT; result = PCI_ERS_RESULT_DISCONNECT;
} else { } else {
pci_set_master(pdev); pci_set_master(pdev);
...@@ -7037,7 +7040,7 @@ static void ixgbe_io_resume(struct pci_dev *pdev) ...@@ -7037,7 +7040,7 @@ static void ixgbe_io_resume(struct pci_dev *pdev)
if (netif_running(netdev)) { if (netif_running(netdev)) {
if (ixgbe_up(adapter)) { if (ixgbe_up(adapter)) {
e_info("ixgbe_up failed after reset\n"); e_info(probe, "ixgbe_up failed after reset\n");
return; return;
} }
} }
......
...@@ -185,7 +185,8 @@ int ixgbe_vf_configuration(struct pci_dev *pdev, unsigned int event_mask) ...@@ -185,7 +185,8 @@ int ixgbe_vf_configuration(struct pci_dev *pdev, unsigned int event_mask)
if (enable) { if (enable) {
random_ether_addr(vf_mac_addr); random_ether_addr(vf_mac_addr);
e_info("IOV: VF %d is enabled MAC %pM\n", vfn, vf_mac_addr); e_info(probe, "IOV: VF %d is enabled MAC %pM\n",
vfn, vf_mac_addr);
/* /*
* Store away the VF "permananet" MAC address, it will ask * Store away the VF "permananet" MAC address, it will ask
* for it later. * for it later.
...@@ -244,7 +245,7 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf) ...@@ -244,7 +245,7 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf)
if (msgbuf[0] == IXGBE_VF_RESET) { if (msgbuf[0] == IXGBE_VF_RESET) {
unsigned char *vf_mac = adapter->vfinfo[vf].vf_mac_addresses; unsigned char *vf_mac = adapter->vfinfo[vf].vf_mac_addresses;
u8 *addr = (u8 *)(&msgbuf[1]); u8 *addr = (u8 *)(&msgbuf[1]);
e_info("VF Reset msg received from vf %d\n", vf); e_info(probe, "VF Reset msg received from vf %d\n", vf);
adapter->vfinfo[vf].clear_to_send = false; adapter->vfinfo[vf].clear_to_send = false;
ixgbe_vf_reset_msg(adapter, vf); ixgbe_vf_reset_msg(adapter, vf);
adapter->vfinfo[vf].clear_to_send = true; adapter->vfinfo[vf].clear_to_send = true;
...@@ -297,7 +298,7 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf) ...@@ -297,7 +298,7 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf)
retval = ixgbe_set_vf_vlan(adapter, add, vid, vf); retval = ixgbe_set_vf_vlan(adapter, add, vid, vf);
break; break;
default: default:
e_err("Unhandled Msg %8.8x\n", msgbuf[0]); e_err(drv, "Unhandled Msg %8.8x\n", msgbuf[0]);
retval = IXGBE_ERR_MBX; retval = IXGBE_ERR_MBX;
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment