diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2012-05-05 01:32:47 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2012-07-19 21:18:49 -0400 |
commit | 7c8ae65a6248518b2775a03129424a7e08fd058a (patch) | |
tree | 3ed6d53b83c651f7880176e3c0f30324e5672404 /drivers/net/ethernet/intel/ixgbe/ixgbe.h | |
parent | 5a1ee2704bff078bd58abde38266caa10fbcd714 (diff) |
ixgbe: Make FCoE allocation and configuration closer to how rings work
This patch changes the behavior of the FCoE configuration so that it is
much closer to how the main body of the ixgbe driver works for ring
allocation.
The first piece is the ixgbe_fcoe_ddp_enable/disable calls. These allocate
the percpu values and if successful set the fcoe_ddp_xid value indicating
that we can support DDP.
The next piece is the ixgbe_setup/free_ddp_resources calls. These are
called on open/close and will allocate and free the DMA pools.
Finally ixgbe_configure_fcoe is now just register configuration. It can go
through and enable the registers for the FCoE redirection offload, and FIP
configuration without any interference from the DDP pool allocation.
The net result of all this is two fold. First it adds a certain amount of
exception handling. So for example if ixgbe_setup_fcoe_resources fails we
will actually generate an error in open and refuse to bring up the
interface.
Secondly it provides a much more graceful failure case than the previous
model which would skip setting up the registers for FCoE on failure to
allocate DDP resources leaving no Rx functionality enabled instead of just
disabling DDP.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe.h')
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h index c2365005b545..5a286adc65c0 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h | |||
@@ -691,7 +691,6 @@ extern void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter); | |||
691 | extern int ixgbe_fso(struct ixgbe_ring *tx_ring, | 691 | extern int ixgbe_fso(struct ixgbe_ring *tx_ring, |
692 | struct ixgbe_tx_buffer *first, | 692 | struct ixgbe_tx_buffer *first, |
693 | u8 *hdr_len); | 693 | u8 *hdr_len); |
694 | extern void ixgbe_cleanup_fcoe(struct ixgbe_adapter *adapter); | ||
695 | extern int ixgbe_fcoe_ddp(struct ixgbe_adapter *adapter, | 694 | extern int ixgbe_fcoe_ddp(struct ixgbe_adapter *adapter, |
696 | union ixgbe_adv_rx_desc *rx_desc, | 695 | union ixgbe_adv_rx_desc *rx_desc, |
697 | struct sk_buff *skb); | 696 | struct sk_buff *skb); |
@@ -700,6 +699,8 @@ extern int ixgbe_fcoe_ddp_get(struct net_device *netdev, u16 xid, | |||
700 | extern int ixgbe_fcoe_ddp_target(struct net_device *netdev, u16 xid, | 699 | extern int ixgbe_fcoe_ddp_target(struct net_device *netdev, u16 xid, |
701 | struct scatterlist *sgl, unsigned int sgc); | 700 | struct scatterlist *sgl, unsigned int sgc); |
702 | extern int ixgbe_fcoe_ddp_put(struct net_device *netdev, u16 xid); | 701 | extern int ixgbe_fcoe_ddp_put(struct net_device *netdev, u16 xid); |
702 | extern int ixgbe_setup_fcoe_ddp_resources(struct ixgbe_adapter *adapter); | ||
703 | extern void ixgbe_free_fcoe_ddp_resources(struct ixgbe_adapter *adapter); | ||
703 | extern int ixgbe_fcoe_enable(struct net_device *netdev); | 704 | extern int ixgbe_fcoe_enable(struct net_device *netdev); |
704 | extern int ixgbe_fcoe_disable(struct net_device *netdev); | 705 | extern int ixgbe_fcoe_disable(struct net_device *netdev); |
705 | #ifdef CONFIG_IXGBE_DCB | 706 | #ifdef CONFIG_IXGBE_DCB |