net/virtio: disable LSC interrupt if MSIX not enabled
authorMatt Peters <matt.peters@windriver.com>
Thu, 9 Mar 2017 20:28:02 +0000 (15:28 -0500)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Sat, 1 Apr 2017 06:58:54 +0000 (08:58 +0200)
commita5ed844846aefeefb1df3df15e6588c265452f19
treea2eccf0ce64f07888fa4c5103aeb25ef1c62dd96
parent2269b9aec50de0da9aa4b26805f8f6ed20b3ee39
net/virtio: disable LSC interrupt if MSIX not enabled

The link state change interrupt can only be configured if the virtio device
supports MSIX.  Prior to this change the writing of the vector to the PCI
config space was causing it to overwrite the initial part of the MAC
address since the MSIX vector is not in the config space and is occupied by
the MAC address.

This has been reproduced in Virtual Box (v5.0.30.r112061) in Windows 7.

Fixes: 954ea11540b6 ("virtio: do not report link state feature unless available")
Cc: stable@dpdk.org
Signed-off-by: Matt Peters <matt.peters@windriver.com>
Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
drivers/net/virtio/virtio_ethdev.c