aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vmxnet3/vmxnet3_drv.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-05-11 14:26:15 -0400
committerDavid S. Miller <davem@davemloft.net>2011-05-11 14:26:58 -0400
commit3c709f8fb43e07a0403bba4a8ca7ba00ab874994 (patch)
tree9efc1e2bf6930851f0224f525b6cde0f5297fa61 /drivers/net/vmxnet3/vmxnet3_drv.c
parent0074820978004cc484b132d7a9ce0df414660d9d (diff)
parent9bbc052d5e63512b0ce4e201ea97e12fba9fda82 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-3.6
Conflicts: drivers/net/benet/be_main.c
Diffstat (limited to 'drivers/net/vmxnet3/vmxnet3_drv.c')
-rw-r--r--drivers/net/vmxnet3/vmxnet3_drv.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index 7a494f79c88f..c0da23096160 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -178,6 +178,7 @@ static void
178vmxnet3_process_events(struct vmxnet3_adapter *adapter) 178vmxnet3_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
2720vmxnet3_alloc_intr_resources(struct vmxnet3_adapter *adapter) 2721vmxnet3_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