@@ -215,10 +215,10 @@ static void irdma_remove(struct auxiliary_device *aux_dev)
215
215
pr_debug ("INIT: Gen2 PF[%d] device remove success\n" , PCI_FUNC (pf -> pdev -> devfn ));
216
216
}
217
217
218
- static void irdma_fill_device_info (struct irdma_device * iwdev , struct ice_pf * pf )
218
+ static void irdma_fill_device_info (struct irdma_device * iwdev , struct ice_pf * pf ,
219
+ struct ice_vsi * vsi )
219
220
{
220
221
struct irdma_pci_f * rf = iwdev -> rf ;
221
- struct ice_vsi * vsi = ice_get_main_vsi (pf );
222
222
223
223
rf -> cdev = pf ;
224
224
rf -> gen_ops .register_qset = irdma_lan_register_qset ;
@@ -253,12 +253,15 @@ static int irdma_probe(struct auxiliary_device *aux_dev, const struct auxiliary_
253
253
struct iidc_auxiliary_dev ,
254
254
adev );
255
255
struct ice_pf * pf = iidc_adev -> pf ;
256
+ struct ice_vsi * vsi = ice_get_main_vsi (pf );
256
257
struct iidc_qos_params qos_info = {};
257
258
struct irdma_device * iwdev ;
258
259
struct irdma_pci_f * rf ;
259
260
struct irdma_l2params l2params = {};
260
261
int err ;
261
262
263
+ if (!vsi )
264
+ return - EIO ;
262
265
iwdev = ib_alloc_device (irdma_device , ibdev );
263
266
if (!iwdev )
264
267
return - ENOMEM ;
@@ -268,7 +271,7 @@ static int irdma_probe(struct auxiliary_device *aux_dev, const struct auxiliary_
268
271
return - ENOMEM ;
269
272
}
270
273
271
- irdma_fill_device_info (iwdev , pf );
274
+ irdma_fill_device_info (iwdev , pf , vsi );
272
275
rf = iwdev -> rf ;
273
276
274
277
if (irdma_ctrl_init_hw (rf )) {
0 commit comments