vmxnet3: Add locking for access to command register
Access to cmd register is racey, especially in smp environments. Protect it using a spinlock. Signed-off-by: Matthieu Bucchianeri <matthieu@vmware.com> Signed-off-by: Shreyas N Bhatewara <sbhatewara@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
51956cd68b
commit
83d0feffc5
@@ -317,6 +317,7 @@ struct vmxnet3_adapter {
|
||||
struct vmxnet3_rx_queue rx_queue[VMXNET3_DEVICE_MAX_RX_QUEUES];
|
||||
struct vlan_group *vlan_grp;
|
||||
struct vmxnet3_intr intr;
|
||||
spinlock_t cmd_lock;
|
||||
struct Vmxnet3_DriverShared *shared;
|
||||
struct Vmxnet3_PMConf *pm_conf;
|
||||
struct Vmxnet3_TxQueueDesc *tqd_start; /* all tx queue desc */
|
||||
|
Reference in New Issue
Block a user