aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/nic.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2009-11-29 10:15:41 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-29 20:23:57 -0500
commit8880f4ec21e668dcab3c6d387524a887e5bcbf73 (patch)
treed2f34eec2fba31f3b3141c2e580846e92c4e554c /drivers/net/sfc/nic.h
parentafd4aea03f597f29421dc5767e7d1f754730ec23 (diff)
sfc: Add support for SFC9000 family (2)
This integrates support for the SFC9000 family of 10G Ethernet controllers and LAN-on-motherboard chips, starting with the SFL9021 'Siena' and SFC9020 'Bethpage'. Credit for this code is largely due to my colleagues at Solarflare: Guido Barzini Steve Hodgson Kieran Mansley Matthew Slattery Neil Turton Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/nic.h')
-rw-r--r--drivers/net/sfc/nic.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/net/sfc/nic.h b/drivers/net/sfc/nic.h
index e7eb30488c15..57c510d8c34d 100644
--- a/drivers/net/sfc/nic.h
+++ b/drivers/net/sfc/nic.h
@@ -14,6 +14,7 @@
14#include <linux/i2c-algo-bit.h> 14#include <linux/i2c-algo-bit.h>
15#include "net_driver.h" 15#include "net_driver.h"
16#include "efx.h" 16#include "efx.h"
17#include "mcdi.h"
17 18
18/* 19/*
19 * Falcon hardware control 20 * Falcon hardware control
@@ -23,6 +24,7 @@ enum {
23 EFX_REV_FALCON_A0 = 0, 24 EFX_REV_FALCON_A0 = 0,
24 EFX_REV_FALCON_A1 = 1, 25 EFX_REV_FALCON_A1 = 1,
25 EFX_REV_FALCON_B0 = 2, 26 EFX_REV_FALCON_B0 = 2,
27 EFX_REV_SIENA_A0 = 3,
26}; 28};
27 29
28static inline int efx_nic_rev(struct efx_nic *efx) 30static inline int efx_nic_rev(struct efx_nic *efx)
@@ -32,6 +34,10 @@ static inline int efx_nic_rev(struct efx_nic *efx)
32 34
33extern u32 efx_nic_fpga_ver(struct efx_nic *efx); 35extern u32 efx_nic_fpga_ver(struct efx_nic *efx);
34 36
37static inline bool efx_nic_has_mc(struct efx_nic *efx)
38{
39 return efx_nic_rev(efx) >= EFX_REV_SIENA_A0;
40}
35/* NIC has two interlinked PCI functions for the same port. */ 41/* NIC has two interlinked PCI functions for the same port. */
36static inline bool efx_nic_is_dual_func(struct efx_nic *efx) 42static inline bool efx_nic_is_dual_func(struct efx_nic *efx)
37{ 43{
@@ -123,8 +129,25 @@ static inline struct falcon_board *falcon_board(struct efx_nic *efx)
123 return &data->board; 129 return &data->board;
124} 130}
125 131
132/**
133 * struct siena_nic_data - Siena NIC state
134 * @fw_version: Management controller firmware version
135 * @fw_build: Firmware build number
136 * @mcdi: Management-Controller-to-Driver Interface
137 * @wol_filter_id: Wake-on-LAN packet filter id
138 */
139struct siena_nic_data {
140 u64 fw_version;
141 u32 fw_build;
142 struct efx_mcdi_iface mcdi;
143 int wol_filter_id;
144};
145
146extern void siena_print_fwver(struct efx_nic *efx, char *buf, size_t len);
147
126extern struct efx_nic_type falcon_a1_nic_type; 148extern struct efx_nic_type falcon_a1_nic_type;
127extern struct efx_nic_type falcon_b0_nic_type; 149extern struct efx_nic_type falcon_b0_nic_type;
150extern struct efx_nic_type siena_a0_nic_type;
128 151
129/************************************************************************** 152/**************************************************************************
130 * 153 *