diff options
author | Barak Witkowski <barak@broadcom.com> | 2012-06-25 21:31:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-27 04:20:13 -0400 |
commit | 2e499d3cc13365a87815266dda59904dcb8c8d6c (patch) | |
tree | b9f0e8b8a4356d8beb112cf76b0b97789eb335c3 /drivers/net/ethernet/broadcom/cnic.c | |
parent | 747cf6ed3dbf6200af761f5384893c3b621a484c (diff) |
bnx2x, bnx2fc, bnx2i, cnic: Add statistics support and FCoE capabilities advertisement
1. When FCoE offload driver is registered, copy its capabilities to the chip
scratchpad.
2. Copy FCoE/iSCSI MAC addresses in aligned manner to chip scratchpad.
3. Add FCoE/iSCSI statistics collection support
Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/cnic.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/cnic.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c index 65e66caea50d..0e9be2ba924e 100644 --- a/drivers/net/ethernet/broadcom/cnic.c +++ b/drivers/net/ethernet/broadcom/cnic.c | |||
@@ -256,11 +256,16 @@ static void cnic_ulp_ctl(struct cnic_dev *dev, int ulp_type, bool reg) | |||
256 | struct cnic_local *cp = dev->cnic_priv; | 256 | struct cnic_local *cp = dev->cnic_priv; |
257 | struct cnic_eth_dev *ethdev = cp->ethdev; | 257 | struct cnic_eth_dev *ethdev = cp->ethdev; |
258 | struct drv_ctl_info info; | 258 | struct drv_ctl_info info; |
259 | struct fcoe_capabilities *fcoe_cap = | ||
260 | &info.data.register_data.fcoe_features; | ||
259 | 261 | ||
260 | if (reg) | 262 | if (reg) { |
261 | info.cmd = DRV_CTL_ULP_REGISTER_CMD; | 263 | info.cmd = DRV_CTL_ULP_REGISTER_CMD; |
262 | else | 264 | if (ulp_type == CNIC_ULP_FCOE && dev->fcoe_cap) |
265 | memcpy(fcoe_cap, dev->fcoe_cap, sizeof(*fcoe_cap)); | ||
266 | } else { | ||
263 | info.cmd = DRV_CTL_ULP_UNREGISTER_CMD; | 267 | info.cmd = DRV_CTL_ULP_UNREGISTER_CMD; |
268 | } | ||
264 | 269 | ||
265 | info.data.ulp_type = ulp_type; | 270 | info.data.ulp_type = ulp_type; |
266 | ethdev->drv_ctl(dev->netdev, &info); | 271 | ethdev->drv_ctl(dev->netdev, &info); |
@@ -611,6 +616,8 @@ static int cnic_unregister_device(struct cnic_dev *dev, int ulp_type) | |||
611 | 616 | ||
612 | if (ulp_type == CNIC_ULP_ISCSI) | 617 | if (ulp_type == CNIC_ULP_ISCSI) |
613 | cnic_send_nlmsg(cp, ISCSI_KEVENT_IF_DOWN, NULL); | 618 | cnic_send_nlmsg(cp, ISCSI_KEVENT_IF_DOWN, NULL); |
619 | else if (ulp_type == CNIC_ULP_FCOE) | ||
620 | dev->fcoe_cap = NULL; | ||
614 | 621 | ||
615 | synchronize_rcu(); | 622 | synchronize_rcu(); |
616 | 623 | ||