Lines Matching defs:nic
99 struct pci_nic *nic = pci_get_drvdata(pdev);
107 nic->port_num == 1 ? "" : ", 2-Port");
109 readl(nic->regs + SROM_VER), readl(nic->regs + FPGA_VER) & 0xFFF,
110 readl(nic->regs + FPGA_SEED),
115 static void print_fw_id(struct pci_nic *nic)
117 pr_info("fw 0x%x\n", readl(nic->regs + FW_VER));
426 #define BDX_IRQ_TYPE ((priv->nic->irq_type == IRQ_MSI) ? 0 : IRQF_SHARED)
625 print_fw_id(priv->nic);
636 return (offset > (u32) (BDX_REGS_SIZE / priv->nic->port_num)) ?
987 * filled and packets will be dropped by nic without getting into host or
989 * all packets, but dropping in nic is cheaper, since it takes 0 cpu cycles
1074 * @priv: nic's private structure
1188 * @priv: nic's private structure
1896 struct pci_nic *nic;
1900 nic = vmalloc(sizeof(*nic));
1901 if (!nic)
1940 nic->regs = ioremap(pciaddr, regionSize);
1941 if (!nic->regs) {
1952 pci_set_drvdata(pdev, nic);
1955 nic->port_num = 2;
1957 nic->port_num = 1;
1961 bdx_hw_reset_direct(nic->regs);
1963 nic->irq_type = IRQ_INTX;
1965 if ((readl(nic->regs + FPGA_VER) & 0xFFF) >= 378) {
1970 nic->irq_type = IRQ_MSI;
1976 for (port = 0; port < nic->port_num; port++) {
2002 priv = nic->priv[port] = netdev_priv(ndev);
2004 priv->pBdxRegs = nic->regs + port * 0x8000;
2008 priv->nic = nic;
2013 if ((readl(nic->regs + FPGA_VER) & 0xFFF) == 308) {
2066 iounmap(nic->regs);
2072 vfree(nic);
2397 struct pci_nic *nic = pci_get_drvdata(pdev);
2401 for (port = 0; port < nic->port_num; port++) {
2402 ndev = nic->priv[port]->ndev;
2407 /*bdx_hw_reset_direct(nic->regs); */
2409 if (nic->irq_type == IRQ_MSI)
2413 iounmap(nic->regs);
2416 vfree(nic);