Page MenuHomeFreeBSD

pci: Save MSIX ctrl value before pci_mask_msix call
AcceptedPublic

Authored by krzysztof.galazka_intel.com on Mon, Mar 24, 9:51 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 26, 1:22 PM
Unknown Object (File)
Tue, Mar 25, 12:29 PM
Unknown Object (File)
Tue, Mar 25, 11:32 AM
Subscribers

Details

Reviewers
jhb
kbowling
Summary

Function pci_mask_msix uses cached value of MSI-X CTRL
register to verify if vector index is valid. Update
that value in pci_alloc_msix_method before it is
used to avoid kernel panic.

Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 63112
Build 59996: arc lint + arc unit

Event Timeline

sys/dev/pci/pci.c
1931

Huh. I would maybe keep the code unchanged below and just do an extra assignment here? The normal style is a blank line before comments, but this is also part of the logical masking operation so maybe:

/*
  * Mask all vectors.  Note that the message index assertion in
  * pci_mask_msix requires msix_ctrl to be set.
  */
cfg->msix.msix_ctrl = ctrl;
for (i = 0; i < msgnum; i++)
This revision is now accepted and ready to land.Fri, Mar 28, 1:04 AM