File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -3445,18 +3445,23 @@ static int hv_pci_suspend(struct hv_device *hdev)
3445
3445
3446
3446
static int hv_pci_restore_msi_msg (struct pci_dev * pdev , void * arg )
3447
3447
{
3448
- struct msi_desc * entry ;
3449
3448
struct irq_data * irq_data ;
3449
+ struct msi_desc * entry ;
3450
+ int ret = 0 ;
3450
3451
3451
- for_each_pci_msi_entry (entry , pdev ) {
3452
+ msi_lock_descs (& pdev -> dev );
3453
+ msi_for_each_desc (entry , & pdev -> dev , MSI_DESC_ASSOCIATED ) {
3452
3454
irq_data = irq_get_irq_data (entry -> irq );
3453
- if (WARN_ON_ONCE (!irq_data ))
3454
- return - EINVAL ;
3455
+ if (WARN_ON_ONCE (!irq_data )) {
3456
+ ret = - EINVAL ;
3457
+ break ;
3458
+ }
3455
3459
3456
3460
hv_compose_msi_msg (irq_data , & entry -> msg );
3457
3461
}
3462
+ msi_unlock_descs (& pdev -> dev );
3458
3463
3459
- return 0 ;
3464
+ return ret ;
3460
3465
}
3461
3466
3462
3467
/*
You can’t perform that action at this time.
0 commit comments