diff options
Diffstat (limited to 'drivers/net/vmxnet3')
-rw-r--r-- | drivers/net/vmxnet3/vmxnet3_drv.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 7a494f79c88..c0da2309616 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c | |||
@@ -178,6 +178,7 @@ static void | |||
178 | vmxnet3_process_events(struct vmxnet3_adapter *adapter) | 178 | vmxnet3_process_events(struct vmxnet3_adapter *adapter) |
179 | { | 179 | { |
180 | int i; | 180 | int i; |
181 | unsigned long flags; | ||
181 | u32 events = le32_to_cpu(adapter->shared->ecr); | 182 | u32 events = le32_to_cpu(adapter->shared->ecr); |
182 | if (!events) | 183 | if (!events) |
183 | return; | 184 | return; |
@@ -190,10 +191,10 @@ vmxnet3_process_events(struct vmxnet3_adapter *adapter) | |||
190 | 191 | ||
191 | /* Check if there is an error on xmit/recv queues */ | 192 | /* Check if there is an error on xmit/recv queues */ |
192 | if (events & (VMXNET3_ECR_TQERR | VMXNET3_ECR_RQERR)) { | 193 | if (events & (VMXNET3_ECR_TQERR | VMXNET3_ECR_RQERR)) { |
193 | spin_lock(&adapter->cmd_lock); | 194 | spin_lock_irqsave(&adapter->cmd_lock, flags); |
194 | VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, | 195 | VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, |
195 | VMXNET3_CMD_GET_QUEUE_STATUS); | 196 | VMXNET3_CMD_GET_QUEUE_STATUS); |
196 | spin_unlock(&adapter->cmd_lock); | 197 | spin_unlock_irqrestore(&adapter->cmd_lock, flags); |
197 | 198 | ||
198 | for (i = 0; i < adapter->num_tx_queues; i++) | 199 | for (i = 0; i < adapter->num_tx_queues; i++) |
199 | if (adapter->tqd_start[i].status.stopped) | 200 | if (adapter->tqd_start[i].status.stopped) |
@@ -2720,13 +2721,14 @@ static void | |||
2720 | vmxnet3_alloc_intr_resources(struct vmxnet3_adapter *adapter) | 2721 | vmxnet3_alloc_intr_resources(struct vmxnet3_adapter *adapter) |
2721 | { | 2722 | { |
2722 | u32 cfg; | 2723 | u32 cfg; |
2724 | unsigned long flags; | ||
2723 | 2725 | ||
2724 | /* intr settings */ | 2726 | /* intr settings */ |
2725 | spin_lock(&adapter->cmd_lock); | 2727 | spin_lock_irqsave(&adapter->cmd_lock, flags); |
2726 | VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, | 2728 | VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, |
2727 | VMXNET3_CMD_GET_CONF_INTR); | 2729 | VMXNET3_CMD_GET_CONF_INTR); |
2728 | cfg = VMXNET3_READ_BAR1_REG(adapter, VMXNET3_REG_CMD); | 2730 | cfg = VMXNET3_READ_BAR1_REG(adapter, VMXNET3_REG_CMD); |
2729 | spin_unlock(&adapter->cmd_lock); | 2731 | spin_unlock_irqrestore(&adapter->cmd_lock, flags); |
2730 | adapter->intr.type = cfg & 0x3; | 2732 | adapter->intr.type = cfg & 0x3; |
2731 | adapter->intr.mask_mode = (cfg >> 2) & 0x3; | 2733 | adapter->intr.mask_mode = (cfg >> 2) & 0x3; |
2732 | 2734 | ||