Commit 849c4542 authored by Emil Tantilov's avatar Emil Tantilov Committed by David S. Miller

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: 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 faa9dcf7
...@@ -44,11 +44,9 @@ ...@@ -44,11 +44,9 @@
#include <linux/dca.h> #include <linux/dca.h>
#endif #endif
#define PFX "ixgbe: " /* common prefix used by pr_<> macros */
#define DPRINTK(nlevel, klevel, fmt, args...) \ #undef pr_fmt
((void)((NETIF_MSG_##nlevel & adapter->msg_enable) && \ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
printk(KERN_##klevel PFX "%s: %s: " fmt, adapter->netdev->name, \
__func__ , ## args)))
/* TX/RX descriptor defines */ /* TX/RX descriptor defines */
#define IXGBE_DEFAULT_TXD 512 #define IXGBE_DEFAULT_TXD 512
......
...@@ -707,9 +707,8 @@ static s32 ixgbe_setup_mac_link_smartspeed(struct ixgbe_hw *hw, ...@@ -707,9 +707,8 @@ 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))
netif_info(adapter, hw, adapter->netdev, "Smartspeed has" e_info("Smartspeed has downgraded the link speed from "
" downgraded the link speed from the maximum" "the maximum advertised\n");
" advertised\n");
return status; return status;
} }
......
...@@ -105,12 +105,26 @@ s32 ixgbe_blink_led_stop_generic(struct ixgbe_hw *hw, u32 index); ...@@ -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) #define IXGBE_WRITE_FLUSH(a) IXGBE_READ_REG(a, IXGBE_STATUS)
#ifdef DEBUG extern struct net_device *ixgbe_get_hw_dev(struct ixgbe_hw *hw);
extern char *ixgbe_get_hw_dev_name(struct ixgbe_hw *hw);
#define hw_dbg(hw, format, arg...) \ #define hw_dbg(hw, format, arg...) \
printk(KERN_DEBUG "%s: " format, ixgbe_get_hw_dev_name(hw), ##arg) netdev_dbg(ixgbe_get_hw_dev(hw), format, ##arg)
#else #define e_err(format, arg...) \
#define hw_dbg(hw, format, arg...) do {} while (0) netdev_err(adapter->netdev, format, ## arg)
#endif #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 */ #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)) {
DPRINTK(DRV, ERR, "Enable failed, needs MSI-X\n"); e_err("Enable failed, needs MSI-X\n");
err = 1; err = 1;
goto out; goto out;
} }
......
...@@ -294,8 +294,7 @@ static int ixgbe_set_settings(struct net_device *netdev, ...@@ -294,8 +294,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) {
DPRINTK(PROBE, INFO, e_info("setup link failed with code %d\n", err);
"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 {
...@@ -1188,7 +1187,7 @@ static struct ixgbe_reg_test reg_test_82598[] = { ...@@ -1188,7 +1187,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)) { \
DPRINTK(DRV, ERR, "pattern test reg %04X failed: got "\ e_err("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; \
...@@ -1206,7 +1205,7 @@ static struct ixgbe_reg_test reg_test_82598[] = { ...@@ -1206,7 +1205,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)) { \
DPRINTK(DRV, ERR, "set/check reg %04X test failed: got 0x%08X "\ e_err("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)); \
...@@ -1240,8 +1239,8 @@ static int ixgbe_reg_test(struct ixgbe_adapter *adapter, u64 *data) ...@@ -1240,8 +1239,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) {
DPRINTK(DRV, ERR, "failed STATUS register test got: " e_err("failed STATUS register test got: 0x%08X expected: "
"0x%08X expected: 0x%08X\n", after, value); "0x%08X\n", after, value);
*data = 1; *data = 1;
return 1; return 1;
} }
...@@ -1341,8 +1340,8 @@ static int ixgbe_intr_test(struct ixgbe_adapter *adapter, u64 *data) ...@@ -1341,8 +1340,8 @@ static int ixgbe_intr_test(struct ixgbe_adapter *adapter, u64 *data)
*data = 1; *data = 1;
return -1; return -1;
} }
DPRINTK(HW, INFO, "testing %s interrupt\n", e_info("testing %s interrupt\n", shared_int ?
(shared_int ? "shared" : "unshared")); "shared" : "unshared");
/* Disable all the interrupts */ /* Disable all the interrupts */
IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, 0xFFFFFFFF); IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, 0xFFFFFFFF);
...@@ -1847,7 +1846,7 @@ static void ixgbe_diag_test(struct net_device *netdev, ...@@ -1847,7 +1846,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 */
DPRINTK(HW, INFO, "offline testing starting\n"); e_info("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 */
...@@ -1880,17 +1879,17 @@ static void ixgbe_diag_test(struct net_device *netdev, ...@@ -1880,17 +1879,17 @@ static void ixgbe_diag_test(struct net_device *netdev,
else else
ixgbe_reset(adapter); ixgbe_reset(adapter);
DPRINTK(HW, INFO, "register testing starting\n"); e_info("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);
DPRINTK(HW, INFO, "eeprom testing starting\n"); e_info("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);
DPRINTK(HW, INFO, "interrupt testing starting\n"); e_info("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;
...@@ -1898,14 +1897,13 @@ static void ixgbe_diag_test(struct net_device *netdev, ...@@ -1898,14 +1897,13 @@ 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)) {
DPRINTK(HW, INFO, "Skip MAC loopback diagnostic in VT " e_info("Skip MAC loopback diagnostic in VT mode\n");
"mode\n");
data[3] = 0; data[3] = 0;
goto skip_loopback; goto skip_loopback;
} }
ixgbe_reset(adapter); ixgbe_reset(adapter);
DPRINTK(HW, INFO, "loopback testing starting\n"); e_info("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;
...@@ -1916,7 +1914,7 @@ static void ixgbe_diag_test(struct net_device *netdev, ...@@ -1916,7 +1914,7 @@ static void ixgbe_diag_test(struct net_device *netdev,
if (if_running) if (if_running)
dev_open(netdev); dev_open(netdev);
} else { } else {
DPRINTK(HW, INFO, "online testing starting\n"); e_info("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;
...@@ -2089,7 +2087,7 @@ static bool ixgbe_reenable_rsc(struct ixgbe_adapter *adapter, ...@@ -2089,7 +2087,7 @@ static bool ixgbe_reenable_rsc(struct ixgbe_adapter *adapter,
(adapter->flags2 & IXGBE_FLAG2_RSC_CAPABLE)) { (adapter->flags2 & IXGBE_FLAG2_RSC_CAPABLE)) {
adapter->flags2 |= IXGBE_FLAG2_RSC_ENABLED; adapter->flags2 |= IXGBE_FLAG2_RSC_ENABLED;
adapter->netdev->features |= NETIF_F_LRO; adapter->netdev->features |= NETIF_F_LRO;
DPRINTK(PROBE, INFO, "rx-usecs set to %d, re-enabling RSC\n", e_info("rx-usecs set to %d, re-enabling RSC\n",
ec->rx_coalesce_usecs); ec->rx_coalesce_usecs);
return true; return true;
} }
...@@ -2158,8 +2156,7 @@ static int ixgbe_set_coalesce(struct net_device *netdev, ...@@ -2158,8 +2156,7 @@ static int ixgbe_set_coalesce(struct net_device *netdev,
if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) { if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) {
adapter->flags2 &= ~IXGBE_FLAG2_RSC_ENABLED; adapter->flags2 &= ~IXGBE_FLAG2_RSC_ENABLED;
netdev->features &= ~NETIF_F_LRO; netdev->features &= ~NETIF_F_LRO;
DPRINTK(PROBE, INFO, e_info("rx-usecs set to 0, disabling RSC\n");
"rx-usecs set to 0, disabling RSC\n");
need_reset = true; need_reset = true;
} }
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
*******************************************************************************/ *******************************************************************************/
#include "ixgbe.h" #include "ixgbe.h"
#ifdef CONFIG_IXGBE_DCB #ifdef CONFIG_IXGBE_DCB
#include "ixgbe_dcb_82599.h" #include "ixgbe_dcb_82599.h"
...@@ -165,19 +164,19 @@ int ixgbe_fcoe_ddp_get(struct net_device *netdev, u16 xid, ...@@ -165,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) {
DPRINTK(DRV, WARNING, "xid=0x%x out-of-range\n", xid); e_warn("xid=0x%x out-of-range\n", xid);
return 0; return 0;
} }
fcoe = &adapter->fcoe; fcoe = &adapter->fcoe;
if (!fcoe->pool) { 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; return 0;
} }
ddp = &fcoe->ddp[xid]; ddp = &fcoe->ddp[xid];
if (ddp->sgl) { if (ddp->sgl) {
DPRINTK(DRV, ERR, "xid 0x%x w/ non-null sgl=%p nents=%d\n", e_err("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;
} }
...@@ -186,14 +185,14 @@ int ixgbe_fcoe_ddp_get(struct net_device *netdev, u16 xid, ...@@ -186,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) {
DPRINTK(DRV, ERR, "xid 0x%x DMA map error\n", xid); e_err("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) {
DPRINTK(DRV, ERR, "failed allocated ddp context\n"); e_err("failed allocated ddp context\n");
goto out_noddp_unmap; goto out_noddp_unmap;
} }
ddp->sgl = sgl; ddp->sgl = sgl;
...@@ -206,8 +205,7 @@ int ixgbe_fcoe_ddp_get(struct net_device *netdev, u16 xid, ...@@ -206,8 +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) {
netif_err(adapter, drv, adapter->netdev, e_err("xid=%x:%d,%d,%d:addr=%llx "
"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;
...@@ -387,7 +385,7 @@ int ixgbe_fso(struct ixgbe_adapter *adapter, ...@@ -387,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)) {
DPRINTK(DRV, ERR, "Wrong gso type %d:expecting SKB_GSO_FCOE\n", e_err("Wrong gso type %d:expecting SKB_GSO_FCOE\n",
skb_shinfo(skb)->gso_type); skb_shinfo(skb)->gso_type);
return -EINVAL; return -EINVAL;
} }
...@@ -414,7 +412,7 @@ int ixgbe_fso(struct ixgbe_adapter *adapter, ...@@ -414,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:
DPRINTK(DRV, WARNING, "unknown sof = 0x%x\n", sof); e_warn("unknown sof = 0x%x\n", sof);
return -EINVAL; return -EINVAL;
} }
...@@ -441,7 +439,7 @@ int ixgbe_fso(struct ixgbe_adapter *adapter, ...@@ -441,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:
DPRINTK(DRV, WARNING, "unknown eof = 0x%x\n", eof); e_warn("unknown eof = 0x%x\n", eof);
return -EINVAL; return -EINVAL;
} }
...@@ -517,8 +515,7 @@ void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter) ...@@ -517,8 +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)
DPRINTK(DRV, ERR, e_err("failed to allocated FCoE DDP pool\n");
"failed to allocated FCoE DDP pool\n");
spin_lock_init(&fcoe->lock); spin_lock_init(&fcoe->lock);
} }
...@@ -614,7 +611,7 @@ int ixgbe_fcoe_enable(struct net_device *netdev) ...@@ -614,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;
DPRINTK(DRV, INFO, "Enabling FCoE offload features.\n"); e_info("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);
...@@ -660,7 +657,7 @@ int ixgbe_fcoe_disable(struct net_device *netdev) ...@@ -660,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;
DPRINTK(DRV, INFO, "Disabling FCoE offload features.\n"); e_info("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);
......
This diff is collapsed.
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
*******************************************************************************/ *******************************************************************************/
#include <linux/types.h> #include <linux/types.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/pci.h> #include <linux/pci.h>
...@@ -174,7 +173,7 @@ int ixgbe_set_vf_mac(struct ixgbe_adapter *adapter, ...@@ -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, adapter->vfinfo[vf].rar = hw->mac.ops.set_rar(hw, vf + 1, mac_addr,
vf, IXGBE_RAH_AV); vf, IXGBE_RAH_AV);
if (adapter->vfinfo[vf].rar < 0) { 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; return -1;
} }
...@@ -194,11 +193,7 @@ int ixgbe_vf_configuration(struct pci_dev *pdev, unsigned int event_mask) ...@@ -194,11 +193,7 @@ 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);
DPRINTK(PROBE, INFO, "IOV: VF %d is enabled " e_info("IOV: VF %d is enabled MAC %pM\n", vfn, vf_mac_addr);
"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]);
/* /*
* 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.
...@@ -243,7 +238,7 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf) ...@@ -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); retval = ixgbe_read_mbx(hw, msgbuf, mbx_size, vf);
if (retval) 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 */ /* this is a message we already processed, do nothing */
if (msgbuf[0] & (IXGBE_VT_MSGTYPE_ACK | IXGBE_VT_MSGTYPE_NACK)) 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) ...@@ -257,7 +252,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]);
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; 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;
...@@ -310,7 +305,7 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf) ...@@ -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); retval = ixgbe_set_vf_vlan(adapter, add, vid, vf);
break; break;
default: default:
DPRINTK(DRV, ERR, "Unhandled Msg %8.8x\n", msgbuf[0]); e_err("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