File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
drivers/crypto/qat/qat_common Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 5959#include "adf_transport_access_macros.h"
6060#include "adf_transport_internal.h"
6161
62+ #define ADF_MAX_NUM_VFS 32
63+
6264static int adf_enable_msix (struct adf_accel_dev * accel_dev )
6365{
6466 struct adf_accel_pci * pci_dev_info = & accel_dev -> accel_pci_dev ;
@@ -111,7 +113,7 @@ static irqreturn_t adf_msix_isr_ae(int irq, void *dev_ptr)
111113 struct adf_bar * pmisc =
112114 & GET_BARS (accel_dev )[hw_data -> get_misc_bar_id (hw_data )];
113115 void __iomem * pmisc_bar_addr = pmisc -> virt_addr ;
114- u32 vf_mask ;
116+ unsigned long vf_mask ;
115117
116118 /* Get the interrupt sources triggered by VFs */
117119 vf_mask = ((ADF_CSR_RD (pmisc_bar_addr , ADF_ERRSOU5 ) &
@@ -132,8 +134,7 @@ static irqreturn_t adf_msix_isr_ae(int irq, void *dev_ptr)
132134 * unless the VF is malicious and is attempting to
133135 * flood the host OS with VF2PF interrupts.
134136 */
135- for_each_set_bit (i , (const unsigned long * )& vf_mask ,
136- (sizeof (vf_mask ) * BITS_PER_BYTE )) {
137+ for_each_set_bit (i , & vf_mask , ADF_MAX_NUM_VFS ) {
137138 vf_info = accel_dev -> pf .vf_info + i ;
138139
139140 if (!__ratelimit (& vf_info -> vf2pf_ratelimit )) {
You can’t perform that action at this time.
0 commit comments