i40evf: track outstanding client request
authorMitch Williams <mitch.a.williams@intel.com>
Fri, 10 Feb 2017 07:35:18 +0000 (23:35 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sun, 12 Feb 2017 04:39:00 +0000 (20:39 -0800)
The iWarp client cannot continue until this operation has been completed
by the PF driver. Sleep (with timeout) until the reply from the PF
driver has been received.

Change-ID: I5dc41b857bba32d0218b7ce167b5da122dadf349
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40evf/i40e_virtchnl.h
drivers/net/ethernet/intel/i40evf/i40evf.h
drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c

index fc374f833aa9a930f2d119c306dd2547209884af..d38a2b2aea2b20d2b0bbf9700c90578ba9fc0197 100644 (file)
@@ -81,6 +81,7 @@ enum i40e_virtchnl_ops {
        I40E_VIRTCHNL_OP_GET_STATS = 15,
        I40E_VIRTCHNL_OP_FCOE = 16,
        I40E_VIRTCHNL_OP_EVENT = 17, /* must ALWAYS be 17 */
+       I40E_VIRTCHNL_OP_CONFIG_IWARP_IRQ_MAP = 21,
        I40E_VIRTCHNL_OP_CONFIG_RSS_KEY = 23,
        I40E_VIRTCHNL_OP_CONFIG_RSS_LUT = 24,
        I40E_VIRTCHNL_OP_GET_RSS_HENA_CAPS = 25,
index fffe4cf2c20b302df75a830877719dc915254687..00c42d80327668ef3cc8c614570c44ae58738791 100644 (file)
@@ -195,6 +195,7 @@ struct i40evf_adapter {
        u64 hw_csum_rx_error;
        u32 rx_desc_count;
        int num_msix_vectors;
+       u32 client_pending;
        struct msix_entry *msix_entries;
 
        u32 flags;
index 2059a8e889082531eae906db2c9c1f6b75b6a32c..bee58af390e1c633006ddc38efddf256a307161a 100644 (file)
@@ -999,6 +999,10 @@ void i40evf_virtchnl_completion(struct i40evf_adapter *adapter,
                if (v_opcode != adapter->current_op)
                        return;
                break;
+       case I40E_VIRTCHNL_OP_CONFIG_IWARP_IRQ_MAP:
+               adapter->client_pending &=
+                               ~(BIT(I40E_VIRTCHNL_OP_CONFIG_IWARP_IRQ_MAP));
+               break;
        case I40E_VIRTCHNL_OP_GET_RSS_HENA_CAPS: {
                struct i40e_virtchnl_rss_hena *vrh =
                        (struct i40e_virtchnl_rss_hena *)msg;