Lines Matching refs:nic
103 struct pci_nic *nic = pci_get_drvdata(pdev); in print_hw_id() local
111 nic->port_num == 1 ? "" : ", 2-Port"); in print_hw_id()
113 readl(nic->regs + SROM_VER), readl(nic->regs + FPGA_VER) & 0xFFF, in print_hw_id()
114 readl(nic->regs + FPGA_SEED), in print_hw_id()
119 static void print_fw_id(struct pci_nic *nic) in print_fw_id() argument
121 pr_info("fw 0x%x\n", readl(nic->regs + FW_VER)); in print_fw_id()
427 #define BDX_IRQ_TYPE ((priv->nic->irq_type == IRQ_MSI) ? 0 : IRQF_SHARED) in bdx_hw_start()
626 print_fw_id(priv->nic); in bdx_open()
637 return (offset > (u32) (BDX_REGS_SIZE / priv->nic->port_num)) ? in bdx_range_check()
1924 struct pci_nic *nic; in bdx_probe() local
1928 nic = vmalloc(sizeof(*nic)); in bdx_probe()
1929 if (!nic) in bdx_probe()
1968 nic->regs = ioremap(pciaddr, regionSize); in bdx_probe()
1969 if (!nic->regs) { in bdx_probe()
1980 pci_set_drvdata(pdev, nic); in bdx_probe()
1983 nic->port_num = 2; in bdx_probe()
1985 nic->port_num = 1; in bdx_probe()
1989 bdx_hw_reset_direct(nic->regs); in bdx_probe()
1991 nic->irq_type = IRQ_INTX; in bdx_probe()
1993 if ((readl(nic->regs + FPGA_VER) & 0xFFF) >= 378) { in bdx_probe()
1998 nic->irq_type = IRQ_MSI; in bdx_probe()
2004 for (port = 0; port < nic->port_num; port++) { in bdx_probe()
2030 priv = nic->priv[port] = netdev_priv(ndev); in bdx_probe()
2032 priv->pBdxRegs = nic->regs + port * 0x8000; in bdx_probe()
2036 priv->nic = nic; in bdx_probe()
2041 if ((readl(nic->regs + FPGA_VER) & 0xFFF) == 308) { in bdx_probe()
2089 iounmap(nic->regs); in bdx_probe()
2095 vfree(nic); in bdx_probe()
2430 struct pci_nic *nic = pci_get_drvdata(pdev); in bdx_remove() local
2434 for (port = 0; port < nic->port_num; port++) { in bdx_remove()
2435 ndev = nic->priv[port]->ndev; in bdx_remove()
2442 if (nic->irq_type == IRQ_MSI) in bdx_remove()
2446 iounmap(nic->regs); in bdx_remove()
2449 vfree(nic); in bdx_remove()