aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vmxnet3/vmxnet3_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/vmxnet3/vmxnet3_drv.c')
-rw-r--r--drivers/net/vmxnet3/vmxnet3_drv.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index 0ae1bcc6da73..e4a192b26423 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -1094,10 +1094,10 @@ vmxnet3_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
1094{ 1094{
1095 struct vmxnet3_adapter *adapter = netdev_priv(netdev); 1095 struct vmxnet3_adapter *adapter = netdev_priv(netdev);
1096 1096
1097 BUG_ON(skb->queue_mapping > adapter->num_tx_queues); 1097 BUG_ON(skb->queue_mapping > adapter->num_tx_queues);
1098 return vmxnet3_tq_xmit(skb, 1098 return vmxnet3_tq_xmit(skb,
1099 &adapter->tx_queue[skb->queue_mapping], 1099 &adapter->tx_queue[skb->queue_mapping],
1100 adapter, netdev); 1100 adapter, netdev);
1101} 1101}
1102 1102
1103 1103
@@ -1243,8 +1243,8 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx_queue *rq,
1243 skb_reserve(new_skb, NET_IP_ALIGN); 1243 skb_reserve(new_skb, NET_IP_ALIGN);
1244 rbi->skb = new_skb; 1244 rbi->skb = new_skb;
1245 rbi->dma_addr = pci_map_single(adapter->pdev, 1245 rbi->dma_addr = pci_map_single(adapter->pdev,
1246 rbi->skb->data, rbi->len, 1246 rbi->skb->data, rbi->len,
1247 PCI_DMA_FROMDEVICE); 1247 PCI_DMA_FROMDEVICE);
1248 rxd->addr = cpu_to_le64(rbi->dma_addr); 1248 rxd->addr = cpu_to_le64(rbi->dma_addr);
1249 rxd->len = rbi->len; 1249 rxd->len = rbi->len;
1250 1250
@@ -1331,14 +1331,14 @@ rcd_done:
1331 /* if needed, update the register */ 1331 /* if needed, update the register */
1332 if (unlikely(rq->shared->updateRxProd)) { 1332 if (unlikely(rq->shared->updateRxProd)) {
1333 VMXNET3_WRITE_BAR0_REG(adapter, 1333 VMXNET3_WRITE_BAR0_REG(adapter,
1334 rxprod_reg[ring_idx] + rq->qid * 8, 1334 rxprod_reg[ring_idx] + rq->qid * 8,
1335 ring->next2fill); 1335 ring->next2fill);
1336 rq->uncommitted[ring_idx] = 0; 1336 rq->uncommitted[ring_idx] = 0;
1337 } 1337 }
1338 1338
1339 vmxnet3_comp_ring_adv_next2proc(&rq->comp_ring); 1339 vmxnet3_comp_ring_adv_next2proc(&rq->comp_ring);
1340 vmxnet3_getRxComp(rcd, 1340 vmxnet3_getRxComp(rcd,
1341 &rq->comp_ring.base[rq->comp_ring.next2proc].rcd, &rxComp); 1341 &rq->comp_ring.base[rq->comp_ring.next2proc].rcd, &rxComp);
1342 } 1342 }
1343 1343
1344 return num_rxd; 1344 return num_rxd;
@@ -1922,7 +1922,7 @@ vmxnet3_free_irqs(struct vmxnet3_adapter *adapter)
1922 free_irq(adapter->pdev->irq, adapter->netdev); 1922 free_irq(adapter->pdev->irq, adapter->netdev);
1923 break; 1923 break;
1924 default: 1924 default:
1925 BUG_ON(true); 1925 BUG();
1926 } 1926 }
1927} 1927}
1928 1928
@@ -2949,11 +2949,11 @@ vmxnet3_probe_device(struct pci_dev *pdev,
2949 2949
2950 spin_lock_init(&adapter->cmd_lock); 2950 spin_lock_init(&adapter->cmd_lock);
2951 adapter->shared = pci_alloc_consistent(adapter->pdev, 2951 adapter->shared = pci_alloc_consistent(adapter->pdev,
2952 sizeof(struct Vmxnet3_DriverShared), 2952 sizeof(struct Vmxnet3_DriverShared),
2953 &adapter->shared_pa); 2953 &adapter->shared_pa);
2954 if (!adapter->shared) { 2954 if (!adapter->shared) {
2955 printk(KERN_ERR "Failed to allocate memory for %s\n", 2955 printk(KERN_ERR "Failed to allocate memory for %s\n",
2956 pci_name(pdev)); 2956 pci_name(pdev));
2957 err = -ENOMEM; 2957 err = -ENOMEM;
2958 goto err_alloc_shared; 2958 goto err_alloc_shared;
2959 } 2959 }
@@ -2964,16 +2964,16 @@ vmxnet3_probe_device(struct pci_dev *pdev,
2964 size = sizeof(struct Vmxnet3_TxQueueDesc) * adapter->num_tx_queues; 2964 size = sizeof(struct Vmxnet3_TxQueueDesc) * adapter->num_tx_queues;
2965 size += sizeof(struct Vmxnet3_RxQueueDesc) * adapter->num_rx_queues; 2965 size += sizeof(struct Vmxnet3_RxQueueDesc) * adapter->num_rx_queues;
2966 adapter->tqd_start = pci_alloc_consistent(adapter->pdev, size, 2966 adapter->tqd_start = pci_alloc_consistent(adapter->pdev, size,
2967 &adapter->queue_desc_pa); 2967 &adapter->queue_desc_pa);
2968 2968
2969 if (!adapter->tqd_start) { 2969 if (!adapter->tqd_start) {
2970 printk(KERN_ERR "Failed to allocate memory for %s\n", 2970 printk(KERN_ERR "Failed to allocate memory for %s\n",
2971 pci_name(pdev)); 2971 pci_name(pdev));
2972 err = -ENOMEM; 2972 err = -ENOMEM;
2973 goto err_alloc_queue_desc; 2973 goto err_alloc_queue_desc;
2974 } 2974 }
2975 adapter->rqd_start = (struct Vmxnet3_RxQueueDesc *)(adapter->tqd_start + 2975 adapter->rqd_start = (struct Vmxnet3_RxQueueDesc *)(adapter->tqd_start +
2976 adapter->num_tx_queues); 2976 adapter->num_tx_queues);
2977 2977
2978 adapter->pm_conf = kmalloc(sizeof(struct Vmxnet3_PMConf), GFP_KERNEL); 2978 adapter->pm_conf = kmalloc(sizeof(struct Vmxnet3_PMConf), GFP_KERNEL);
2979 if (adapter->pm_conf == NULL) { 2979 if (adapter->pm_conf == NULL) {
@@ -3019,7 +3019,7 @@ vmxnet3_probe_device(struct pci_dev *pdev,
3019 3019
3020 adapter->dev_number = atomic_read(&devices_found); 3020 adapter->dev_number = atomic_read(&devices_found);
3021 3021
3022 adapter->share_intr = irq_share_mode; 3022 adapter->share_intr = irq_share_mode;
3023 if (adapter->share_intr == VMXNET3_INTR_BUDDYSHARE && 3023 if (adapter->share_intr == VMXNET3_INTR_BUDDYSHARE &&
3024 adapter->num_tx_queues != adapter->num_rx_queues) 3024 adapter->num_tx_queues != adapter->num_rx_queues)
3025 adapter->share_intr = VMXNET3_INTR_DONTSHARE; 3025 adapter->share_intr = VMXNET3_INTR_DONTSHARE;
@@ -3065,7 +3065,7 @@ vmxnet3_probe_device(struct pci_dev *pdev,
3065 3065
3066 if (err) { 3066 if (err) {
3067 printk(KERN_ERR "Failed to register adapter %s\n", 3067 printk(KERN_ERR "Failed to register adapter %s\n",
3068 pci_name(pdev)); 3068 pci_name(pdev));
3069 goto err_register; 3069 goto err_register;
3070 } 3070 }
3071 3071