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()
305 struct enic *enic = netdev_priv(netdev); in enic_get_coalesce() local
306 struct enic_rx_coal *rxcoal = &enic->rx_coalesce_setting; in enic_get_coalesce()
308 if (vnic_dev_get_intr_mode(enic->vdev) == VNIC_DEV_INTR_MODE_MSIX) in enic_get_coalesce()
309 ecmd->tx_coalesce_usecs = enic->tx_coalesce_usecs; in enic_get_coalesce()
310 ecmd->rx_coalesce_usecs = enic->rx_coalesce_usecs; in enic_get_coalesce()
319 static int enic_coalesce_valid(struct enic *enic, in enic_coalesce_valid() argument
322 u32 coalesce_usecs_max = vnic_dev_get_intr_coal_timer_max(enic->vdev); in enic_coalesce_valid()
328 if ((vnic_dev_get_intr_mode(enic->vdev) != VNIC_DEV_INTR_MODE_MSIX) && in enic_coalesce_valid()
336 …netdev_info(enic->netdev, "ethtool_set_coalesce: adaptor supports max coalesce value of %d. Settin… in enic_coalesce_valid()
352 struct enic *enic = netdev_priv(netdev); in enic_set_coalesce() local
360 struct enic_rx_coal *rxcoal = &enic->rx_coalesce_setting; in enic_set_coalesce()
362 ret = enic_coalesce_valid(enic, ecmd); in enic_set_coalesce()
365 coalesce_usecs_max = vnic_dev_get_intr_coal_timer_max(enic->vdev); in enic_set_coalesce()
376 if (vnic_dev_get_intr_mode(enic->vdev) == VNIC_DEV_INTR_MODE_MSIX) { in enic_set_coalesce()
377 for (i = 0; i < enic->wq_count; i++) { in enic_set_coalesce()
378 intr = enic_msix_wq_intr(enic, i); in enic_set_coalesce()
379 vnic_intr_coalescing_timer_set(&enic->intr[intr], in enic_set_coalesce()
382 enic->tx_coalesce_usecs = tx_coalesce_usecs; in enic_set_coalesce()
386 enic_intr_coal_set_rx(enic, rx_coalesce_usecs); in enic_set_coalesce()
394 enic->rx_coalesce_usecs = rx_coalesce_usecs; in enic_set_coalesce()
399 static int enic_grxclsrlall(struct enic *enic, struct ethtool_rxnfc *cmd, in enic_grxclsrlall() argument
404 cmd->data = enic->rfs_h.max - enic->rfs_h.free; in enic_grxclsrlall()
410 hhead = &enic->rfs_h.ht_head[j]; in enic_grxclsrlall()
423 static int enic_grxclsrule(struct enic *enic, struct ethtool_rxnfc *cmd) in enic_grxclsrule() argument
429 n = htbl_fltr_search(enic, (u16)fsp->location); in enic_grxclsrule()
460 static int enic_get_rx_flow_hash(struct enic *enic, struct ethtool_rxnfc *cmd) in enic_get_rx_flow_hash() argument
465 spin_lock_bh(&enic->devcmd_lock); in enic_get_rx_flow_hash()
466 (void)vnic_dev_capable_rss_hash_type(enic->vdev, &rss_hash_type); in enic_get_rx_flow_hash()
467 spin_unlock_bh(&enic->devcmd_lock); in enic_get_rx_flow_hash()
506 struct enic *enic = netdev_priv(dev); in enic_get_rxnfc() local
511 cmd->data = enic->rq_count; in enic_get_rxnfc()
514 spin_lock_bh(&enic->rfs_h.lock); in enic_get_rxnfc()
515 cmd->rule_cnt = enic->rfs_h.max - enic->rfs_h.free; in enic_get_rxnfc()
516 cmd->data = enic->rfs_h.max; in enic_get_rxnfc()
517 spin_unlock_bh(&enic->rfs_h.lock); in enic_get_rxnfc()
520 spin_lock_bh(&enic->rfs_h.lock); in enic_get_rxnfc()
521 ret = enic_grxclsrlall(enic, cmd, rule_locs); in enic_get_rxnfc()
522 spin_unlock_bh(&enic->rfs_h.lock); in enic_get_rxnfc()
525 spin_lock_bh(&enic->rfs_h.lock); in enic_get_rxnfc()
526 ret = enic_grxclsrule(enic, cmd); in enic_get_rxnfc()
527 spin_unlock_bh(&enic->rfs_h.lock); in enic_get_rxnfc()
530 ret = enic_get_rx_flow_hash(enic, cmd); in enic_get_rxnfc()
543 struct enic *enic = netdev_priv(dev); in enic_get_tunable() local
548 *(u32 *)data = enic->rx_copybreak; in enic_get_tunable()
562 struct enic *enic = netdev_priv(dev); in enic_set_tunable() local
567 enic->rx_copybreak = *(u32 *)data; in enic_set_tunable()
585 struct enic *enic = netdev_priv(netdev); in enic_get_rxfh() local
588 memcpy(hkey, enic->rss_key, ENIC_RSS_LEN); in enic_get_rxfh()
599 struct enic *enic = netdev_priv(netdev); in enic_set_rxfh() local
606 memcpy(enic->rss_key, hkey, ENIC_RSS_LEN); in enic_set_rxfh()
608 return __enic_set_rsskey(enic); in enic_set_rxfh()