aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/nes/nes.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/nes/nes.c')
-rw-r--r--drivers/infiniband/hw/nes/nes.c37
1 files changed, 15 insertions, 22 deletions
diff --git a/drivers/infiniband/hw/nes/nes.c b/drivers/infiniband/hw/nes/nes.c
index de7b9d7166f3..0c9f0aa5d4ea 100644
--- a/drivers/infiniband/hw/nes/nes.c
+++ b/drivers/infiniband/hw/nes/nes.c
@@ -110,8 +110,8 @@ static unsigned int sysfs_nonidx_addr;
110static unsigned int sysfs_idx_addr; 110static unsigned int sysfs_idx_addr;
111 111
112static struct pci_device_id nes_pci_table[] = { 112static struct pci_device_id nes_pci_table[] = {
113 {PCI_VENDOR_ID_NETEFFECT, PCI_DEVICE_ID_NETEFFECT_NE020, PCI_ANY_ID, PCI_ANY_ID}, 113 { PCI_VDEVICE(NETEFFECT, PCI_DEVICE_ID_NETEFFECT_NE020), },
114 {PCI_VENDOR_ID_NETEFFECT, PCI_DEVICE_ID_NETEFFECT_NE020_KR, PCI_ANY_ID, PCI_ANY_ID}, 114 { PCI_VDEVICE(NETEFFECT, PCI_DEVICE_ID_NETEFFECT_NE020_KR), },
115 {0} 115 {0}
116}; 116};
117 117
@@ -259,13 +259,11 @@ static void nes_cqp_rem_ref_callback(struct nes_device *nesdev, struct nes_cqp_r
259 unsigned long flags; 259 unsigned long flags;
260 struct nes_qp *nesqp = cqp_request->cqp_callback_pointer; 260 struct nes_qp *nesqp = cqp_request->cqp_callback_pointer;
261 struct nes_adapter *nesadapter = nesdev->nesadapter; 261 struct nes_adapter *nesadapter = nesdev->nesadapter;
262 u32 qp_id;
263 262
264 atomic_inc(&qps_destroyed); 263 atomic_inc(&qps_destroyed);
265 264
266 /* Free the control structures */ 265 /* Free the control structures */
267 266
268 qp_id = nesqp->hwqp.qp_id;
269 if (nesqp->pbl_vbase) { 267 if (nesqp->pbl_vbase) {
270 pci_free_consistent(nesdev->pcidev, nesqp->qp_mem_size, 268 pci_free_consistent(nesdev->pcidev, nesqp->qp_mem_size,
271 nesqp->hwqp.q2_vbase, nesqp->hwqp.q2_pbase); 269 nesqp->hwqp.q2_vbase, nesqp->hwqp.q2_pbase);
@@ -441,7 +439,6 @@ static int __devinit nes_probe(struct pci_dev *pcidev, const struct pci_device_i
441 struct net_device *netdev = NULL; 439 struct net_device *netdev = NULL;
442 struct nes_device *nesdev = NULL; 440 struct nes_device *nesdev = NULL;
443 int ret = 0; 441 int ret = 0;
444 struct nes_vnic *nesvnic = NULL;
445 void __iomem *mmio_regs = NULL; 442 void __iomem *mmio_regs = NULL;
446 u8 hw_rev; 443 u8 hw_rev;
447 444
@@ -664,25 +661,21 @@ static int __devinit nes_probe(struct pci_dev *pcidev, const struct pci_device_i
664 nes_notifiers_registered++; 661 nes_notifiers_registered++;
665 662
666 /* Initialize network devices */ 663 /* Initialize network devices */
667 if ((netdev = nes_netdev_init(nesdev, mmio_regs)) == NULL) { 664 if ((netdev = nes_netdev_init(nesdev, mmio_regs)) == NULL)
668 goto bail7; 665 goto bail7;
669 }
670
671 /* Register network device */
672 ret = register_netdev(netdev);
673 if (ret) {
674 printk(KERN_ERR PFX "Unable to register netdev, ret = %d\n", ret);
675 nes_netdev_destroy(netdev);
676 goto bail7;
677 }
678 666
679 nes_print_macaddr(netdev); 667 /* Register network device */
680 /* create a CM core for this netdev */ 668 ret = register_netdev(netdev);
681 nesvnic = netdev_priv(netdev); 669 if (ret) {
670 printk(KERN_ERR PFX "Unable to register netdev, ret = %d\n", ret);
671 nes_netdev_destroy(netdev);
672 goto bail7;
673 }
682 674
683 nesdev->netdev_count++; 675 nes_print_macaddr(netdev);
684 nesdev->nesadapter->netdev_count++;
685 676
677 nesdev->netdev_count++;
678 nesdev->nesadapter->netdev_count++;
686 679
687 printk(KERN_ERR PFX "%s: NetEffect RNIC driver successfully loaded.\n", 680 printk(KERN_ERR PFX "%s: NetEffect RNIC driver successfully loaded.\n",
688 pci_name(pcidev)); 681 pci_name(pcidev));
@@ -1104,7 +1097,7 @@ static ssize_t nes_show_wqm_quanta(struct device_driver *ddp, char *buf)
1104 i++; 1097 i++;
1105 } 1098 }
1106 1099
1107 return snprintf(buf, PAGE_SIZE, "0x%X\n", wqm_quanta); 1100 return snprintf(buf, PAGE_SIZE, "0x%X\n", wqm_quanta_value);
1108} 1101}
1109 1102
1110 1103