forked from Minki/linux
ixgbe: Use netdev_<level>, dev_<level>, pr_<level>
This patch is alternative to a previous patch submitted by Joe Perches. Create common macros e_<level> and e_dev_<level> that use netdev_<level> and dev_<level> similar to e1000e. Redefined pr_fmt for driver messages. Use %pM to display MAC address. Aligned text to better match the new format. CC: Joe Perches <joe@perches.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
faa9dcf793
commit
849c45423c
@ -44,11 +44,9 @@
|
||||
#include <linux/dca.h>
|
||||
#endif
|
||||
|
||||
#define PFX "ixgbe: "
|
||||
#define DPRINTK(nlevel, klevel, fmt, args...) \
|
||||
((void)((NETIF_MSG_##nlevel & adapter->msg_enable) && \
|
||||
printk(KERN_##klevel PFX "%s: %s: " fmt, adapter->netdev->name, \
|
||||
__func__ , ## args)))
|
||||
/* common prefix used by pr_<> macros */
|
||||
#undef pr_fmt
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
/* TX/RX descriptor defines */
|
||||
#define IXGBE_DEFAULT_TXD 512
|
||||
|
@ -707,9 +707,8 @@ static s32 ixgbe_setup_mac_link_smartspeed(struct ixgbe_hw *hw,
|
||||
|
||||
out:
|
||||
if (link_up && (link_speed == IXGBE_LINK_SPEED_1GB_FULL))
|
||||
netif_info(adapter, hw, adapter->netdev, "Smartspeed has"
|
||||
" downgraded the link speed from the maximum"
|
||||
" advertised\n");
|
||||
e_info("Smartspeed has downgraded the link speed from "
|
||||
"the maximum advertised\n");
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -105,12 +105,26 @@ s32 ixgbe_blink_led_stop_generic(struct ixgbe_hw *hw, u32 index);
|
||||
|
||||
#define IXGBE_WRITE_FLUSH(a) IXGBE_READ_REG(a, IXGBE_STATUS)
|
||||
|
||||
#ifdef DEBUG
|
||||
extern char *ixgbe_get_hw_dev_name(struct ixgbe_hw *hw);
|
||||
extern struct net_device *ixgbe_get_hw_dev(struct ixgbe_hw *hw);
|
||||
#define hw_dbg(hw, format, arg...) \
|
||||
printk(KERN_DEBUG "%s: " format, ixgbe_get_hw_dev_name(hw), ##arg)
|
||||
#else
|
||||
#define hw_dbg(hw, format, arg...) do {} while (0)
|
||||
#endif
|
||||
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...) \
|
||||
dev_info(&adapter->pdev->dev, format, ## arg)
|
||||
#define e_dev_warn(format, arg...) \
|
||||
dev_warn(&adapter->pdev->dev, format, ## arg)
|
||||
#define e_dev_err(format, arg...) \
|
||||
dev_err(&adapter->pdev->dev, format, ## arg)
|
||||
#define e_dev_notice(format, arg...) \
|
||||
dev_notice(&adapter->pdev->dev, format, ## arg)
|
||||
|
||||
#endif /* IXGBE_COMMON */
|
||||
|
@ -121,7 +121,7 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
|
||||
goto out;
|
||||
|
||||
if (!(adapter->flags & IXGBE_FLAG_MSIX_ENABLED)) {
|
||||
DPRINTK(DRV, ERR, "Enable failed, needs MSI-X\n");
|
||||
e_err("Enable failed, needs MSI-X\n");
|
||||
err = 1;
|
||||
goto out;
|
||||
}
|
||||
|
@ -294,8 +294,7 @@ static int ixgbe_set_settings(struct net_device *netdev,
|
||||
hw->mac.autotry_restart = true;
|
||||
err = hw->mac.ops.setup_link(hw, advertised, true, true);
|
||||
if (err) {
|
||||
DPRINTK(PROBE, INFO,
|
||||
"setup link failed with code %d\n", err);
|
||||
e_info("setup link failed with code %d\n", err);
|
||||
hw->mac.ops.setup_link(hw, old, true, true);
|
||||
}
|
||||
} else {
|
||||
@ -1188,9 +1187,9 @@ static struct ixgbe_reg_test reg_test_82598[] = {
|
||||
writel((_test[pat] & W), (adapter->hw.hw_addr + R)); \
|
||||
val = readl(adapter->hw.hw_addr + R); \
|
||||
if (val != (_test[pat] & W & M)) { \
|
||||
DPRINTK(DRV, ERR, "pattern test reg %04X failed: got "\
|
||||
"0x%08X expected 0x%08X\n", \
|
||||
R, val, (_test[pat] & W & M)); \
|
||||
e_err("pattern test reg %04X failed: got " \
|
||||
"0x%08X expected 0x%08X\n", \
|
||||
R, val, (_test[pat] & W & M)); \
|
||||
*data = R; \
|
||||
writel(before, adapter->hw.hw_addr + R); \
|
||||
return 1; \
|
||||
@ -1206,8 +1205,8 @@ static struct ixgbe_reg_test reg_test_82598[] = {
|
||||
writel((W & M), (adapter->hw.hw_addr + R)); \
|
||||
val = readl(adapter->hw.hw_addr + R); \
|
||||
if ((W & M) != (val & M)) { \
|
||||
DPRINTK(DRV, ERR, "set/check reg %04X test failed: got 0x%08X "\
|
||||
"expected 0x%08X\n", R, (val & M), (W & M)); \
|
||||
e_err("set/check reg %04X test failed: got 0x%08X " \
|
||||
"expected 0x%08X\n", R, (val & M), (W & M)); \
|
||||
*data = R; \
|
||||
writel(before, (adapter->hw.hw_addr + R)); \
|
||||
return 1; \
|
||||
@ -1240,8 +1239,8 @@ static int ixgbe_reg_test(struct ixgbe_adapter *adapter, u64 *data)
|
||||
IXGBE_WRITE_REG(&adapter->hw, IXGBE_STATUS, toggle);
|
||||
after = IXGBE_READ_REG(&adapter->hw, IXGBE_STATUS) & toggle;
|
||||
if (value != after) {
|
||||
DPRINTK(DRV, ERR, "failed STATUS register test got: "
|
||||
"0x%08X expected: 0x%08X\n", after, value);
|
||||
e_err("failed STATUS register test got: 0x%08X expected: "
|
||||
"0x%08X\n", after, value);
|
||||
*data = 1;
|
||||
return 1;
|
||||
}
|
||||
@ -1341,8 +1340,8 @@ static int ixgbe_intr_test(struct ixgbe_adapter *adapter, u64 *data)
|
||||
*data = 1;
|
||||
return -1;
|
||||
}
|
||||
DPRINTK(HW, INFO, "testing %s interrupt\n",
|
||||
(shared_int ? "shared" : "unshared"));
|
||||
e_info("testing %s interrupt\n", shared_int ?
|
||||
"shared" : "unshared");
|
||||
|
||||
/* Disable all the interrupts */
|
||||
IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, 0xFFFFFFFF);
|
||||
@ -1847,7 +1846,7 @@ static void ixgbe_diag_test(struct net_device *netdev,
|
||||
if (eth_test->flags == ETH_TEST_FL_OFFLINE) {
|
||||
/* Offline tests */
|
||||
|
||||
DPRINTK(HW, INFO, "offline testing starting\n");
|
||||
e_info("offline testing starting\n");
|
||||
|
||||
/* Link test performed before hardware reset so autoneg doesn't
|
||||
* interfere with test result */
|
||||
@ -1880,17 +1879,17 @@ static void ixgbe_diag_test(struct net_device *netdev,
|
||||
else
|
||||
ixgbe_reset(adapter);
|
||||
|
||||
DPRINTK(HW, INFO, "register testing starting\n");
|
||||
e_info("register testing starting\n");
|
||||
if (ixgbe_reg_test(adapter, &data[0]))
|
||||
eth_test->flags |= ETH_TEST_FL_FAILED;
|
||||
|
||||
ixgbe_reset(adapter);
|
||||
DPRINTK(HW, INFO, "eeprom testing starting\n");
|
||||
e_info("eeprom testing starting\n");
|
||||
if (ixgbe_eeprom_test(adapter, &data[1]))
|
||||
eth_test->flags |= ETH_TEST_FL_FAILED;
|
||||
|
||||
ixgbe_reset(adapter);
|
||||
DPRINTK(HW, INFO, "interrupt testing starting\n");
|
||||
e_info("interrupt testing starting\n");
|
||||
if (ixgbe_intr_test(adapter, &data[2]))
|
||||
eth_test->flags |= ETH_TEST_FL_FAILED;
|
||||
|
||||
@ -1898,14 +1897,13 @@ static void ixgbe_diag_test(struct net_device *netdev,
|
||||
* loopback diagnostic. */
|
||||
if (adapter->flags & (IXGBE_FLAG_SRIOV_ENABLED |
|
||||
IXGBE_FLAG_VMDQ_ENABLED)) {
|
||||
DPRINTK(HW, INFO, "Skip MAC loopback diagnostic in VT "
|
||||
"mode\n");
|
||||
e_info("Skip MAC loopback diagnostic in VT mode\n");
|
||||
data[3] = 0;
|
||||
goto skip_loopback;
|
||||
}
|
||||
|
||||
ixgbe_reset(adapter);
|
||||
DPRINTK(HW, INFO, "loopback testing starting\n");
|
||||
e_info("loopback testing starting\n");
|
||||
if (ixgbe_loopback_test(adapter, &data[3]))
|
||||
eth_test->flags |= ETH_TEST_FL_FAILED;
|
||||
|
||||
@ -1916,7 +1914,7 @@ skip_loopback:
|
||||
if (if_running)
|
||||
dev_open(netdev);
|
||||
} else {
|
||||
DPRINTK(HW, INFO, "online testing starting\n");
|
||||
e_info("online testing starting\n");
|
||||
/* Online tests */
|
||||
if (ixgbe_link_test(adapter, &data[4]))
|
||||
eth_test->flags |= ETH_TEST_FL_FAILED;
|
||||
@ -2089,8 +2087,8 @@ static bool ixgbe_reenable_rsc(struct ixgbe_adapter *adapter,
|
||||
(adapter->flags2 & IXGBE_FLAG2_RSC_CAPABLE)) {
|
||||
adapter->flags2 |= IXGBE_FLAG2_RSC_ENABLED;
|
||||
adapter->netdev->features |= NETIF_F_LRO;
|
||||
DPRINTK(PROBE, INFO, "rx-usecs set to %d, re-enabling RSC\n",
|
||||
ec->rx_coalesce_usecs);
|
||||
e_info("rx-usecs set to %d, re-enabling RSC\n",
|
||||
ec->rx_coalesce_usecs);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -2158,8 +2156,7 @@ static int ixgbe_set_coalesce(struct net_device *netdev,
|
||||
if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) {
|
||||
adapter->flags2 &= ~IXGBE_FLAG2_RSC_ENABLED;
|
||||
netdev->features &= ~NETIF_F_LRO;
|
||||
DPRINTK(PROBE, INFO,
|
||||
"rx-usecs set to 0, disabling RSC\n");
|
||||
e_info("rx-usecs set to 0, disabling RSC\n");
|
||||
|
||||
need_reset = true;
|
||||
}
|
||||
|
@ -25,7 +25,6 @@
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
|
||||
#include "ixgbe.h"
|
||||
#ifdef CONFIG_IXGBE_DCB
|
||||
#include "ixgbe_dcb_82599.h"
|
||||
@ -165,20 +164,20 @@ int ixgbe_fcoe_ddp_get(struct net_device *netdev, u16 xid,
|
||||
|
||||
adapter = netdev_priv(netdev);
|
||||
if (xid >= IXGBE_FCOE_DDP_MAX) {
|
||||
DPRINTK(DRV, WARNING, "xid=0x%x out-of-range\n", xid);
|
||||
e_warn("xid=0x%x out-of-range\n", xid);
|
||||
return 0;
|
||||
}
|
||||
|
||||
fcoe = &adapter->fcoe;
|
||||
if (!fcoe->pool) {
|
||||
DPRINTK(DRV, WARNING, "xid=0x%x no ddp pool for fcoe\n", xid);
|
||||
e_warn("xid=0x%x no ddp pool for fcoe\n", xid);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ddp = &fcoe->ddp[xid];
|
||||
if (ddp->sgl) {
|
||||
DPRINTK(DRV, ERR, "xid 0x%x w/ non-null sgl=%p nents=%d\n",
|
||||
xid, ddp->sgl, ddp->sgc);
|
||||
e_err("xid 0x%x w/ non-null sgl=%p nents=%d\n",
|
||||
xid, ddp->sgl, ddp->sgc);
|
||||
return 0;
|
||||
}
|
||||
ixgbe_fcoe_clear_ddp(ddp);
|
||||
@ -186,14 +185,14 @@ int ixgbe_fcoe_ddp_get(struct net_device *netdev, u16 xid,
|
||||
/* setup dma from scsi command sgl */
|
||||
dmacount = pci_map_sg(adapter->pdev, sgl, sgc, DMA_FROM_DEVICE);
|
||||
if (dmacount == 0) {
|
||||
DPRINTK(DRV, ERR, "xid 0x%x DMA map error\n", xid);
|
||||
e_err("xid 0x%x DMA map error\n", xid);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* alloc the udl from our ddp pool */
|
||||
ddp->udl = pci_pool_alloc(fcoe->pool, GFP_KERNEL, &ddp->udp);
|
||||
if (!ddp->udl) {
|
||||
DPRINTK(DRV, ERR, "failed allocated ddp context\n");
|
||||
e_err("failed allocated ddp context\n");
|
||||
goto out_noddp_unmap;
|
||||
}
|
||||
ddp->sgl = sgl;
|
||||
@ -206,10 +205,9 @@ int ixgbe_fcoe_ddp_get(struct net_device *netdev, u16 xid,
|
||||
while (len) {
|
||||
/* max number of buffers allowed in one DDP context */
|
||||
if (j >= IXGBE_BUFFCNT_MAX) {
|
||||
netif_err(adapter, drv, adapter->netdev,
|
||||
"xid=%x:%d,%d,%d:addr=%llx "
|
||||
"not enough descriptors\n",
|
||||
xid, i, j, dmacount, (u64)addr);
|
||||
e_err("xid=%x:%d,%d,%d:addr=%llx "
|
||||
"not enough descriptors\n",
|
||||
xid, i, j, dmacount, (u64)addr);
|
||||
goto out_noddp_free;
|
||||
}
|
||||
|
||||
@ -387,8 +385,8 @@ int ixgbe_fso(struct ixgbe_adapter *adapter,
|
||||
struct fc_frame_header *fh;
|
||||
|
||||
if (skb_is_gso(skb) && (skb_shinfo(skb)->gso_type != SKB_GSO_FCOE)) {
|
||||
DPRINTK(DRV, ERR, "Wrong gso type %d:expecting SKB_GSO_FCOE\n",
|
||||
skb_shinfo(skb)->gso_type);
|
||||
e_err("Wrong gso type %d:expecting SKB_GSO_FCOE\n",
|
||||
skb_shinfo(skb)->gso_type);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -414,7 +412,7 @@ int ixgbe_fso(struct ixgbe_adapter *adapter,
|
||||
fcoe_sof_eof |= IXGBE_ADVTXD_FCOEF_SOF;
|
||||
break;
|
||||
default:
|
||||
DPRINTK(DRV, WARNING, "unknown sof = 0x%x\n", sof);
|
||||
e_warn("unknown sof = 0x%x\n", sof);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -441,7 +439,7 @@ int ixgbe_fso(struct ixgbe_adapter *adapter,
|
||||
fcoe_sof_eof |= IXGBE_ADVTXD_FCOEF_EOF_A;
|
||||
break;
|
||||
default:
|
||||
DPRINTK(DRV, WARNING, "unknown eof = 0x%x\n", eof);
|
||||
e_warn("unknown eof = 0x%x\n", eof);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -517,8 +515,7 @@ void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter)
|
||||
adapter->pdev, IXGBE_FCPTR_MAX,
|
||||
IXGBE_FCPTR_ALIGN, PAGE_SIZE);
|
||||
if (!fcoe->pool)
|
||||
DPRINTK(DRV, ERR,
|
||||
"failed to allocated FCoE DDP pool\n");
|
||||
e_err("failed to allocated FCoE DDP pool\n");
|
||||
|
||||
spin_lock_init(&fcoe->lock);
|
||||
}
|
||||
@ -614,7 +611,7 @@ int ixgbe_fcoe_enable(struct net_device *netdev)
|
||||
if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED)
|
||||
goto out_enable;
|
||||
|
||||
DPRINTK(DRV, INFO, "Enabling FCoE offload features.\n");
|
||||
e_info("Enabling FCoE offload features.\n");
|
||||
if (netif_running(netdev))
|
||||
netdev->netdev_ops->ndo_stop(netdev);
|
||||
|
||||
@ -660,7 +657,7 @@ int ixgbe_fcoe_disable(struct net_device *netdev)
|
||||
if (!(adapter->flags & IXGBE_FLAG_FCOE_ENABLED))
|
||||
goto out_disable;
|
||||
|
||||
DPRINTK(DRV, INFO, "Disabling FCoE offload features.\n");
|
||||
e_info("Disabling FCoE offload features.\n");
|
||||
if (netif_running(netdev))
|
||||
netdev->netdev_ops->ndo_stop(netdev);
|
||||
|
||||
|
@ -696,19 +696,19 @@ static inline bool ixgbe_check_tx_hang(struct ixgbe_adapter *adapter,
|
||||
/* detected Tx unit hang */
|
||||
union ixgbe_adv_tx_desc *tx_desc;
|
||||
tx_desc = IXGBE_TX_DESC_ADV(*tx_ring, eop);
|
||||
DPRINTK(DRV, ERR, "Detected Tx Unit Hang\n"
|
||||
" Tx Queue <%d>\n"
|
||||
" TDH, TDT <%x>, <%x>\n"
|
||||
" next_to_use <%x>\n"
|
||||
" next_to_clean <%x>\n"
|
||||
"tx_buffer_info[next_to_clean]\n"
|
||||
" time_stamp <%lx>\n"
|
||||
" jiffies <%lx>\n",
|
||||
tx_ring->queue_index,
|
||||
IXGBE_READ_REG(hw, tx_ring->head),
|
||||
IXGBE_READ_REG(hw, tx_ring->tail),
|
||||
tx_ring->next_to_use, eop,
|
||||
tx_ring->tx_buffer_info[eop].time_stamp, jiffies);
|
||||
e_err("Detected Tx Unit Hang\n"
|
||||
" Tx Queue <%d>\n"
|
||||
" TDH, TDT <%x>, <%x>\n"
|
||||
" next_to_use <%x>\n"
|
||||
" next_to_clean <%x>\n"
|
||||
"tx_buffer_info[next_to_clean]\n"
|
||||
" time_stamp <%lx>\n"
|
||||
" jiffies <%lx>\n",
|
||||
tx_ring->queue_index,
|
||||
IXGBE_READ_REG(hw, tx_ring->head),
|
||||
IXGBE_READ_REG(hw, tx_ring->tail),
|
||||
tx_ring->next_to_use, eop,
|
||||
tx_ring->tx_buffer_info[eop].time_stamp, jiffies);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -812,9 +812,8 @@ static bool ixgbe_clean_tx_irq(struct ixgbe_q_vector *q_vector,
|
||||
if (adapter->detect_tx_hung) {
|
||||
if (ixgbe_check_tx_hang(adapter, tx_ring, i)) {
|
||||
/* schedule immediate reset if we believe we hung */
|
||||
DPRINTK(PROBE, INFO,
|
||||
"tx hang %d detected, resetting adapter\n",
|
||||
adapter->tx_timeout_count + 1);
|
||||
e_info("tx hang %d detected, resetting adapter\n",
|
||||
adapter->tx_timeout_count + 1);
|
||||
ixgbe_tx_timeout(adapter->netdev);
|
||||
}
|
||||
}
|
||||
@ -1653,10 +1652,10 @@ static void ixgbe_check_overtemp_task(struct work_struct *work)
|
||||
return;
|
||||
break;
|
||||
}
|
||||
DPRINTK(DRV, ERR, "Network adapter has been stopped because it "
|
||||
"has over heated. Restart the computer. If the problem "
|
||||
"persists, power off the system and replace the "
|
||||
"adapter\n");
|
||||
e_crit("Network adapter has been stopped because it "
|
||||
"has over heated. Restart the computer. If the problem "
|
||||
"persists, power off the system and replace the "
|
||||
"adapter\n");
|
||||
/* write to clear the interrupt */
|
||||
IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP0);
|
||||
}
|
||||
@ -1668,7 +1667,7 @@ static void ixgbe_check_fan_failure(struct ixgbe_adapter *adapter, u32 eicr)
|
||||
|
||||
if ((adapter->flags & IXGBE_FLAG_FAN_FAIL_CAPABLE) &&
|
||||
(eicr & IXGBE_EICR_GPI_SDP1)) {
|
||||
DPRINTK(PROBE, CRIT, "Fan has stopped, replace the adapter\n");
|
||||
e_crit("Fan has stopped, replace the adapter\n");
|
||||
/* write to clear the interrupt */
|
||||
IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP1);
|
||||
}
|
||||
@ -2154,9 +2153,8 @@ static int ixgbe_request_msix_irqs(struct ixgbe_adapter *adapter)
|
||||
handler, 0, adapter->name[vector],
|
||||
adapter->q_vector[vector]);
|
||||
if (err) {
|
||||
DPRINTK(PROBE, ERR,
|
||||
"request_irq failed for MSIX interrupt "
|
||||
"Error: %d\n", err);
|
||||
e_err("request_irq failed for MSIX interrupt: "
|
||||
"Error: %d\n", err);
|
||||
goto free_queue_irqs;
|
||||
}
|
||||
}
|
||||
@ -2165,8 +2163,7 @@ static int ixgbe_request_msix_irqs(struct ixgbe_adapter *adapter)
|
||||
err = request_irq(adapter->msix_entries[vector].vector,
|
||||
ixgbe_msix_lsc, 0, adapter->name[vector], netdev);
|
||||
if (err) {
|
||||
DPRINTK(PROBE, ERR,
|
||||
"request_irq for msix_lsc failed: %d\n", err);
|
||||
e_err("request_irq for msix_lsc failed: %d\n", err);
|
||||
goto free_queue_irqs;
|
||||
}
|
||||
|
||||
@ -2352,7 +2349,7 @@ static int ixgbe_request_irq(struct ixgbe_adapter *adapter)
|
||||
}
|
||||
|
||||
if (err)
|
||||
DPRINTK(PROBE, ERR, "request_irq failed, Error %d\n", err);
|
||||
e_err("request_irq failed, Error %d\n", err);
|
||||
|
||||
return err;
|
||||
}
|
||||
@ -2423,7 +2420,7 @@ static void ixgbe_configure_msi_and_legacy(struct ixgbe_adapter *adapter)
|
||||
map_vector_to_rxq(adapter, 0, 0);
|
||||
map_vector_to_txq(adapter, 0, 0);
|
||||
|
||||
DPRINTK(HW, INFO, "Legacy interrupt IVAR setup done\n");
|
||||
e_info("Legacy interrupt IVAR setup done\n");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3257,8 +3254,8 @@ static inline void ixgbe_rx_desc_queue_enable(struct ixgbe_adapter *adapter,
|
||||
msleep(1);
|
||||
}
|
||||
if (k >= IXGBE_MAX_RX_DESC_POLL) {
|
||||
DPRINTK(DRV, ERR, "RXDCTL.ENABLE on Rx queue %d "
|
||||
"not set within the polling period\n", rxr);
|
||||
e_err("RXDCTL.ENABLE on Rx queue %d not set within "
|
||||
"the polling period\n", rxr);
|
||||
}
|
||||
ixgbe_release_rx_desc(&adapter->hw, adapter->rx_ring[rxr],
|
||||
(adapter->rx_ring[rxr]->count - 1));
|
||||
@ -3387,8 +3384,7 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter)
|
||||
} while (--wait_loop &&
|
||||
!(txdctl & IXGBE_TXDCTL_ENABLE));
|
||||
if (!wait_loop)
|
||||
DPRINTK(DRV, ERR, "Could not enable "
|
||||
"Tx Queue %d\n", j);
|
||||
e_err("Could not enable Tx Queue %d\n", j);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3436,8 +3432,7 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter)
|
||||
if (adapter->flags & IXGBE_FLAG_FAN_FAIL_CAPABLE) {
|
||||
u32 esdp = IXGBE_READ_REG(hw, IXGBE_ESDP);
|
||||
if (esdp & IXGBE_ESDP_SDP1)
|
||||
DPRINTK(DRV, CRIT,
|
||||
"Fan has stopped, replace the adapter\n");
|
||||
e_crit("Fan has stopped, replace the adapter\n");
|
||||
}
|
||||
|
||||
/*
|
||||
@ -3466,7 +3461,7 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter)
|
||||
} else {
|
||||
err = ixgbe_non_sfp_link_config(hw);
|
||||
if (err)
|
||||
DPRINTK(PROBE, ERR, "link_config FAILED %d\n", err);
|
||||
e_err("link_config FAILED %d\n", err);
|
||||
}
|
||||
|
||||
for (i = 0; i < adapter->num_tx_queues; i++)
|
||||
@ -3527,19 +3522,19 @@ void ixgbe_reset(struct ixgbe_adapter *adapter)
|
||||
case IXGBE_ERR_SFP_NOT_PRESENT:
|
||||
break;
|
||||
case IXGBE_ERR_MASTER_REQUESTS_PENDING:
|
||||
dev_err(&adapter->pdev->dev, "master disable timed out\n");
|
||||
e_dev_err("master disable timed out\n");
|
||||
break;
|
||||
case IXGBE_ERR_EEPROM_VERSION:
|
||||
/* We are running on a pre-production device, log a warning */
|
||||
dev_warn(&adapter->pdev->dev, "This device is a pre-production "
|
||||
"adapter/LOM. Please be aware there may be issues "
|
||||
"associated with your hardware. If you are "
|
||||
"experiencing problems please contact your Intel or "
|
||||
"hardware representative who provided you with this "
|
||||
"hardware.\n");
|
||||
e_dev_warn("This device is a pre-production adapter/LOM. "
|
||||
"Please be aware there may be issuesassociated with "
|
||||
"your hardware. If you are experiencing problems "
|
||||
"please contact your Intel or hardware "
|
||||
"representative who provided you with this "
|
||||
"hardware.\n");
|
||||
break;
|
||||
default:
|
||||
dev_err(&adapter->pdev->dev, "Hardware Error: %d\n", err);
|
||||
e_dev_err("Hardware Error: %d\n", err);
|
||||
}
|
||||
|
||||
/* reprogram the RAR[0] in case user changed it. */
|
||||
@ -3920,12 +3915,12 @@ static inline bool ixgbe_set_fcoe_queues(struct ixgbe_adapter *adapter)
|
||||
adapter->num_tx_queues = 1;
|
||||
#ifdef CONFIG_IXGBE_DCB
|
||||
if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
|
||||
DPRINTK(PROBE, INFO, "FCoE enabled with DCB\n");
|
||||
e_info("FCoE enabled with DCB\n");
|
||||
ixgbe_set_dcb_queues(adapter);
|
||||
}
|
||||
#endif
|
||||
if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) {
|
||||
DPRINTK(PROBE, INFO, "FCoE enabled with RSS\n");
|
||||
e_info("FCoE enabled with RSS\n");
|
||||
if ((adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) ||
|
||||
(adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE))
|
||||
ixgbe_set_fdir_queues(adapter);
|
||||
@ -4038,7 +4033,8 @@ static void ixgbe_acquire_msix_vectors(struct ixgbe_adapter *adapter,
|
||||
* This just means we'll go with either a single MSI
|
||||
* vector or fall back to legacy interrupts.
|
||||
*/
|
||||
DPRINTK(HW, DEBUG, "Unable to allocate MSI-X interrupts\n");
|
||||
netif_printk(adapter, hw, KERN_DEBUG, adapter->netdev,
|
||||
"Unable to allocate MSI-X interrupts\n");
|
||||
adapter->flags &= ~IXGBE_FLAG_MSIX_ENABLED;
|
||||
kfree(adapter->msix_entries);
|
||||
adapter->msix_entries = NULL;
|
||||
@ -4435,8 +4431,9 @@ static int ixgbe_set_interrupt_capability(struct ixgbe_adapter *adapter)
|
||||
if (!err) {
|
||||
adapter->flags |= IXGBE_FLAG_MSI_ENABLED;
|
||||
} else {
|
||||
DPRINTK(HW, DEBUG, "Unable to allocate MSI interrupt, "
|
||||
"falling back to legacy. Error: %d\n", err);
|
||||
netif_printk(adapter, hw, KERN_DEBUG, adapter->netdev,
|
||||
"Unable to allocate MSI interrupt, "
|
||||
"falling back to legacy. Error: %d\n", err);
|
||||
/* reset err */
|
||||
err = 0;
|
||||
}
|
||||
@ -4557,27 +4554,25 @@ int ixgbe_init_interrupt_scheme(struct ixgbe_adapter *adapter)
|
||||
|
||||
err = ixgbe_set_interrupt_capability(adapter);
|
||||
if (err) {
|
||||
DPRINTK(PROBE, ERR, "Unable to setup interrupt capabilities\n");
|
||||
e_dev_err("Unable to setup interrupt capabilities\n");
|
||||
goto err_set_interrupt;
|
||||
}
|
||||
|
||||
err = ixgbe_alloc_q_vectors(adapter);
|
||||
if (err) {
|
||||
DPRINTK(PROBE, ERR, "Unable to allocate memory for queue "
|
||||
"vectors\n");
|
||||
e_dev_err("Unable to allocate memory for queue vectors\n");
|
||||
goto err_alloc_q_vectors;
|
||||
}
|
||||
|
||||
err = ixgbe_alloc_queues(adapter);
|
||||
if (err) {
|
||||
DPRINTK(PROBE, ERR, "Unable to allocate memory for queues\n");
|
||||
e_dev_err("Unable to allocate memory for queues\n");
|
||||
goto err_alloc_queues;
|
||||
}
|
||||
|
||||
DPRINTK(DRV, INFO, "Multiqueue %s: Rx Queue count = %u, "
|
||||
"Tx Queue count = %u\n",
|
||||
(adapter->num_rx_queues > 1) ? "Enabled" :
|
||||
"Disabled", adapter->num_rx_queues, adapter->num_tx_queues);
|
||||
e_dev_info("Multiqueue %s: Rx Queue count = %u, Tx Queue count = %u\n",
|
||||
(adapter->num_rx_queues > 1) ? "Enabled" : "Disabled",
|
||||
adapter->num_rx_queues, adapter->num_tx_queues);
|
||||
|
||||
set_bit(__IXGBE_DOWN, &adapter->state);
|
||||
|
||||
@ -4648,15 +4643,13 @@ static void ixgbe_sfp_task(struct work_struct *work)
|
||||
goto reschedule;
|
||||
ret = hw->phy.ops.reset(hw);
|
||||
if (ret == IXGBE_ERR_SFP_NOT_SUPPORTED) {
|
||||
dev_err(&adapter->pdev->dev, "failed to initialize "
|
||||
"because an unsupported SFP+ module type "
|
||||
"was detected.\n"
|
||||
"Reload the driver after installing a "
|
||||
"supported module.\n");
|
||||
e_dev_err("failed to initialize because an unsupported "
|
||||
"SFP+ module type was detected.\n");
|
||||
e_dev_err("Reload the driver after installing a "
|
||||
"supported module.\n");
|
||||
unregister_netdev(adapter->netdev);
|
||||
} else {
|
||||
DPRINTK(PROBE, INFO, "detected SFP+: %d\n",
|
||||
hw->phy.sfp_type);
|
||||
e_info("detected SFP+: %d\n", hw->phy.sfp_type);
|
||||
}
|
||||
/* don't need this routine any more */
|
||||
clear_bit(__IXGBE_SFP_MODULE_NOT_FOUND, &adapter->state);
|
||||
@ -4783,7 +4776,7 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter)
|
||||
|
||||
/* initialize eeprom parameters */
|
||||
if (ixgbe_init_eeprom_params_generic(hw)) {
|
||||
dev_err(&pdev->dev, "EEPROM initialization failed\n");
|
||||
e_dev_err("EEPROM initialization failed\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
@ -4836,8 +4829,7 @@ int ixgbe_setup_tx_resources(struct ixgbe_adapter *adapter,
|
||||
err:
|
||||
vfree(tx_ring->tx_buffer_info);
|
||||
tx_ring->tx_buffer_info = NULL;
|
||||
DPRINTK(PROBE, ERR, "Unable to allocate memory for the transmit "
|
||||
"descriptor ring\n");
|
||||
e_err("Unable to allocate memory for the Tx descriptor ring\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@ -4859,7 +4851,7 @@ static int ixgbe_setup_all_tx_resources(struct ixgbe_adapter *adapter)
|
||||
err = ixgbe_setup_tx_resources(adapter, adapter->tx_ring[i]);
|
||||
if (!err)
|
||||
continue;
|
||||
DPRINTK(PROBE, ERR, "Allocation for Tx Queue %u failed\n", i);
|
||||
e_err("Allocation for Tx Queue %u failed\n", i);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -4884,8 +4876,7 @@ int ixgbe_setup_rx_resources(struct ixgbe_adapter *adapter,
|
||||
if (!rx_ring->rx_buffer_info)
|
||||
rx_ring->rx_buffer_info = vmalloc(size);
|
||||
if (!rx_ring->rx_buffer_info) {
|
||||
DPRINTK(PROBE, ERR,
|
||||
"vmalloc allocation failed for the rx desc ring\n");
|
||||
e_err("vmalloc allocation failed for the Rx desc ring\n");
|
||||
goto alloc_failed;
|
||||
}
|
||||
memset(rx_ring->rx_buffer_info, 0, size);
|
||||
@ -4898,8 +4889,7 @@ int ixgbe_setup_rx_resources(struct ixgbe_adapter *adapter,
|
||||
&rx_ring->dma, GFP_KERNEL);
|
||||
|
||||
if (!rx_ring->desc) {
|
||||
DPRINTK(PROBE, ERR,
|
||||
"Memory allocation failed for the rx desc ring\n");
|
||||
e_err("Memory allocation failed for the Rx desc ring\n");
|
||||
vfree(rx_ring->rx_buffer_info);
|
||||
goto alloc_failed;
|
||||
}
|
||||
@ -4932,7 +4922,7 @@ static int ixgbe_setup_all_rx_resources(struct ixgbe_adapter *adapter)
|
||||
err = ixgbe_setup_rx_resources(adapter, adapter->rx_ring[i]);
|
||||
if (!err)
|
||||
continue;
|
||||
DPRINTK(PROBE, ERR, "Allocation for Rx Queue %u failed\n", i);
|
||||
e_err("Allocation for Rx Queue %u failed\n", i);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -5031,8 +5021,7 @@ static int ixgbe_change_mtu(struct net_device *netdev, int new_mtu)
|
||||
if ((new_mtu < 68) || (max_frame > IXGBE_MAX_JUMBO_FRAME_SIZE))
|
||||
return -EINVAL;
|
||||
|
||||
DPRINTK(PROBE, INFO, "changing MTU from %d to %d\n",
|
||||
netdev->mtu, new_mtu);
|
||||
e_info("changing MTU from %d to %d\n", netdev->mtu, new_mtu);
|
||||
/* must set new MTU before calling down or up */
|
||||
netdev->mtu = new_mtu;
|
||||
|
||||
@ -5145,8 +5134,7 @@ static int ixgbe_resume(struct pci_dev *pdev)
|
||||
|
||||
err = pci_enable_device_mem(pdev);
|
||||
if (err) {
|
||||
printk(KERN_ERR "ixgbe: Cannot enable PCI device from "
|
||||
"suspend\n");
|
||||
e_dev_err("Cannot enable PCI device from suspend\n");
|
||||
return err;
|
||||
}
|
||||
pci_set_master(pdev);
|
||||
@ -5155,8 +5143,7 @@ static int ixgbe_resume(struct pci_dev *pdev)
|
||||
|
||||
err = ixgbe_init_interrupt_scheme(adapter);
|
||||
if (err) {
|
||||
printk(KERN_ERR "ixgbe: Cannot initialize interrupts for "
|
||||
"device\n");
|
||||
e_dev_err("Cannot initialize interrupts for device\n");
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -5512,10 +5499,10 @@ static void ixgbe_sfp_config_module_task(struct work_struct *work)
|
||||
err = hw->phy.ops.identify_sfp(hw);
|
||||
|
||||
if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) {
|
||||
dev_err(&adapter->pdev->dev, "failed to initialize because "
|
||||
"an unsupported SFP+ module type was detected.\n"
|
||||
"Reload the driver after installing a supported "
|
||||
"module.\n");
|
||||
e_dev_err("failed to initialize because an unsupported SFP+ "
|
||||
"module type was detected.\n");
|
||||
e_dev_err("Reload the driver after installing a supported "
|
||||
"module.\n");
|
||||
unregister_netdev(adapter->netdev);
|
||||
return;
|
||||
}
|
||||
@ -5544,8 +5531,8 @@ static void ixgbe_fdir_reinit_task(struct work_struct *work)
|
||||
set_bit(__IXGBE_FDIR_INIT_DONE,
|
||||
&(adapter->tx_ring[i]->reinit_state));
|
||||
} else {
|
||||
DPRINTK(PROBE, ERR, "failed to finish FDIR re-initialization, "
|
||||
"ignored adding FDIR ATR filters\n");
|
||||
e_err("failed to finish FDIR re-initialization, "
|
||||
"ignored adding FDIR ATR filters\n");
|
||||
}
|
||||
/* Done FDIR Re-initialization, enable transmits */
|
||||
netif_tx_start_all_queues(adapter->netdev);
|
||||
@ -5616,16 +5603,14 @@ static void ixgbe_watchdog_task(struct work_struct *work)
|
||||
flow_tx = !!(rmcs & IXGBE_RMCS_TFCE_802_3X);
|
||||
}
|
||||
|
||||
printk(KERN_INFO "ixgbe: %s NIC Link is Up %s, "
|
||||
"Flow Control: %s\n",
|
||||
netdev->name,
|
||||
e_info("NIC Link is Up %s, Flow Control: %s\n",
|
||||
(link_speed == IXGBE_LINK_SPEED_10GB_FULL ?
|
||||
"10 Gbps" :
|
||||
(link_speed == IXGBE_LINK_SPEED_1GB_FULL ?
|
||||
"1 Gbps" : "unknown speed")),
|
||||
"10 Gbps" :
|
||||
(link_speed == IXGBE_LINK_SPEED_1GB_FULL ?
|
||||
"1 Gbps" : "unknown speed")),
|
||||
((flow_rx && flow_tx) ? "RX/TX" :
|
||||
(flow_rx ? "RX" :
|
||||
(flow_tx ? "TX" : "None"))));
|
||||
(flow_rx ? "RX" :
|
||||
(flow_tx ? "TX" : "None"))));
|
||||
|
||||
netif_carrier_on(netdev);
|
||||
} else {
|
||||
@ -5636,8 +5621,7 @@ static void ixgbe_watchdog_task(struct work_struct *work)
|
||||
adapter->link_up = false;
|
||||
adapter->link_speed = 0;
|
||||
if (netif_carrier_ok(netdev)) {
|
||||
printk(KERN_INFO "ixgbe: %s NIC Link is Down\n",
|
||||
netdev->name);
|
||||
e_info("NIC Link is Down\n");
|
||||
netif_carrier_off(netdev);
|
||||
}
|
||||
}
|
||||
@ -5813,9 +5797,8 @@ static bool ixgbe_tx_csum(struct ixgbe_adapter *adapter,
|
||||
break;
|
||||
default:
|
||||
if (unlikely(net_ratelimit())) {
|
||||
DPRINTK(PROBE, WARNING,
|
||||
"partial checksum but proto=%x!\n",
|
||||
skb->protocol);
|
||||
e_warn("partial checksum but "
|
||||
"proto=%x!\n", skb->protocol);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -5926,7 +5909,7 @@ static int ixgbe_tx_map(struct ixgbe_adapter *adapter,
|
||||
return count;
|
||||
|
||||
dma_error:
|
||||
dev_err(&pdev->dev, "TX DMA map failed\n");
|
||||
e_dev_err("TX DMA map failed\n");
|
||||
|
||||
/* clear timestamp and dma mappings for failed tx_buffer_info map */
|
||||
tx_buffer_info->dma = 0;
|
||||
@ -6423,8 +6406,7 @@ static void __devinit ixgbe_probe_vf(struct ixgbe_adapter *adapter,
|
||||
adapter->flags |= IXGBE_FLAG_SRIOV_ENABLED;
|
||||
err = pci_enable_sriov(adapter->pdev, adapter->num_vfs);
|
||||
if (err) {
|
||||
DPRINTK(PROBE, ERR,
|
||||
"Failed to enable PCI sriov: %d\n", err);
|
||||
e_err("Failed to enable PCI sriov: %d\n", err);
|
||||
goto err_novfs;
|
||||
}
|
||||
/* If call to enable VFs succeeded then allocate memory
|
||||
@ -6448,9 +6430,8 @@ static void __devinit ixgbe_probe_vf(struct ixgbe_adapter *adapter,
|
||||
}
|
||||
|
||||
/* Oh oh */
|
||||
DPRINTK(PROBE, ERR,
|
||||
"Unable to allocate memory for VF "
|
||||
"Data Storage - SRIOV disabled\n");
|
||||
e_err("Unable to allocate memory for VF Data Storage - SRIOV "
|
||||
"disabled\n");
|
||||
pci_disable_sriov(adapter->pdev);
|
||||
|
||||
err_novfs:
|
||||
@ -6498,8 +6479,8 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
|
||||
err = dma_set_coherent_mask(&pdev->dev,
|
||||
DMA_BIT_MASK(32));
|
||||
if (err) {
|
||||
dev_err(&pdev->dev, "No usable DMA "
|
||||
"configuration, aborting\n");
|
||||
e_dev_err("No usable DMA configuration, "
|
||||
"aborting\n");
|
||||
goto err_dma;
|
||||
}
|
||||
}
|
||||
@ -6509,8 +6490,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
|
||||
err = pci_request_selected_regions(pdev, pci_select_bars(pdev,
|
||||
IORESOURCE_MEM), ixgbe_driver_name);
|
||||
if (err) {
|
||||
dev_err(&pdev->dev,
|
||||
"pci_request_selected_regions failed 0x%x\n", err);
|
||||
e_dev_err("pci_request_selected_regions failed 0x%x\n", err);
|
||||
goto err_pci_reg;
|
||||
}
|
||||
|
||||
@ -6621,8 +6601,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
|
||||
if (adapter->flags & IXGBE_FLAG_FAN_FAIL_CAPABLE) {
|
||||
u32 esdp = IXGBE_READ_REG(hw, IXGBE_ESDP);
|
||||
if (esdp & IXGBE_ESDP_SDP1)
|
||||
DPRINTK(PROBE, CRIT,
|
||||
"Fan has stopped, replace the adapter\n");
|
||||
e_crit("Fan has stopped, replace the adapter\n");
|
||||
}
|
||||
|
||||
/* reset_hw fills in the perm_addr as well */
|
||||
@ -6641,19 +6620,19 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
|
||||
round_jiffies(jiffies + (2 * HZ)));
|
||||
err = 0;
|
||||
} else if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) {
|
||||
dev_err(&adapter->pdev->dev, "failed to initialize because "
|
||||
"an unsupported SFP+ module type was detected.\n"
|
||||
"Reload the driver after installing a supported "
|
||||
"module.\n");
|
||||
e_dev_err("failed to initialize because an unsupported SFP+ "
|
||||
"module type was detected.\n");
|
||||
e_dev_err("Reload the driver after installing a supported "
|
||||
"module.\n");
|
||||
goto err_sw_init;
|
||||
} else if (err) {
|
||||
dev_err(&adapter->pdev->dev, "HW Init failed: %d\n", err);
|
||||
e_dev_err("HW Init failed: %d\n", err);
|
||||
goto err_sw_init;
|
||||
}
|
||||
|
||||
ixgbe_probe_vf(adapter, ii);
|
||||
|
||||
netdev->features = NETIF_F_SG |
|
||||
netdev->features = NETIF_F_SG |
|
||||
NETIF_F_IP_CSUM |
|
||||
NETIF_F_HW_VLAN_TX |
|
||||
NETIF_F_HW_VLAN_RX |
|
||||
@ -6700,7 +6679,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
|
||||
|
||||
/* make sure the EEPROM is good */
|
||||
if (hw->eeprom.ops.validate_checksum(hw, NULL) < 0) {
|
||||
dev_err(&pdev->dev, "The EEPROM Checksum Is Not Valid\n");
|
||||
e_dev_err("The EEPROM Checksum Is Not Valid\n");
|
||||
err = -EIO;
|
||||
goto err_eeprom;
|
||||
}
|
||||
@ -6709,7 +6688,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
|
||||
memcpy(netdev->perm_addr, hw->mac.perm_addr, netdev->addr_len);
|
||||
|
||||
if (ixgbe_validate_mac_addr(netdev->perm_addr)) {
|
||||
dev_err(&pdev->dev, "invalid MAC address\n");
|
||||
e_dev_err("invalid MAC address\n");
|
||||
err = -EIO;
|
||||
goto err_eeprom;
|
||||
}
|
||||
@ -6744,7 +6723,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
|
||||
hw->mac.ops.get_bus_info(hw);
|
||||
|
||||
/* print bus type/speed/width info */
|
||||
dev_info(&pdev->dev, "(PCI Express:%s:%s) %pM\n",
|
||||
e_dev_info("(PCI Express:%s:%s) %pM\n",
|
||||
((hw->bus.speed == ixgbe_bus_speed_5000) ? "5.0Gb/s":
|
||||
(hw->bus.speed == ixgbe_bus_speed_2500) ? "2.5Gb/s":"Unknown"),
|
||||
((hw->bus.width == ixgbe_bus_width_pcie_x8) ? "Width x8" :
|
||||
@ -6754,20 +6733,20 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
|
||||
netdev->dev_addr);
|
||||
ixgbe_read_pba_num_generic(hw, &part_num);
|
||||
if (ixgbe_is_sfp(hw) && hw->phy.sfp_type != ixgbe_sfp_type_not_present)
|
||||
dev_info(&pdev->dev, "MAC: %d, PHY: %d, SFP+: %d, PBA No: %06x-%03x\n",
|
||||
hw->mac.type, hw->phy.type, hw->phy.sfp_type,
|
||||
(part_num >> 8), (part_num & 0xff));
|
||||
e_dev_info("MAC: %d, PHY: %d, SFP+: %d, "
|
||||
"PBA No: %06x-%03x\n",
|
||||
hw->mac.type, hw->phy.type, hw->phy.sfp_type,
|
||||
(part_num >> 8), (part_num & 0xff));
|
||||
else
|
||||
dev_info(&pdev->dev, "MAC: %d, PHY: %d, PBA No: %06x-%03x\n",
|
||||
hw->mac.type, hw->phy.type,
|
||||
(part_num >> 8), (part_num & 0xff));
|
||||
e_dev_info("MAC: %d, PHY: %d, PBA No: %06x-%03x\n",
|
||||
hw->mac.type, hw->phy.type,
|
||||
(part_num >> 8), (part_num & 0xff));
|
||||
|
||||
if (hw->bus.width <= ixgbe_bus_width_pcie_x4) {
|
||||
dev_warn(&pdev->dev, "PCI-Express bandwidth available for "
|
||||
"this card is not sufficient for optimal "
|
||||
"performance.\n");
|
||||
dev_warn(&pdev->dev, "For optimal performance a x8 "
|
||||
"PCI-Express slot is required.\n");
|
||||
e_dev_warn("PCI-Express bandwidth available for this card is "
|
||||
"not sufficient for optimal performance.\n");
|
||||
e_dev_warn("For optimal performance a x8 PCI-Express slot "
|
||||
"is required.\n");
|
||||
}
|
||||
|
||||
/* save off EEPROM version number */
|
||||
@ -6778,12 +6757,12 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
|
||||
|
||||
if (err == IXGBE_ERR_EEPROM_VERSION) {
|
||||
/* We are running on a pre-production device, log a warning */
|
||||
dev_warn(&pdev->dev, "This device is a pre-production "
|
||||
"adapter/LOM. Please be aware there may be issues "
|
||||
"associated with your hardware. If you are "
|
||||
"experiencing problems please contact your Intel or "
|
||||
"hardware representative who provided you with this "
|
||||
"hardware.\n");
|
||||
e_dev_warn("This device is a pre-production adapter/LOM. "
|
||||
"Please be aware there may be issues associated "
|
||||
"with your hardware. If you are experiencing "
|
||||
"problems please contact your Intel or hardware "
|
||||
"representative who provided you with this "
|
||||
"hardware.\n");
|
||||
}
|
||||
strcpy(netdev->name, "eth%d");
|
||||
err = register_netdev(netdev);
|
||||
@ -6806,8 +6785,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
|
||||
}
|
||||
#endif
|
||||
if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) {
|
||||
DPRINTK(PROBE, INFO, "IOV is enabled with %d VFs\n",
|
||||
adapter->num_vfs);
|
||||
e_info("IOV is enabled with %d VFs\n", adapter->num_vfs);
|
||||
for (i = 0; i < adapter->num_vfs; i++)
|
||||
ixgbe_vf_configuration(pdev, (i | 0x10000000));
|
||||
}
|
||||
@ -6815,7 +6793,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
|
||||
/* add san mac addr to netdev */
|
||||
ixgbe_add_sanmac_netdev(netdev);
|
||||
|
||||
dev_info(&pdev->dev, "Intel(R) 10 Gigabit Network Connection\n");
|
||||
e_dev_info("Intel(R) 10 Gigabit Network Connection\n");
|
||||
cards_found++;
|
||||
return 0;
|
||||
|
||||
@ -6905,7 +6883,7 @@ static void __devexit ixgbe_remove(struct pci_dev *pdev)
|
||||
pci_release_selected_regions(pdev, pci_select_bars(pdev,
|
||||
IORESOURCE_MEM));
|
||||
|
||||
DPRINTK(PROBE, INFO, "complete\n");
|
||||
e_dev_info("complete\n");
|
||||
|
||||
free_netdev(netdev);
|
||||
|
||||
@ -6955,8 +6933,7 @@ static pci_ers_result_t ixgbe_io_slot_reset(struct pci_dev *pdev)
|
||||
int err;
|
||||
|
||||
if (pci_enable_device_mem(pdev)) {
|
||||
DPRINTK(PROBE, ERR,
|
||||
"Cannot re-enable PCI device after reset.\n");
|
||||
e_err("Cannot re-enable PCI device after reset.\n");
|
||||
result = PCI_ERS_RESULT_DISCONNECT;
|
||||
} else {
|
||||
pci_set_master(pdev);
|
||||
@ -6972,8 +6949,8 @@ static pci_ers_result_t ixgbe_io_slot_reset(struct pci_dev *pdev)
|
||||
|
||||
err = pci_cleanup_aer_uncorrect_error_status(pdev);
|
||||
if (err) {
|
||||
dev_err(&pdev->dev,
|
||||
"pci_cleanup_aer_uncorrect_error_status failed 0x%0x\n", err);
|
||||
e_dev_err("pci_cleanup_aer_uncorrect_error_status "
|
||||
"failed 0x%0x\n", err);
|
||||
/* non-fatal, continue */
|
||||
}
|
||||
|
||||
@ -6994,7 +6971,7 @@ static void ixgbe_io_resume(struct pci_dev *pdev)
|
||||
|
||||
if (netif_running(netdev)) {
|
||||
if (ixgbe_up(adapter)) {
|
||||
DPRINTK(PROBE, INFO, "ixgbe_up failed after reset\n");
|
||||
e_info("ixgbe_up failed after reset\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -7030,10 +7007,9 @@ static struct pci_driver ixgbe_driver = {
|
||||
static int __init ixgbe_init_module(void)
|
||||
{
|
||||
int ret;
|
||||
printk(KERN_INFO "%s: %s - version %s\n", ixgbe_driver_name,
|
||||
ixgbe_driver_string, ixgbe_driver_version);
|
||||
|
||||
printk(KERN_INFO "%s: %s\n", ixgbe_driver_name, ixgbe_copyright);
|
||||
pr_info("%s - version %s\n", ixgbe_driver_string,
|
||||
ixgbe_driver_version);
|
||||
pr_info("%s\n", ixgbe_copyright);
|
||||
|
||||
#ifdef CONFIG_IXGBE_DCA
|
||||
dca_register_notify(&dca_notifier);
|
||||
@ -7072,18 +7048,17 @@ static int ixgbe_notify_dca(struct notifier_block *nb, unsigned long event,
|
||||
}
|
||||
|
||||
#endif /* CONFIG_IXGBE_DCA */
|
||||
#ifdef DEBUG
|
||||
|
||||
/**
|
||||
* ixgbe_get_hw_dev_name - return device name string
|
||||
* ixgbe_get_hw_dev return device
|
||||
* used by hardware layer to print debugging information
|
||||
**/
|
||||
char *ixgbe_get_hw_dev_name(struct ixgbe_hw *hw)
|
||||
struct net_device *ixgbe_get_hw_dev(struct ixgbe_hw *hw)
|
||||
{
|
||||
struct ixgbe_adapter *adapter = hw->back;
|
||||
return adapter->netdev->name;
|
||||
return adapter->netdev;
|
||||
}
|
||||
|
||||
#endif
|
||||
module_exit(ixgbe_exit_module);
|
||||
|
||||
/* ixgbe_main.c */
|
||||
|
@ -25,7 +25,6 @@
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/pci.h>
|
||||
@ -174,7 +173,7 @@ int ixgbe_set_vf_mac(struct ixgbe_adapter *adapter,
|
||||
adapter->vfinfo[vf].rar = hw->mac.ops.set_rar(hw, vf + 1, mac_addr,
|
||||
vf, IXGBE_RAH_AV);
|
||||
if (adapter->vfinfo[vf].rar < 0) {
|
||||
DPRINTK(DRV, ERR, "Could not set MAC Filter for VF %d\n", vf);
|
||||
e_err("Could not set MAC Filter for VF %d\n", vf);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -194,11 +193,7 @@ int ixgbe_vf_configuration(struct pci_dev *pdev, unsigned int event_mask)
|
||||
|
||||
if (enable) {
|
||||
random_ether_addr(vf_mac_addr);
|
||||
DPRINTK(PROBE, INFO, "IOV: VF %d is enabled "
|
||||
"mac %02X:%02X:%02X:%02X:%02X:%02X\n",
|
||||
vfn,
|
||||
vf_mac_addr[0], vf_mac_addr[1], vf_mac_addr[2],
|
||||
vf_mac_addr[3], vf_mac_addr[4], vf_mac_addr[5]);
|
||||
e_info("IOV: VF %d is enabled MAC %pM\n", vfn, vf_mac_addr);
|
||||
/*
|
||||
* Store away the VF "permananet" MAC address, it will ask
|
||||
* for it later.
|
||||
@ -243,7 +238,7 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf)
|
||||
retval = ixgbe_read_mbx(hw, msgbuf, mbx_size, vf);
|
||||
|
||||
if (retval)
|
||||
printk(KERN_ERR "Error receiving message from VF\n");
|
||||
pr_err("Error receiving message from VF\n");
|
||||
|
||||
/* this is a message we already processed, do nothing */
|
||||
if (msgbuf[0] & (IXGBE_VT_MSGTYPE_ACK | IXGBE_VT_MSGTYPE_NACK))
|
||||
@ -257,7 +252,7 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf)
|
||||
if (msgbuf[0] == IXGBE_VF_RESET) {
|
||||
unsigned char *vf_mac = adapter->vfinfo[vf].vf_mac_addresses;
|
||||
u8 *addr = (u8 *)(&msgbuf[1]);
|
||||
DPRINTK(PROBE, INFO, "VF Reset msg received from vf %d\n", vf);
|
||||
e_info("VF Reset msg received from vf %d\n", vf);
|
||||
adapter->vfinfo[vf].clear_to_send = false;
|
||||
ixgbe_vf_reset_msg(adapter, vf);
|
||||
adapter->vfinfo[vf].clear_to_send = true;
|
||||
@ -310,7 +305,7 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf)
|
||||
retval = ixgbe_set_vf_vlan(adapter, add, vid, vf);
|
||||
break;
|
||||
default:
|
||||
DPRINTK(DRV, ERR, "Unhandled Msg %8.8x\n", msgbuf[0]);
|
||||
e_err("Unhandled Msg %8.8x\n", msgbuf[0]);
|
||||
retval = IXGBE_ERR_MBX;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user