/* PCI address space mapping information. * Each of the 3 address spaces given by BAR0, BAR2 and BAR4 of * Octeon gets mapped to different physical address spaces in * the kernel.
*/ struct octep_mmio { /* The physical address to which the PCI address space is mapped. */
u8 __iomem *hw_addr;
/* Flag indicating the mapping was successful. */ int mapped;
};
/* Admin state of the link (ifconfig <iface> up/down */
u8 admin_up;
/* Operational state of the link: physical link is up down */
u8 oper_up;
};
/* The Octeon VF device specific info data structure.*/ struct octep_pfvf_info {
u8 mac_addr[ETH_ALEN];
u32 flags;
u32 mbox_version;
};
/* The Octeon device specific private data structure. * Each Octeon device has this structure to represent all its components.
*/ struct octep_device { struct octep_config *conf;
/* Hardware Interface Link info like supported modes, aneg support */ struct octep_iface_link_info link_info;
/* Mailbox to talk to VFs */ struct octep_mbox *mbox[OCTEP_MAX_VF]; /* VFs info */ struct octep_pfvf_info vf_info[OCTEP_MAX_VF];
/* Work entry to handle Tx timeout */ struct work_struct tx_timeout_task;
/* control mbox over pf */ struct octep_ctrl_mbox ctrl_mbox;
/* offset for iface stats */
u32 ctrl_mbox_ifstats_offset;
/* Work entry to handle ctrl mbox interrupt */ struct work_struct ctrl_mbox_task; /* Wait queue for host to firmware requests */
wait_queue_head_t ctrl_req_wait_q; /* List of objects waiting for h2f response */ struct list_head ctrl_req_wait_list;
/* Enable non-ioq interrupt polling */ bool poll_non_ioq_intr; /* Work entry to poll non-ioq interrupts */ struct delayed_work intr_poll_task;
/* Firmware heartbeat timer */ struct timer_list hb_timer; /* Firmware heartbeat miss count tracked by timer */
atomic_t hb_miss_cnt; /* Task to reset device on heartbeat miss */ struct delayed_work hb_task;
};
/* Read windowed register. * @param oct - pointer to the Octeon device. * @param addr - Address of the register to read. * * This routine is called to read from the indirectly accessed * Octeon registers that are visible through a PCI BAR0 mapped window * register. * @return - 64 bit value read from the register.
*/ staticinline u64
OCTEP_PCI_WIN_READ(struct octep_device *oct, u64 addr)
{
u64 val64;
/* Write windowed register. * @param oct - pointer to the Octeon device. * @param addr - Address of the register to write * @param val - Value to write * * This routine is called to write to the indirectly accessed * Octeon registers that are visible through a PCI BAR0 mapped window * register. * @return Nothing.
*/ staticinlinevoid
OCTEP_PCI_WIN_WRITE(struct octep_device *oct, u64 addr, u64 val)
{
writeq(addr, oct->pci_win_regs.pci_win_wr_addr);
writeq(val, oct->pci_win_regs.pci_win_wr_data);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.