]> asedeno.scripts.mit.edu Git - linux.git/commit
PCI: hv: Change pci_protocol_version to per-hbus
authorDexuan Cui <decui@microsoft.com>
Mon, 25 Nov 2019 05:33:53 +0000 (21:33 -0800)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tue, 26 Nov 2019 10:33:18 +0000 (10:33 +0000)
commit14ef39fddd2367523de25b87dccfe6422c3f3efa
treeefea758b0b1d0401f857d9d6f4ac0ab3f57f3788
parentac82fc83270884adea31d9dec22db09392058bf7
PCI: hv: Change pci_protocol_version to per-hbus

A VM can have multiple Hyper-V hbus. It's incorrect to set the global
variable 'pci_protocol_version' when *every* hbus is initialized in
hv_pci_protocol_negotiation(). This is not an issue in practice since
every hbus should have the same value of hbus->protocol_version, but
we should make the variable per-hbus, so in case we have busses
with different protocol versions, the driver can still work correctly.

Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
drivers/pci/controller/pci-hyperv.c