aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/nic.h
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/net/sfc/nic.h
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'drivers/net/sfc/nic.h')
-rw-r--r--drivers/net/sfc/nic.h30
1 files changed, 18 insertions, 12 deletions
diff --git a/drivers/net/sfc/nic.h b/drivers/net/sfc/nic.h
index 0438dc98722d..4bd1f2839dfe 100644
--- a/drivers/net/sfc/nic.h
+++ b/drivers/net/sfc/nic.h
@@ -1,7 +1,7 @@
1/**************************************************************************** 1/****************************************************************************
2 * Driver for Solarflare Solarstorm network controllers and boards 2 * Driver for Solarflare Solarstorm network controllers and boards
3 * Copyright 2005-2006 Fen Systems Ltd. 3 * Copyright 2005-2006 Fen Systems Ltd.
4 * Copyright 2006-2009 Solarflare Communications Inc. 4 * Copyright 2006-2011 Solarflare Communications Inc.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published 7 * under the terms of the GNU General Public License version 2 as published
@@ -15,6 +15,7 @@
15#include "net_driver.h" 15#include "net_driver.h"
16#include "efx.h" 16#include "efx.h"
17#include "mcdi.h" 17#include "mcdi.h"
18#include "spi.h"
18 19
19/* 20/*
20 * Falcon hardware control 21 * Falcon hardware control
@@ -113,6 +114,11 @@ struct falcon_board {
113 * @stats_pending: Is there a pending DMA of MAC statistics. 114 * @stats_pending: Is there a pending DMA of MAC statistics.
114 * @stats_timer: A timer for regularly fetching MAC statistics. 115 * @stats_timer: A timer for regularly fetching MAC statistics.
115 * @stats_dma_done: Pointer to the flag which indicates DMA completion. 116 * @stats_dma_done: Pointer to the flag which indicates DMA completion.
117 * @spi_flash: SPI flash device
118 * @spi_eeprom: SPI EEPROM device
119 * @spi_lock: SPI bus lock
120 * @mdio_lock: MDIO bus lock
121 * @xmac_poll_required: XMAC link state needs polling
116 */ 122 */
117struct falcon_nic_data { 123struct falcon_nic_data {
118 struct pci_dev *pci_dev2; 124 struct pci_dev *pci_dev2;
@@ -121,6 +127,11 @@ struct falcon_nic_data {
121 bool stats_pending; 127 bool stats_pending;
122 struct timer_list stats_timer; 128 struct timer_list stats_timer;
123 u32 *stats_dma_done; 129 u32 *stats_dma_done;
130 struct efx_spi_device spi_flash;
131 struct efx_spi_device spi_eeprom;
132 struct mutex spi_lock;
133 struct mutex mdio_lock;
134 bool xmac_poll_required;
124}; 135};
125 136
126static inline struct falcon_board *falcon_board(struct efx_nic *efx) 137static inline struct falcon_board *falcon_board(struct efx_nic *efx)
@@ -131,24 +142,19 @@ static inline struct falcon_board *falcon_board(struct efx_nic *efx)
131 142
132/** 143/**
133 * struct siena_nic_data - Siena NIC state 144 * 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 145 * @mcdi: Management-Controller-to-Driver Interface
146 * @mcdi_smem: MCDI shared memory mapping. The mapping is always uncacheable.
137 * @wol_filter_id: Wake-on-LAN packet filter id 147 * @wol_filter_id: Wake-on-LAN packet filter id
138 * @ipv6_rss_key: Toeplitz hash key for IPv6 RSS
139 */ 148 */
140struct siena_nic_data { 149struct siena_nic_data {
141 u64 fw_version;
142 u32 fw_build;
143 struct efx_mcdi_iface mcdi; 150 struct efx_mcdi_iface mcdi;
151 void __iomem *mcdi_smem;
144 int wol_filter_id; 152 int wol_filter_id;
145}; 153};
146 154
147extern void siena_print_fwver(struct efx_nic *efx, char *buf, size_t len); 155extern const struct efx_nic_type falcon_a1_nic_type;
148 156extern const struct efx_nic_type falcon_b0_nic_type;
149extern struct efx_nic_type falcon_a1_nic_type; 157extern const struct efx_nic_type siena_a0_nic_type;
150extern struct efx_nic_type falcon_b0_nic_type;
151extern struct efx_nic_type siena_a0_nic_type;
152 158
153/************************************************************************** 159/**************************************************************************
154 * 160 *
@@ -180,11 +186,11 @@ extern void efx_nic_fini_eventq(struct efx_channel *channel);
180extern void efx_nic_remove_eventq(struct efx_channel *channel); 186extern void efx_nic_remove_eventq(struct efx_channel *channel);
181extern int efx_nic_process_eventq(struct efx_channel *channel, int rx_quota); 187extern int efx_nic_process_eventq(struct efx_channel *channel, int rx_quota);
182extern void efx_nic_eventq_read_ack(struct efx_channel *channel); 188extern void efx_nic_eventq_read_ack(struct efx_channel *channel);
189extern bool efx_nic_event_present(struct efx_channel *channel);
183 190
184/* MAC/PHY */ 191/* MAC/PHY */
185extern void falcon_drain_tx_fifo(struct efx_nic *efx); 192extern void falcon_drain_tx_fifo(struct efx_nic *efx);
186extern void falcon_reconfigure_mac_wrapper(struct efx_nic *efx); 193extern void falcon_reconfigure_mac_wrapper(struct efx_nic *efx);
187extern int efx_nic_rx_xoff_thresh, efx_nic_rx_xon_thresh;
188 194
189/* Interrupts and test events */ 195/* Interrupts and test events */
190extern int efx_nic_init_interrupt(struct efx_nic *efx); 196extern int efx_nic_init_interrupt(struct efx_nic *efx);