diff options
Diffstat (limited to 'drivers')
-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 0d47c3a05307..c16ed961153a 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) |
@@ -2733,13 +2734,14 @@ static void | |||
2733 | vmxnet3_alloc_intr_resources(struct vmxnet3_adapter *adapter) | 2734 | vmxnet3_alloc_intr_resources(struct vmxnet3_adapter *adapter) |
2734 | { | 2735 | { |
2735 | u32 cfg; | 2736 | u32 cfg; |
2737 | unsigned long flags; | ||
2736 | 2738 | ||
2737 | /* intr settings */ | 2739 | /* intr settings */ |
2738 | spin_lock(&adapter->cmd_lock); | 2740 | spin_lock_irqsave(&adapter->cmd_lock, flags); |
2739 | VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, | 2741 | VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, |
2740 | VMXNET3_CMD_GET_CONF_INTR); | 2742 | VMXNET3_CMD_GET_CONF_INTR); |
2741 | cfg = VMXNET3_READ_BAR1_REG(adapter, VMXNET3_REG_CMD); | 2743 | cfg = VMXNET3_READ_BAR1_REG(adapter, VMXNET3_REG_CMD); |
2742 | spin_unlock(&adapter->cmd_lock); | 2744 | spin_unlock_irqrestore(&adapter->cmd_lock, flags); |
2743 | adapter->intr.type = cfg & 0x3; | 2745 | adapter->intr.type = cfg & 0x3; |
2744 | adapter->intr.mask_mode = (cfg >> 2) & 0x3; | 2746 | adapter->intr.mask_mode = (cfg >> 2) & 0x3; |
2745 | 2747 | ||