ice: enable VF admin queue interrupts
authorMitch Williams <mitch.a.williams@intel.com>
Tue, 19 Feb 2019 23:04:02 +0000 (15:04 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 26 Mar 2019 21:07:46 +0000 (14:07 -0700)
The VPINT_MBX_CTL register array must be programmed to enable VF admin
queue interrupts. Without this, VFs never get interrupts on vector 0,
and some VF drivers will fail to init.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_hw_autogen.h
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c

index 24255ff64ab0d089bb3ef7511873c7f303035294..af6f32358363c7de492e6fadb58eb14a3d6d3363 100644 (file)
 #define VPINT_ALLOC_PCI_LAST_S                 12
 #define VPINT_ALLOC_PCI_LAST_M                 ICE_M(0x7FF, 12)
 #define VPINT_ALLOC_PCI_VALID_M                        BIT(31)
+#define VPINT_MBX_CTL(_VSI)                    (0x0016A000 + ((_VSI) * 4))
+#define VPINT_MBX_CTL_CAUSE_ENA_M              BIT(30)
 #define GLLAN_RCTL_0                           0x002941F8
 #define QRX_CONTEXT(_i, _QRX)                  (0x00280000 + ((_i) * 8192 + (_QRX) * 4))
 #define QRX_CTRL(_QRX)                         (0x00120000 + ((_QRX) * 4))
index de3d268dcf57a6dbfc1e0fcd5e2dde61d1da797d..f4ecf17d52721f10798e200c4c44983bc62f359d 100644 (file)
@@ -604,6 +604,10 @@ static void ice_ena_vf_mappings(struct ice_vf *vf)
                wr32(hw, GLINT_VECT2FUNC(v), reg);
        }
 
+       /* Map mailbox interrupt. We put an explicit 0 here to remind us that
+        * VF admin queue interrupts will go to VF MSI-X vector 0.
+        */
+       wr32(hw, VPINT_MBX_CTL(abs_vf_id), VPINT_MBX_CTL_CAUSE_ENA_M | 0);
        /* set regardless of mapping mode */
        wr32(hw, VPLAN_TXQ_MAPENA(vf->vf_id), VPLAN_TXQ_MAPENA_TX_ENA_M);