diff options
author | Sathya Perla <sathya.perla@emulex.com> | 2012-11-06 17:48:56 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-07 16:59:52 -0500 |
commit | ca34fe38f06da0f508543539419ff5faa5d81e1c (patch) | |
tree | 049b17b282475c13e13c23f857ff6f96f2e9e3b1 /drivers/net/ethernet/emulex/benet/be.h | |
parent | 5727f841dcd8f7a06dd85d76c0aba4a0e30a70a8 (diff) |
be2net: fix wrong usage of adapter->generation
adapter->generation was being incorrectly set as BE_GEN3 for Skyhawk-R.
Replace generation usage with XXX_chip() macros to identify the chip.
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex/benet/be.h')
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h index f920a6521ce..82f74f8594f 100644 --- a/drivers/net/ethernet/emulex/benet/be.h +++ b/drivers/net/ethernet/emulex/benet/be.h @@ -410,7 +410,6 @@ struct be_adapter { u32 rx_fc; /* Rx flow control */ u32 tx_fc; /* Tx flow control */ bool stats_cmd_sent; - u8 generation; /* BladeEngine ASIC generation */ u32 if_type; struct { u8 __iomem *base; /* Door Bell */ @@ -458,19 +457,22 @@ struct be_adapter { for (i = 0, vf_cfg = &adapter->vf_cfg[i]; i < adapter->num_vfs; \ i++, vf_cfg++) -/* BladeEngine Generation numbers */ -#define BE_GEN2 2 -#define BE_GEN3 3 -#define SH_HW 4 - #define ON 1 #define OFF 0 -#define lancer_chip(adapter) ((adapter->pdev->device == OC_DEVICE_ID3) || \ - (adapter->pdev->device == OC_DEVICE_ID4)) + +#define lancer_chip(adapter) (adapter->pdev->device == OC_DEVICE_ID3 || \ + adapter->pdev->device == OC_DEVICE_ID4) #define skyhawk_chip(adapter) (adapter->pdev->device == OC_DEVICE_ID5 || \ adapter->pdev->device == OC_DEVICE_ID6) +#define BE3_chip(adapter) (adapter->pdev->device == BE_DEVICE_ID2 || \ + adapter->pdev->device == OC_DEVICE_ID2) + +#define BE2_chip(adapter) (adapter->pdev->device == BE_DEVICE_ID1 || \ + adapter->pdev->device == OC_DEVICE_ID1) + +#define BEx_chip(adapter) (BE3_chip(adapter) || BE2_chip(adapter)) #define be_roce_supported(adapter) ((adapter->if_type == SLI_INTF_TYPE_3 || \ adapter->sli_family == SKYHAWK_SLI_FAMILY) && \ |