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)) ?
981 * filled and packets will be dropped by nic without getting into host or
983 * all packets, but dropping in nic is cheaper, since it takes 0 cpu cycles
1068 * @priv: nic's private structure
1182 * @priv: nic's private structure
1889 struct pci_nic *nic;
1894 nic = vmalloc(sizeof(*nic));
1895 if (!nic)
1928 nic->regs = ioremap(pciaddr, regionSize);
1929 if (!nic->regs) {
1940 pci_set_drvdata(pdev, nic);
1943 nic->port_num = 2;
1945 nic->port_num = 1;
1949 bdx_hw_reset_direct(nic->regs);
1951 nic->irq_type = IRQ_INTX;
1953 if ((readl(nic->regs + FPGA_VER) & 0xFFF) >= 378) {
1958 nic->irq_type = IRQ_MSI;
1964 for (port = 0; port < nic->port_num; port++) {
1988 priv = nic->priv[port] = netdev_priv(ndev);
1990 priv->pBdxRegs = nic->regs + port * 0x8000;
1994 priv->nic = nic;
1999 if ((readl(nic->regs + FPGA_VER) & 0xFFF) == 308) {
2052 iounmap(nic->regs);
2058 vfree(nic);
2395 struct pci_nic *nic = pci_get_drvdata(pdev);
2399 for (port = 0; port < nic->port_num; port++) {
2400 ndev = nic->priv[port]->ndev;
2405 /*bdx_hw_reset_direct(nic->regs); */
2407 if (nic->irq_type == IRQ_MSI)
2411 iounmap(nic->regs);
2414 vfree(nic);