Lines Matching +full:asym +full:- +full:pause

1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later
3 * Copyright 2008 - 2016 Freescale Semiconductor Inc.
57 if (!net_dev->phydev) in dpaa_get_link_ksettings()
60 phy_ethtool_ksettings_get(net_dev->phydev, cmd); in dpaa_get_link_ksettings()
70 if (!net_dev->phydev) in dpaa_set_link_ksettings()
71 return -ENODEV; in dpaa_set_link_ksettings()
73 err = phy_ethtool_ksettings_set(net_dev->phydev, cmd); in dpaa_set_link_ksettings()
83 strscpy(drvinfo->driver, KBUILD_MODNAME, in dpaa_get_drvinfo()
84 sizeof(drvinfo->driver)); in dpaa_get_drvinfo()
85 strscpy(drvinfo->bus_info, dev_name(net_dev->dev.parent->parent), in dpaa_get_drvinfo()
86 sizeof(drvinfo->bus_info)); in dpaa_get_drvinfo()
91 return ((struct dpaa_priv *)netdev_priv(net_dev))->msg_enable; in dpaa_get_msglevel()
97 ((struct dpaa_priv *)netdev_priv(net_dev))->msg_enable = msg_enable; in dpaa_set_msglevel()
104 if (!net_dev->phydev) in dpaa_nway_reset()
105 return -ENODEV; in dpaa_nway_reset()
108 if (net_dev->phydev->autoneg) { in dpaa_nway_reset()
109 err = phy_start_aneg(net_dev->phydev); in dpaa_nway_reset()
125 mac_dev = priv->mac_dev; in dpaa_get_pauseparam()
127 if (!net_dev->phydev) in dpaa_get_pauseparam()
130 epause->autoneg = mac_dev->autoneg_pause; in dpaa_get_pauseparam()
131 epause->rx_pause = mac_dev->rx_pause_active; in dpaa_get_pauseparam()
132 epause->tx_pause = mac_dev->tx_pause_active; in dpaa_get_pauseparam()
145 mac_dev = priv->mac_dev; in dpaa_set_pauseparam()
147 phydev = net_dev->phydev; in dpaa_set_pauseparam()
150 return -ENODEV; in dpaa_set_pauseparam()
154 return -EINVAL; in dpaa_set_pauseparam()
156 /* The MAC should know how to handle PAUSE frame autonegotiation before in dpaa_set_pauseparam()
157 * adjust_link is triggered by a forced renegotiation of sym/asym PAUSE in dpaa_set_pauseparam()
160 mac_dev->autoneg_pause = !!epause->autoneg; in dpaa_set_pauseparam()
161 mac_dev->rx_pause_req = !!epause->rx_pause; in dpaa_set_pauseparam()
162 mac_dev->tx_pause_req = !!epause->tx_pause; in dpaa_set_pauseparam()
164 /* Determine the sym/asym advertised PAUSE capabilities from the desired in dpaa_set_pauseparam()
165 * rx/tx pause settings. in dpaa_set_pauseparam()
168 phy_set_asym_pause(phydev, epause->rx_pause, epause->tx_pause); in dpaa_set_pauseparam()
190 return -EOPNOTSUPP; in dpaa_get_sset_count()
201 data[crr * num_values + crr_cpu] = percpu_priv->in_interrupt; in copy_stats()
202 data[crr++ * num_values + num_cpus] += percpu_priv->in_interrupt; in copy_stats()
204 data[crr * num_values + crr_cpu] = percpu_priv->stats.rx_packets; in copy_stats()
205 data[crr++ * num_values + num_cpus] += percpu_priv->stats.rx_packets; in copy_stats()
207 data[crr * num_values + crr_cpu] = percpu_priv->stats.tx_packets; in copy_stats()
208 data[crr++ * num_values + num_cpus] += percpu_priv->stats.tx_packets; in copy_stats()
210 data[crr * num_values + crr_cpu] = percpu_priv->tx_confirm; in copy_stats()
211 data[crr++ * num_values + num_cpus] += percpu_priv->tx_confirm; in copy_stats()
213 data[crr * num_values + crr_cpu] = percpu_priv->tx_frag_skbuffs; in copy_stats()
214 data[crr++ * num_values + num_cpus] += percpu_priv->tx_frag_skbuffs; in copy_stats()
216 data[crr * num_values + crr_cpu] = percpu_priv->stats.tx_errors; in copy_stats()
217 data[crr++ * num_values + num_cpus] += percpu_priv->stats.tx_errors; in copy_stats()
219 data[crr * num_values + crr_cpu] = percpu_priv->stats.rx_errors; in copy_stats()
220 data[crr++ * num_values + num_cpus] += percpu_priv->stats.rx_errors; in copy_stats()
222 data[crr * num_values + crr_cpu] = percpu_priv->stats.rx_dropped; in copy_stats()
223 data[crr++ * num_values + num_cpus] += percpu_priv->stats.rx_dropped; in copy_stats()
225 data[crr * num_values + crr_cpu] = percpu_priv->stats.tx_dropped; in copy_stats()
226 data[crr++ * num_values + num_cpus] += percpu_priv->stats.tx_dropped; in copy_stats()
255 percpu_priv = per_cpu_ptr(priv->percpu_priv, i); in dpaa_get_ethtool_stats()
256 dpaa_bp = priv->dpaa_bp; in dpaa_get_ethtool_stats()
257 if (!dpaa_bp->percpu_count) in dpaa_get_ethtool_stats()
259 bp_count = *(per_cpu_ptr(dpaa_bp->percpu_count, i)); in dpaa_get_ethtool_stats()
260 rx_errors.dme += percpu_priv->rx_errors.dme; in dpaa_get_ethtool_stats()
261 rx_errors.fpe += percpu_priv->rx_errors.fpe; in dpaa_get_ethtool_stats()
262 rx_errors.fse += percpu_priv->rx_errors.fse; in dpaa_get_ethtool_stats()
263 rx_errors.phe += percpu_priv->rx_errors.phe; in dpaa_get_ethtool_stats()
265 ern_cnt.cg_tdrop += percpu_priv->ern_cnt.cg_tdrop; in dpaa_get_ethtool_stats()
266 ern_cnt.wred += percpu_priv->ern_cnt.wred; in dpaa_get_ethtool_stats()
267 ern_cnt.err_cond += percpu_priv->ern_cnt.err_cond; in dpaa_get_ethtool_stats()
268 ern_cnt.early_window += percpu_priv->ern_cnt.early_window; in dpaa_get_ethtool_stats()
269 ern_cnt.late_window += percpu_priv->ern_cnt.late_window; in dpaa_get_ethtool_stats()
270 ern_cnt.fq_tdrop += percpu_priv->ern_cnt.fq_tdrop; in dpaa_get_ethtool_stats()
271 ern_cnt.fq_retired += percpu_priv->ern_cnt.fq_retired; in dpaa_get_ethtool_stats()
272 ern_cnt.orp_zero += percpu_priv->ern_cnt.orp_zero; in dpaa_get_ethtool_stats()
286 cg_time = jiffies_to_msecs(priv->cgr_data.congested_jiffies); in dpaa_get_ethtool_stats()
287 if (qman_query_cgr_congested(&priv->cgr_data.cgr, &cg_status) == 0) { in dpaa_get_ethtool_stats()
288 cg_num = priv->cgr_data.cgr_congested_count; in dpaa_get_ethtool_stats()
291 priv->cgr_data.congested_jiffies = 0; in dpaa_get_ethtool_stats()
292 priv->cgr_data.cgr_congested_count = 0; in dpaa_get_ethtool_stats()
343 cmd->data = 0; in dpaa_get_hash_opts()
345 switch (cmd->flow_type) { in dpaa_get_hash_opts()
350 if (priv->keygen_in_use) in dpaa_get_hash_opts()
351 cmd->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3; in dpaa_get_hash_opts()
363 if (priv->keygen_in_use) in dpaa_get_hash_opts()
364 cmd->data |= RXH_IP_SRC | RXH_IP_DST; in dpaa_get_hash_opts()
367 cmd->data = 0; in dpaa_get_hash_opts()
377 int ret = -EOPNOTSUPP; in dpaa_get_rxnfc()
379 switch (cmd->cmd) { in dpaa_get_rxnfc()
397 mac_dev = priv->mac_dev; in dpaa_set_hash()
398 rxport = mac_dev->port[0]; in dpaa_set_hash()
401 priv->keygen_in_use = enable; in dpaa_set_hash()
407 int ret = -EINVAL; in dpaa_set_hash_opts()
410 if (nfc->data & in dpaa_set_hash_opts()
412 return -EINVAL; in dpaa_set_hash_opts()
414 switch (nfc->flow_type) { in dpaa_set_hash_opts()
429 dpaa_set_hash(dev, !!nfc->data); in dpaa_set_hash_opts()
441 int ret = -EOPNOTSUPP; in dpaa_set_rxnfc()
443 switch (cmd->cmd) { in dpaa_set_rxnfc()
457 struct device *dev = net_dev->dev.parent; in dpaa_get_ts_info()
458 struct device_node *mac_node = dev->of_node; in dpaa_get_ts_info()
463 info->phc_index = -1; in dpaa_get_ts_info()
467 ptp_node = of_parse_phandle(fman_node, "ptimer-handle", 0); in dpaa_get_ts_info()
480 info->phc_index = ptp->phc_index; in dpaa_get_ts_info()
482 info->so_timestamping = SOF_TIMESTAMPING_TX_HARDWARE | in dpaa_get_ts_info()
485 info->tx_types = (1 << HWTSTAMP_TX_OFF) | in dpaa_get_ts_info()
487 info->rx_filters = (1 << HWTSTAMP_FILTER_NONE) | in dpaa_get_ts_info()
506 c->rx_coalesce_usecs = period; in dpaa_get_coalesce()
507 c->rx_max_coalesced_frames = thresh; in dpaa_get_coalesce()
524 period = c->rx_coalesce_usecs; in dpaa_set_coalesce()
525 thresh = c->rx_max_coalesced_frames; in dpaa_set_coalesce()