Commit 9e630955 authored by Sucheta Chakraborty's avatar Sucheta Chakraborty Committed by David S. Miller

qlcnic: Print informational messages only once during driver load.

Signed-off-by: default avatarSucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: default avatarHimanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 28be6e07
...@@ -1199,6 +1199,7 @@ struct qlcnic_npar_info { ...@@ -1199,6 +1199,7 @@ struct qlcnic_npar_info {
u8 promisc_mode; u8 promisc_mode;
u8 offload_flags; u8 offload_flags;
u8 pci_func; u8 pci_func;
u8 mac[ETH_ALEN];
}; };
struct qlcnic_eswitch { struct qlcnic_eswitch {
......
...@@ -2321,19 +2321,7 @@ int qlcnic_83xx_get_pci_info(struct qlcnic_adapter *adapter, ...@@ -2321,19 +2321,7 @@ int qlcnic_83xx_get_pci_info(struct qlcnic_adapter *adapter,
i++; i++;
memcpy(pci_info->mac + sizeof(u32), &cmd.rsp.arg[i], 2); memcpy(pci_info->mac + sizeof(u32), &cmd.rsp.arg[i], 2);
i = i + 3; i = i + 3;
if (ahw->op_mode == QLCNIC_MGMT_FUNC)
dev_info(dev, "id = %d active = %d type = %d\n"
"\tport = %d min bw = %d max bw = %d\n"
"\tmac_addr = %pM\n", pci_info->id,
pci_info->active, pci_info->type,
pci_info->default_port,
pci_info->tx_min_bw,
pci_info->tx_max_bw, pci_info->mac);
} }
if (ahw->op_mode == QLCNIC_MGMT_FUNC)
dev_info(dev, "Max functions = %d, active functions = %d\n",
ahw->max_pci_func, ahw->act_pci_func);
} else { } else {
dev_err(dev, "Failed to get PCI Info, error = %d\n", err); dev_err(dev, "Failed to get PCI Info, error = %d\n", err);
err = -EIO; err = -EIO;
......
...@@ -94,13 +94,29 @@ qlcnic_83xx_config_vnic_buff_descriptors(struct qlcnic_adapter *adapter) ...@@ -94,13 +94,29 @@ qlcnic_83xx_config_vnic_buff_descriptors(struct qlcnic_adapter *adapter)
**/ **/
static int qlcnic_83xx_init_mgmt_vnic(struct qlcnic_adapter *adapter) static int qlcnic_83xx_init_mgmt_vnic(struct qlcnic_adapter *adapter)
{ {
int err = -EIO; struct qlcnic_hardware_context *ahw = adapter->ahw;
struct device *dev = &adapter->pdev->dev;
struct qlcnic_npar_info *npar;
int i, err = -EIO;
qlcnic_83xx_get_minidump_template(adapter); qlcnic_83xx_get_minidump_template(adapter);
if (!(adapter->flags & QLCNIC_ADAPTER_INITIALIZED)) { if (!(adapter->flags & QLCNIC_ADAPTER_INITIALIZED)) {
if (qlcnic_init_pci_info(adapter)) if (qlcnic_init_pci_info(adapter))
return err; return err;
npar = adapter->npars;
for (i = 0; i < ahw->act_pci_func; i++, npar++) {
dev_info(dev, "id:%d active:%d type:%d port:%d min_bw:%d max_bw:%d mac_addr:%pM\n",
npar->pci_func, npar->active, npar->type,
npar->phy_port, npar->min_bw, npar->max_bw,
npar->mac);
}
dev_info(dev, "Max functions = %d, active functions = %d\n",
ahw->max_pci_func, ahw->act_pci_func);
if (qlcnic_83xx_set_vnic_opmode(adapter)) if (qlcnic_83xx_set_vnic_opmode(adapter))
return err; return err;
...@@ -115,12 +131,12 @@ static int qlcnic_83xx_init_mgmt_vnic(struct qlcnic_adapter *adapter) ...@@ -115,12 +131,12 @@ static int qlcnic_83xx_init_mgmt_vnic(struct qlcnic_adapter *adapter)
return err; return err;
qlcnic_83xx_config_vnic_buff_descriptors(adapter); qlcnic_83xx_config_vnic_buff_descriptors(adapter);
adapter->ahw->msix_supported = !!qlcnic_use_msi_x; ahw->msix_supported = qlcnic_use_msi_x ? 1 : 0;
adapter->flags |= QLCNIC_ADAPTER_INITIALIZED; adapter->flags |= QLCNIC_ADAPTER_INITIALIZED;
qlcnic_83xx_enable_vnic_mode(adapter, 1); qlcnic_83xx_enable_vnic_mode(adapter, 1);
dev_info(&adapter->pdev->dev, "HAL Version: %d, Management function\n", dev_info(dev, "HAL Version: %d, Management function\n",
adapter->ahw->fw_hal_version); ahw->fw_hal_version);
return 0; return 0;
} }
......
...@@ -875,6 +875,7 @@ int qlcnic_init_pci_info(struct qlcnic_adapter *adapter) ...@@ -875,6 +875,7 @@ int qlcnic_init_pci_info(struct qlcnic_adapter *adapter)
adapter->npars[j].min_bw = pci_info[i].tx_min_bw; adapter->npars[j].min_bw = pci_info[i].tx_min_bw;
adapter->npars[j].max_bw = pci_info[i].tx_max_bw; adapter->npars[j].max_bw = pci_info[i].tx_max_bw;
memcpy(&adapter->npars[j].mac, &pci_info[i].mac, ETH_ALEN);
j++; j++;
} }
......
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