Lines Matching refs:enic
96 static void enic_intr_coal_set_rx(struct enic *enic, u32 timer) in enic_intr_coal_set_rx() argument
101 for (i = 0; i < enic->rq_count; i++) { in enic_intr_coal_set_rx()
102 intr = enic_msix_rq_intr(enic, i); in enic_intr_coal_set_rx()
103 vnic_intr_coalescing_timer_set(&enic->intr[intr], timer); in enic_intr_coal_set_rx()
110 struct enic *enic = netdev_priv(netdev); in enic_get_ksettings() local
122 base->speed = vnic_dev_port_speed(enic->vdev); in enic_get_ksettings()
137 struct enic *enic = netdev_priv(netdev); in enic_get_drvinfo() local
141 err = enic_dev_fw_info(enic, &fw_info); in enic_get_drvinfo()
152 strlcpy(drvinfo->bus_info, pci_name(enic->pdev), in enic_get_drvinfo()
182 struct enic *enic = netdev_priv(netdev); in enic_get_ringparam() local
183 struct vnic_enet_config *c = &enic->config; in enic_get_ringparam()
194 struct enic *enic = netdev_priv(netdev); in enic_set_ringparam() local
195 struct vnic_enet_config *c = &enic->config; in enic_set_ringparam()
233 enic_free_vnic_resources(enic); in enic_set_ringparam()
234 err = enic_alloc_vnic_resources(enic); in enic_set_ringparam()
238 enic_free_vnic_resources(enic); in enic_set_ringparam()
241 enic_init_vnic_resources(enic); in enic_set_ringparam()
267 struct enic *enic = netdev_priv(netdev); in enic_get_ethtool_stats() local
272 err = enic_dev_stats_dump(enic, &vstats); in enic_get_ethtool_stats()
285 *(data++) = ((u64 *)&enic->gen_stats)[enic_gen_stats[i].index]; in enic_get_ethtool_stats()
290 struct enic *enic = netdev_priv(netdev); in enic_get_msglevel() local
291 return enic->msg_enable; in enic_get_msglevel()
296 struct enic *enic = netdev_priv(netdev); in enic_set_msglevel() local
297 enic->msg_enable = value; in enic_set_msglevel()
303 struct enic *enic = netdev_priv(netdev); in enic_get_coalesce() local
304 struct enic_rx_coal *rxcoal = &enic->rx_coalesce_setting; in enic_get_coalesce()
306 if (vnic_dev_get_intr_mode(enic->vdev) == VNIC_DEV_INTR_MODE_MSIX) in enic_get_coalesce()
307 ecmd->tx_coalesce_usecs = enic->tx_coalesce_usecs; in enic_get_coalesce()
308 ecmd->rx_coalesce_usecs = enic->rx_coalesce_usecs; in enic_get_coalesce()
317 static int enic_coalesce_valid(struct enic *enic, in enic_coalesce_valid() argument
320 u32 coalesce_usecs_max = vnic_dev_get_intr_coal_timer_max(enic->vdev); in enic_coalesce_valid()
326 if ((vnic_dev_get_intr_mode(enic->vdev) != VNIC_DEV_INTR_MODE_MSIX) && in enic_coalesce_valid()
334 …netdev_info(enic->netdev, "ethtool_set_coalesce: adaptor supports max coalesce value of %d. Settin… in enic_coalesce_valid()
348 struct enic *enic = netdev_priv(netdev); in enic_set_coalesce() local
356 struct enic_rx_coal *rxcoal = &enic->rx_coalesce_setting; in enic_set_coalesce()
358 ret = enic_coalesce_valid(enic, ecmd); in enic_set_coalesce()
361 coalesce_usecs_max = vnic_dev_get_intr_coal_timer_max(enic->vdev); in enic_set_coalesce()
372 if (vnic_dev_get_intr_mode(enic->vdev) == VNIC_DEV_INTR_MODE_MSIX) { in enic_set_coalesce()
373 for (i = 0; i < enic->wq_count; i++) { in enic_set_coalesce()
374 intr = enic_msix_wq_intr(enic, i); in enic_set_coalesce()
375 vnic_intr_coalescing_timer_set(&enic->intr[intr], in enic_set_coalesce()
378 enic->tx_coalesce_usecs = tx_coalesce_usecs; in enic_set_coalesce()
382 enic_intr_coal_set_rx(enic, rx_coalesce_usecs); in enic_set_coalesce()
390 enic->rx_coalesce_usecs = rx_coalesce_usecs; in enic_set_coalesce()
395 static int enic_grxclsrlall(struct enic *enic, struct ethtool_rxnfc *cmd, in enic_grxclsrlall() argument
400 cmd->data = enic->rfs_h.max - enic->rfs_h.free; in enic_grxclsrlall()
406 hhead = &enic->rfs_h.ht_head[j]; in enic_grxclsrlall()
419 static int enic_grxclsrule(struct enic *enic, struct ethtool_rxnfc *cmd) in enic_grxclsrule() argument
425 n = htbl_fltr_search(enic, (u16)fsp->location); in enic_grxclsrule()
456 static int enic_get_rx_flow_hash(struct enic *enic, struct ethtool_rxnfc *cmd) in enic_get_rx_flow_hash() argument
461 spin_lock_bh(&enic->devcmd_lock); in enic_get_rx_flow_hash()
462 (void)vnic_dev_capable_rss_hash_type(enic->vdev, &rss_hash_type); in enic_get_rx_flow_hash()
463 spin_unlock_bh(&enic->devcmd_lock); in enic_get_rx_flow_hash()
502 struct enic *enic = netdev_priv(dev); in enic_get_rxnfc() local
507 cmd->data = enic->rq_count; in enic_get_rxnfc()
510 spin_lock_bh(&enic->rfs_h.lock); in enic_get_rxnfc()
511 cmd->rule_cnt = enic->rfs_h.max - enic->rfs_h.free; in enic_get_rxnfc()
512 cmd->data = enic->rfs_h.max; in enic_get_rxnfc()
513 spin_unlock_bh(&enic->rfs_h.lock); in enic_get_rxnfc()
516 spin_lock_bh(&enic->rfs_h.lock); in enic_get_rxnfc()
517 ret = enic_grxclsrlall(enic, cmd, rule_locs); in enic_get_rxnfc()
518 spin_unlock_bh(&enic->rfs_h.lock); in enic_get_rxnfc()
521 spin_lock_bh(&enic->rfs_h.lock); in enic_get_rxnfc()
522 ret = enic_grxclsrule(enic, cmd); in enic_get_rxnfc()
523 spin_unlock_bh(&enic->rfs_h.lock); in enic_get_rxnfc()
526 ret = enic_get_rx_flow_hash(enic, cmd); in enic_get_rxnfc()
539 struct enic *enic = netdev_priv(dev); in enic_get_tunable() local
544 *(u32 *)data = enic->rx_copybreak; in enic_get_tunable()
558 struct enic *enic = netdev_priv(dev); in enic_set_tunable() local
563 enic->rx_copybreak = *(u32 *)data; in enic_set_tunable()
581 struct enic *enic = netdev_priv(netdev); in enic_get_rxfh() local
584 memcpy(hkey, enic->rss_key, ENIC_RSS_LEN); in enic_get_rxfh()
595 struct enic *enic = netdev_priv(netdev); in enic_set_rxfh() local
602 memcpy(enic->rss_key, hkey, ENIC_RSS_LEN); in enic_set_rxfh()
604 return __enic_set_rsskey(enic); in enic_set_rxfh()