aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_fcoe.c
diff options
context:
space:
mode:
authorYi Zou <yi.zou@intel.com>2009-05-13 09:10:21 -0400
committerDavid S. Miller <davem@davemloft.net>2009-05-17 15:00:02 -0400
commitd3a2ae6d315382b2dcc7747c5b3b70f0490e9157 (patch)
tree5f519e28d19711329d4382b21a361fde97247c3a /drivers/net/ixgbe/ixgbe_fcoe.c
parente92cbeac89d4c7b228894a9b8eb37e3ac51afe73 (diff)
ixgbe: Add FCoE feature code to 82599
This adds the FCoE feature code ixgbe_fcoe.c to 82599. For a start, this patch only adds ixgbe_configure_fcoe() to configure related register for FCoE to 82599. In patches that follow, I will be adding more functions to ixgbe_fcoe.c to add support of FCoE offload features to 82599. Signed-off-by: Yi Zou <yi.zou@intel.com> Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_fcoe.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_fcoe.c60
1 files changed, 60 insertions, 0 deletions
diff --git a/drivers/net/ixgbe/ixgbe_fcoe.c b/drivers/net/ixgbe/ixgbe_fcoe.c
new file mode 100644
index 000000000000..f8c4d357636d
--- /dev/null
+++ b/drivers/net/ixgbe/ixgbe_fcoe.c
@@ -0,0 +1,60 @@
1/*******************************************************************************
2
3 Intel 10 Gigabit PCI Express Linux driver
4 Copyright(c) 1999 - 2009 Intel Corporation.
5
6 This program is free software; you can redistribute it and/or modify it
7 under the terms and conditions of the GNU General Public License,
8 version 2, as published by the Free Software Foundation.
9
10 This program is distributed in the hope it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 more details.
14
15 You should have received a copy of the GNU General Public License along with
16 this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
18
19 The full GNU General Public License is included in this distribution in
20 the file called "COPYING".
21
22 Contact Information:
23 e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
24 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
25
26*******************************************************************************/
27
28
29#include "ixgbe.h"
30#include <linux/if_ether.h>
31#include <scsi/scsi_cmnd.h>
32#include <scsi/scsi_device.h>
33#include <scsi/fc/fc_fs.h>
34#include <scsi/fc/fc_fcoe.h>
35#include <scsi/libfc.h>
36#include <scsi/libfcoe.h>
37
38/**
39 * ixgbe_configure_fcoe - configures registers for fcoe at start
40 * @adapter: ptr to ixgbe adapter
41 *
42 * This sets up FCoE related registers
43 *
44 * Returns : none
45 */
46void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter)
47{
48 struct ixgbe_hw *hw = &adapter->hw;
49
50 /* L2 filter for FCoE: default to queue 0 */
51 IXGBE_WRITE_REG(hw, IXGBE_ETQF(IXGBE_ETQF_FILTER_FCOE),
52 (ETH_P_FCOE | IXGBE_ETQF_FCOE | IXGBE_ETQF_FILTER_EN));
53 IXGBE_WRITE_REG(hw, IXGBE_FCRECTL, 0);
54 IXGBE_WRITE_REG(hw, IXGBE_ETQS(IXGBE_ETQF_FILTER_FCOE),
55 IXGBE_ETQS_QUEUE_EN);
56 IXGBE_WRITE_REG(hw, IXGBE_FCRXCTRL,
57 IXGBE_FCRXCTRL_FCOELLI |
58 IXGBE_FCRXCTRL_FCCRCBO |
59 (FC_FCOE_VER << IXGBE_FCRXCTRL_FCOEVER_SHIFT));
60}