Skip to content

Commit

Permalink
netxen_nic: Print ULA information
Browse files Browse the repository at this point in the history
This patch reads CAMRAM(0x178) where FW writes a key for ULA and non-ULA
adapter and based on the key, driver logs the message.

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Shahed Shaikh authored and David S. Miller committed Sep 27, 2013
1 parent aae8c28 commit 5e7856b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/qlogic/netxen/netxen_nic_hdr.h
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,7 @@ enum {
#define NETXEN_PEG_HALT_STATUS2 (NETXEN_CAM_RAM(0xac))
#define NX_CRB_DEV_REF_COUNT (NETXEN_CAM_RAM(0x138))
#define NX_CRB_DEV_STATE (NETXEN_CAM_RAM(0x140))
#define NETXEN_ULA_KEY (NETXEN_CAM_RAM(0x178))

/* MiniDIMM related macros */
#define NETXEN_DIMM_CAPABILITY (NETXEN_CAM_RAM(0x258))
Expand Down
28 changes: 28 additions & 0 deletions drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1415,6 +1415,32 @@ netxen_setup_netdev(struct netxen_adapter *adapter,
return 0;
}

#define NETXEN_ULA_ADAPTER_KEY (0xdaddad01)
#define NETXEN_NON_ULA_ADAPTER_KEY (0xdaddad00)

static void netxen_read_ula_info(struct netxen_adapter *adapter)
{
u32 temp;

/* Print ULA info only once for an adapter */
if (adapter->portnum != 0)
return;

temp = NXRD32(adapter, NETXEN_ULA_KEY);
switch (temp) {
case NETXEN_ULA_ADAPTER_KEY:
dev_info(&adapter->pdev->dev, "ULA adapter");
break;
case NETXEN_NON_ULA_ADAPTER_KEY:
dev_info(&adapter->pdev->dev, "non ULA adapter");
break;
default:
break;
}

return;
}

#ifdef CONFIG_PCIEAER
static void netxen_mask_aer_correctable(struct netxen_adapter *adapter)
{
Expand Down Expand Up @@ -1561,6 +1587,8 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
goto err_out_disable_msi;
}

netxen_read_ula_info(adapter);

err = netxen_setup_netdev(adapter, netdev);
if (err)
goto err_out_disable_msi;
Expand Down

0 comments on commit 5e7856b

Please sign in to comment.