/openbmc/linux/drivers/net/ethernet/intel/ |
H A D | e100.c | 537 struct nic { struct 542 u16 (*mdio_ctrl)(struct nic *nic, u32 addr, u32 dir, u32 reg, u16 data); argument 606 static inline void e100_write_flush(struct nic *nic) in e100_write_flush() argument 610 (void)ioread8(&nic->csr->scb.status); in e100_write_flush() 613 static void e100_enable_irq(struct nic *nic) in e100_enable_irq() argument 617 spin_lock_irqsave(&nic->cmd_lock, flags); in e100_enable_irq() 618 iowrite8(irq_mask_none, &nic->csr->scb.cmd_hi); in e100_enable_irq() 619 e100_write_flush(nic); in e100_enable_irq() 620 spin_unlock_irqrestore(&nic->cmd_lock, flags); in e100_enable_irq() 623 static void e100_disable_irq(struct nic *nic) in e100_disable_irq() argument [all …]
|
/openbmc/linux/drivers/net/ethernet/cavium/thunder/ |
H A D | nicvf_main.c | 75 static inline u8 nicvf_netdev_qidx(struct nicvf *nic, u8 qidx) in nicvf_netdev_qidx() argument 77 if (nic->sqs_mode) in nicvf_netdev_qidx() 78 return qidx + ((nic->sqs_id + 1) * MAX_CMP_QUEUES_PER_QS); in nicvf_netdev_qidx() 93 void nicvf_reg_write(struct nicvf *nic, u64 offset, u64 val) in nicvf_reg_write() argument 95 writeq_relaxed(val, nic->reg_base + offset); in nicvf_reg_write() 98 u64 nicvf_reg_read(struct nicvf *nic, u64 offset) in nicvf_reg_read() argument 100 return readq_relaxed(nic->reg_base + offset); in nicvf_reg_read() 103 void nicvf_queue_reg_write(struct nicvf *nic, u64 offset, in nicvf_queue_reg_write() argument 106 void __iomem *addr = nic->reg_base + offset; in nicvf_queue_reg_write() 111 u64 nicvf_queue_reg_read(struct nicvf *nic, u64 offset, u64 qidx) in nicvf_queue_reg_read() argument [all …]
|
H A D | nic_main.c | 88 static void nic_reg_write(struct nicpf *nic, u64 offset, u64 val) in nic_reg_write() argument 90 writeq_relaxed(val, nic->reg_base + offset); in nic_reg_write() 93 static u64 nic_reg_read(struct nicpf *nic, u64 offset) in nic_reg_read() argument 95 return readq_relaxed(nic->reg_base + offset); in nic_reg_read() 99 static void nic_enable_mbx_intr(struct nicpf *nic) in nic_enable_mbx_intr() argument 101 int vf_cnt = pci_sriov_get_totalvfs(nic->pdev); in nic_enable_mbx_intr() 106 nic_reg_write(nic, NIC_PF_MAILBOX_INT, INTR_MASK(vf_cnt)); in nic_enable_mbx_intr() 109 nic_reg_write(nic, NIC_PF_MAILBOX_ENA_W1S, INTR_MASK(vf_cnt)); in nic_enable_mbx_intr() 112 nic_reg_write(nic, NIC_PF_MAILBOX_INT + sizeof(u64), in nic_enable_mbx_intr() 114 nic_reg_write(nic, NIC_PF_MAILBOX_ENA_W1S + sizeof(u64), in nic_enable_mbx_intr() [all …]
|
H A D | nicvf_queues.c | 22 static void nicvf_get_page(struct nicvf *nic) in nicvf_get_page() argument 24 if (!nic->rb_pageref || !nic->rb_page) in nicvf_get_page() 27 page_ref_add(nic->rb_page, nic->rb_pageref); in nicvf_get_page() 28 nic->rb_pageref = 0; in nicvf_get_page() 32 static int nicvf_poll_reg(struct nicvf *nic, int qidx, in nicvf_poll_reg() argument 43 reg_val = nicvf_queue_reg_read(nic, reg, qidx); in nicvf_poll_reg() 49 netdev_err(nic->netdev, "Poll on reg 0x%llx failed\n", reg); in nicvf_poll_reg() 54 static int nicvf_alloc_q_desc_mem(struct nicvf *nic, struct q_desc_mem *dmem, in nicvf_alloc_q_desc_mem() argument 60 dmem->unalign_base = dma_alloc_coherent(&nic->pdev->dev, dmem->size, in nicvf_alloc_q_desc_mem() 72 static void nicvf_free_q_desc_mem(struct nicvf *nic, struct q_desc_mem *dmem) in nicvf_free_q_desc_mem() argument [all …]
|
H A D | nicvf_ethtool.c | 122 struct nicvf *nic = netdev_priv(netdev); in nicvf_get_link_ksettings() local 128 if (!nic->link_up) { in nicvf_get_link_ksettings() 134 switch (nic->speed) { in nicvf_get_link_ksettings() 154 if (nic->mac_type == BGX_MODE_RXAUI) { in nicvf_get_link_ksettings() 171 cmd->base.duplex = nic->duplex; in nicvf_get_link_ksettings() 172 cmd->base.speed = nic->speed; in nicvf_get_link_ksettings() 184 struct nicvf *nic = netdev_priv(netdev); in nicvf_get_link() local 186 return nic->link_up; in nicvf_get_link() 192 struct nicvf *nic = netdev_priv(netdev); in nicvf_get_drvinfo() local 195 strscpy(info->bus_info, pci_name(nic->pdev), sizeof(info->bus_info)); in nicvf_get_drvinfo() [all …]
|
H A D | nicvf_queues.h | 320 static inline u64 nicvf_iova_to_phys(struct nicvf *nic, dma_addr_t dma_addr) in nicvf_iova_to_phys() argument 323 if (nic->iommu_domain) in nicvf_iova_to_phys() 324 return iommu_iova_to_phys(nic->iommu_domain, dma_addr); in nicvf_iova_to_phys() 328 void nicvf_unmap_sndq_buffers(struct nicvf *nic, struct snd_queue *sq, 330 void nicvf_config_vlan_stripping(struct nicvf *nic, 332 int nicvf_set_qset_resources(struct nicvf *nic); 333 int nicvf_config_data_transfer(struct nicvf *nic, bool enable); 334 void nicvf_qset_config(struct nicvf *nic, bool enable); 335 void nicvf_cmp_queue_config(struct nicvf *nic, struct queue_set *qs, 338 void nicvf_sq_enable(struct nicvf *nic, struct snd_queue *sq, int qidx); [all …]
|
/openbmc/linux/drivers/net/ethernet/marvell/octeontx2/nic/ |
H A D | otx2_tc.c | 53 static void otx2_get_egress_burst_cfg(struct otx2_nic *nic, u32 burst, in otx2_get_egress_burst_cfg() argument 59 if (is_dev_otx2(nic->pdev)) { in otx2_get_egress_burst_cfg() 117 u64 otx2_get_txschq_rate_regval(struct otx2_nic *nic, in otx2_get_txschq_rate_regval() argument 125 otx2_get_egress_burst_cfg(nic, burst, &burst_exp, &burst_mantissa); in otx2_get_txschq_rate_regval() 128 if (is_dev_otx2(nic->pdev)) { in otx2_get_txschq_rate_regval() 145 static int otx2_set_matchall_egress_rate(struct otx2_nic *nic, in otx2_set_matchall_egress_rate() argument 148 struct otx2_hw *hw = &nic->hw; in otx2_set_matchall_egress_rate() 155 mutex_lock(&nic->mbox.lock); in otx2_set_matchall_egress_rate() 156 req = otx2_mbox_alloc_msg_nix_txschq_cfg(&nic->mbox); in otx2_set_matchall_egress_rate() 158 mutex_unlock(&nic->mbox.lock); in otx2_set_matchall_egress_rate() [all …]
|
H A D | otx2_ptp.c | 19 if (!ptp->nic) in is_tstmp_atomic_update_supported() 22 mutex_lock(&ptp->nic->mbox.lock); in is_tstmp_atomic_update_supported() 23 req = otx2_mbox_alloc_msg_ptp_get_cap(&ptp->nic->mbox); in is_tstmp_atomic_update_supported() 25 mutex_unlock(&ptp->nic->mbox.lock); in is_tstmp_atomic_update_supported() 29 err = otx2_sync_mbox_msg(&ptp->nic->mbox); in is_tstmp_atomic_update_supported() 31 mutex_unlock(&ptp->nic->mbox.lock); in is_tstmp_atomic_update_supported() 34 rsp = (struct ptp_get_cap_rsp *)otx2_mbox_get_rsp(&ptp->nic->mbox.mbox, 0, in is_tstmp_atomic_update_supported() 36 mutex_unlock(&ptp->nic->mbox.lock); in is_tstmp_atomic_update_supported() 51 struct otx2_nic *pfvf = ptp->nic; in otx2_ptp_hw_adjtime() 55 if (!ptp->nic) in otx2_ptp_hw_adjtime() [all …]
|
/openbmc/linux/drivers/net/ethernet/aquantia/atlantic/ |
H A D | aq_macsec.c | 24 static int aq_clear_txsc(struct aq_nic_s *nic, const int txsc_idx, 26 static int aq_clear_txsa(struct aq_nic_s *nic, struct aq_macsec_txsc *aq_txsc, 28 static int aq_clear_rxsc(struct aq_nic_s *nic, const int rxsc_idx, 30 static int aq_clear_rxsa(struct aq_nic_s *nic, struct aq_macsec_rxsc *aq_rxsc, 32 static int aq_clear_secy(struct aq_nic_s *nic, const struct macsec_secy *secy, 34 static int aq_apply_macsec_cfg(struct aq_nic_s *nic); 35 static int aq_apply_secy_cfg(struct aq_nic_s *nic, 292 struct aq_nic_s *nic = macsec_netdev_priv(ctx->netdev); in aq_mdo_dev_open() local 295 if (netif_carrier_ok(nic->ndev)) in aq_mdo_dev_open() 296 ret = aq_apply_secy_cfg(nic, ctx->secy); in aq_mdo_dev_open() [all …]
|
H A D | aq_macsec.h | 122 int aq_macsec_init(struct aq_nic_s *nic); 123 void aq_macsec_free(struct aq_nic_s *nic); 124 int aq_macsec_enable(struct aq_nic_s *nic); 125 void aq_macsec_work(struct aq_nic_s *nic); 126 u64 *aq_macsec_get_stats(struct aq_nic_s *nic, u64 *data); 127 int aq_macsec_rx_sa_cnt(struct aq_nic_s *nic); 128 int aq_macsec_tx_sc_cnt(struct aq_nic_s *nic); 129 int aq_macsec_tx_sa_cnt(struct aq_nic_s *nic);
|
H A D | aq_pci_func.c | 385 struct aq_nic_s *nic = pci_get_drvdata(to_pci_dev(dev)); in aq_suspend_common() local 389 nic->power_state = AQ_HW_POWER_STATE_D3; in aq_suspend_common() 390 netif_device_detach(nic->ndev); in aq_suspend_common() 391 netif_tx_stop_all_queues(nic->ndev); in aq_suspend_common() 393 if (netif_running(nic->ndev)) in aq_suspend_common() 394 aq_nic_stop(nic); in aq_suspend_common() 396 aq_nic_deinit(nic, !nic->aq_hw->aq_nic_cfg->wol); in aq_suspend_common() 397 aq_nic_set_power(nic); in aq_suspend_common() 407 struct aq_nic_s *nic; in atl_resume_common() local 410 nic = pci_get_drvdata(pdev); in atl_resume_common() [all …]
|
H A D | aq_ethtool.c | 185 struct aq_nic_s *nic = netdev_priv(ndev); in aq_ethtool_n_stats() local 186 struct aq_nic_cfg_s *cfg = aq_nic_get_cfg(nic); in aq_ethtool_n_stats() 191 n_stats += rx_stat_cnt * aq_ptp_get_ring_cnt(nic, ATL_RING_RX) + in aq_ethtool_n_stats() 192 tx_stat_cnt * aq_ptp_get_ring_cnt(nic, ATL_RING_TX); in aq_ethtool_n_stats() 196 if (nic->macsec_cfg) { in aq_ethtool_n_stats() 199 aq_macsec_tx_sc_cnt(nic) + in aq_ethtool_n_stats() 201 aq_macsec_tx_sa_cnt(nic) + in aq_ethtool_n_stats() 203 aq_macsec_rx_sa_cnt(nic); in aq_ethtool_n_stats() 253 struct aq_nic_s *nic = netdev_priv(ndev); in aq_ethtool_get_strings() local 261 cfg = aq_nic_get_cfg(nic); in aq_ethtool_get_strings() [all …]
|
/openbmc/openbmc/meta-facebook/meta-yosemite4/recipes-phosphor/dbus/ |
H A D | power-saving-policy.bb | 15 file://nic-1.yaml \ 16 file://nic-2.yaml \ 17 file://nic-3.yaml \ 18 file://nic-4.yaml \ 22 install -D ${UNPACKDIR}/nic-1.yaml ${D}${config_dir}/nic-1.yaml 23 install -D ${UNPACKDIR}/nic-2.yaml ${D}${config_dir}/nic-2.yaml 24 install -D ${UNPACKDIR}/nic-3.yaml ${D}${config_dir}/nic-3.yaml 25 install -D ${UNPACKDIR}/nic-4.yaml ${D}${config_dir}/nic-4.yaml 29 ${config_dir}/nic-1.yaml \ 30 ${config_dir}/nic-2.yaml \ [all …]
|
/openbmc/linux/drivers/staging/gdm724x/ |
H A D | gdm_lte.c | 71 struct nic *nic = arg; in tx_complete() local 73 if (netif_queue_stopped(nic->netdev)) in tx_complete() 74 netif_wake_queue(nic->netdev); in tx_complete() 77 static int gdm_lte_rx(struct sk_buff *skb, struct nic *nic, int nic_type) in gdm_lte_rx() argument 84 nic->stats.rx_dropped++; in gdm_lte_rx() 86 nic->stats.rx_packets++; in gdm_lte_rx() 87 nic->stats.rx_bytes += len; in gdm_lte_rx() 95 struct nic *nic = netdev_priv(skb_in->dev); in gdm_lte_emulate_arp() local 152 memcpy(mac_header_data + ETH_ALEN, nic->src_mac_addr, ETH_ALEN); in gdm_lte_emulate_arp() 169 gdm_lte_rx(skb_out, nic, nic_type); in gdm_lte_emulate_arp() [all …]
|
/openbmc/openbmc/meta-google/recipes-google/networking/ |
H A D | gbmc-nic-config.bb | 12 file://50-gbmc-nic.rules \ 13 file://50-gbmc-nic.rules.in \ 15 file://-bmc-nic.network.in \ 16 file://gbmc-nic-neigh.sh.in \ 17 file://gbmc-nic-ra.sh \ 18 file://gbmc-nic-ra@.service \ 23 ${@'' if d.getVar('GBMC_DHCP_RELAY') != '1' else 'file://gbmc-nic-dhcrelay.service.in'} \ 53 install -m0755 ${UNPACKDIR}/gbmc-nic-ra.sh ${D}${libexecdir}/ 54 install -m0644 ${UNPACKDIR}/gbmc-nic-ra@.service $unitdir/ 58 sed 's,@IFS@,${GBMC_EXT_NICS},g' <${UNPACKDIR}/gbmc-nic-neigh.sh.in \ [all …]
|
/openbmc/linux/drivers/firmware/ |
H A D | iscsi_ibft.c | 175 struct ibft_nic *nic; member 294 struct ibft_nic *nic = entry->nic; in ibft_attr_show_nic() local 299 if (!nic) in ibft_attr_show_nic() 304 str += sprintf(str, "%d\n", nic->hdr.index); in ibft_attr_show_nic() 307 str += sprintf(str, "%d\n", nic->hdr.flags); in ibft_attr_show_nic() 310 str += sprintf_ipaddr(str, nic->ip_addr); in ibft_attr_show_nic() 313 val = cpu_to_be32(~((1 << (32-nic->subnet_mask_prefix))-1)); in ibft_attr_show_nic() 317 str += sprintf(str, "%d\n", nic->subnet_mask_prefix); in ibft_attr_show_nic() 320 str += sprintf(str, "%d\n", nic->origin); in ibft_attr_show_nic() 323 str += sprintf_ipaddr(str, nic->gateway); in ibft_attr_show_nic() [all …]
|
/openbmc/linux/drivers/net/ethernet/neterion/ |
H A D | s2io.c | 563 static int init_shared_mem(struct s2io_nic *nic) in init_shared_mem() argument 571 struct net_device *dev = nic->dev; in init_shared_mem() 574 struct config_param *config = &nic->config; in init_shared_mem() 575 struct mac_info *mac_control = &nic->mac_control; in init_shared_mem() 635 fifo->nic = nic; in init_shared_mem() 643 tmp_v = dma_alloc_coherent(&nic->pdev->dev, PAGE_SIZE, in init_shared_mem() 661 tmp_v = dma_alloc_coherent(&nic->pdev->dev, in init_shared_mem() 701 if (rx_cfg->num_rxd % (rxd_count[nic->rxd_mode] + 1)) { in init_shared_mem() 709 (rxd_count[nic->rxd_mode] + 1); in init_shared_mem() 712 if (nic->rxd_mode == RXD_MODE_1) in init_shared_mem() [all …]
|
/openbmc/openbmc/meta-facebook/meta-yosemite4/recipes-networking/mctp/files/ |
H A D | setup-static-endpoints | 8 . /usr/libexec/mctp/nic-gpio-addrs 13 systemctl start setup-nic-endpoint-slot@0.service 19 systemctl start setup-nic-endpoint-slot@1.service 25 systemctl start setup-nic-endpoint-slot@2.service 31 systemctl start setup-nic-endpoint-slot@3.service
|
/openbmc/openbmc/meta-facebook/meta-yosemite4/recipes-phosphor/gpio/ |
H A D | phosphor-gpio-monitor_%.bbappend | 6 file://configure-nic-mctp-endpoint \ 7 file://setup-nic-endpoint-slot@.service \ 8 file://remove-nic-endpoint-slot@.service \ 27 file://nic-power-fault \ 28 file://nic-power-fault@.service \ 46 setup-nic-endpoint-slot@.service \ 47 remove-nic-endpoint-slot@.service \ 51 nic-power-fault@.service \ 70 install -m 0644 ${UNPACKDIR}/setup-nic-endpoint-slot@.service ${D}${systemd_system_unitdir}/ 72 install -m 0644 ${UNPACKDIR}/remove-nic-endpoint-slot@.service ${D}${systemd_system_unitdir}/ [all …]
|
/openbmc/qemu/net/ |
H A D | announce.c | 136 static void qemu_announce_self_iter(NICState *nic, void *opaque) in qemu_announce_self_iter() argument 149 if (!strcmp(entry->value, nic->ncs->name)) { in qemu_announce_self_iter() 161 nic->ncs->name, in qemu_announce_self_iter() 162 qemu_ether_ntoa(&nic->conf->macaddr), skip); in qemu_announce_self_iter() 165 len = announce_self_create(buf, nic->conf->macaddr.a); in qemu_announce_self_iter() 167 qemu_send_packet_raw(qemu_get_queue(nic), buf, len); in qemu_announce_self_iter() 170 if (nic->ncs->info->announce) { in qemu_announce_self_iter() 171 nic->ncs->info->announce(nic->ncs); in qemu_announce_self_iter()
|
H A D | net.c | 332 NICState *nic; in qemu_new_nic() local 338 nic = g_malloc0(info->size + sizeof(NetClientState) * queues); in qemu_new_nic() 339 nic->ncs = (void *)nic + info->size; in qemu_new_nic() 340 nic->conf = conf; in qemu_new_nic() 341 nic->reentrancy_guard = reentrancy_guard, in qemu_new_nic() 342 nic->opaque = opaque; in qemu_new_nic() 345 qemu_net_client_setup(&nic->ncs[i], info, peers[i], model, name, in qemu_new_nic() 347 nic->ncs[i].queue_index = i; in qemu_new_nic() 350 return nic; in qemu_new_nic() 353 NetClientState *qemu_get_subqueue(NICState *nic, int queue_index) in qemu_get_subqueue() argument [all …]
|
/openbmc/u-boot/drivers/net/ |
H A D | ne2000_base.c | 97 static dp83902a_priv_data_t nic; /* just one instance of the card supported */ variable 106 dp83902a_priv_data_t *dp = &nic; in dp83902a_init() 146 dp83902a_priv_data_t *dp = &nic; in dp83902a_stop() 167 dp83902a_priv_data_t *dp = &nic; in dp83902a_start() 218 dp83902a_priv_data_t *dp = (dp83902a_priv_data_t *) &nic; in dp83902a_start_xmit() 246 struct dp83902a_priv_data *dp = (struct dp83902a_priv_data *) &nic; in dp83902a_send() 376 struct dp83902a_priv_data *dp = (struct dp83902a_priv_data *) &nic; in dp83902a_RxEvent() 448 struct dp83902a_priv_data *dp = (struct dp83902a_priv_data *) &nic; in dp83902a_recv() 513 struct dp83902a_priv_data *dp = (struct dp83902a_priv_data *) &nic; in dp83902a_TxEvent() 550 struct dp83902a_priv_data *dp = (struct dp83902a_priv_data *) &nic; in dp83902a_ClearCounters() [all …]
|
/openbmc/qemu/hw/net/ |
H A D | mipsnet.c | 43 NICState *nic; member 149 if (mipsnet_can_receive(s->nic->ncs)) { in mipsnet_ioport_read() 150 qemu_flush_queued_packets(qemu_get_queue(s->nic)); in mipsnet_ioport_read() 188 if (mipsnet_can_receive(s->nic->ncs)) { in mipsnet_ioport_write() 189 qemu_flush_queued_packets(qemu_get_queue(s->nic)); in mipsnet_ioport_write() 198 qemu_send_packet(qemu_get_queue(s->nic), in mipsnet_ioport_write() 257 s->nic = qemu_new_nic(&net_mipsnet_info, &s->conf, in mipsnet_realize() 260 qemu_format_nic_info_str(qemu_get_queue(s->nic), s->conf.macaddr.a); in mipsnet_realize()
|
/openbmc/openbmc/meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor/ |
H A D | nic-power-fault@.service | 2 Description=nic-power-fault 6 ExecStart=/usr/libexec/phosphor-gpio-monitor/nic-power-fault 7 SyslogIdentifier=nic-power-fault
|
/openbmc/qemu/hw/net/rocker/ |
H A D | rocker_fp.c | 40 NICState *nic; member 51 return !qemu_get_queue(port->nic)->link_down; in fp_port_get_link_up() 122 NetClientState *nc = qemu_get_queue(port->nic); in fp_port_eg() 203 NetClientState *nc = qemu_get_queue(port->nic); in fp_port_set_link() 244 port->nic = qemu_new_nic(&fp_port_info, &port->conf, sw_name, NULL, in fp_port_alloc() 246 qemu_format_nic_info_str(qemu_get_queue(port->nic), in fp_port_alloc() 256 qemu_del_nic(port->nic); in fp_port_free()
|