Commit 5c4f2fb9 authored by Sathya Perla's avatar Sathya Perla Committed by David S. Miller
Browse files

be2net: do not use sli_family to identify skyhawk-R chip



SKYHAWK_FAMILY will not identify all revisions of the chip.
Use device-id check (skyhawk_chip() macro) instead.

Signed-off-by: default avatarSathya Perla <sathya.perla@emulex.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ca34fe38
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -475,7 +475,7 @@ struct be_adapter {
#define BEx_chip(adapter)	(BE3_chip(adapter) || BE2_chip(adapter))
#define BEx_chip(adapter)	(BE3_chip(adapter) || BE2_chip(adapter))


#define be_roce_supported(adapter) ((adapter->if_type == SLI_INTF_TYPE_3 || \
#define be_roce_supported(adapter) ((adapter->if_type == SLI_INTF_TYPE_3 || \
				adapter->sli_family == SKYHAWK_SLI_FAMILY) && \
				     skyhawk_chip(adapter)) && \
				     (adapter->function_mode & RDMA_ENABLED))
				     (adapter->function_mode & RDMA_ENABLED))


extern const struct ethtool_ops be_ethtool_ops;
extern const struct ethtool_ops be_ethtool_ops;
+0 −5
Original line number Original line Diff line number Diff line
@@ -105,11 +105,6 @@
#define SLI_INTF_TYPE_2		2
#define SLI_INTF_TYPE_2		2
#define SLI_INTF_TYPE_3		3
#define SLI_INTF_TYPE_3		3


/* SLI family */
#define BE_SLI_FAMILY		0x0
#define LANCER_A0_SLI_FAMILY	0xA
#define SKYHAWK_SLI_FAMILY      0x2

/********* ISR0 Register offset **********/
/********* ISR0 Register offset **********/
#define CEV_ISR0_OFFSET 			0xC18
#define CEV_ISR0_OFFSET 			0xC18
#define CEV_ISR_SIZE				4
#define CEV_ISR_SIZE				4
+1 −1
Original line number Original line Diff line number Diff line
@@ -3685,7 +3685,7 @@ static int be_map_pci_bars(struct be_adapter *adapter)
	if (addr == NULL)
	if (addr == NULL)
		goto pci_map_err;
		goto pci_map_err;
	adapter->db = addr;
	adapter->db = addr;
	if (adapter->sli_family == SKYHAWK_SLI_FAMILY) {
	if (skyhawk_chip(adapter)) {
		adapter->roce_db.size = 4096;
		adapter->roce_db.size = 4096;
		adapter->roce_db.io_addr =
		adapter->roce_db.io_addr =
				pci_resource_start(adapter->pdev, db_reg);
				pci_resource_start(adapter->pdev, db_reg);
+1 −1
Original line number Original line Diff line number Diff line
@@ -47,7 +47,7 @@ static void _be_roce_dev_add(struct be_adapter *adapter)
		dev_info.dpp_unmapped_len = 0;
		dev_info.dpp_unmapped_len = 0;
	}
	}
	dev_info.pdev = adapter->pdev;
	dev_info.pdev = adapter->pdev;
	if (adapter->sli_family == SKYHAWK_SLI_FAMILY)
	if (skyhawk_chip(adapter))
		dev_info.db = adapter->db;
		dev_info.db = adapter->db;
	else
	else
		dev_info.db = adapter->roce_db.base;
		dev_info.db = adapter->roce_db.base;