Lines Matching refs:pdata
84 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_strings() local
92 for (i = 0; i < pdata->tx_ring_count; i++) { in xgbe_get_strings()
97 for (i = 0; i < pdata->rx_ring_count; i++) { in xgbe_get_strings()
109 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_ethtool_stats() local
113 pdata->hw_if.read_mmc_stats(pdata); in xgbe_get_ethtool_stats()
115 stat = (u8 *)pdata + xgbe_gstring_stats[i].stat_offset; in xgbe_get_ethtool_stats()
118 for (i = 0; i < pdata->tx_ring_count; i++) { in xgbe_get_ethtool_stats()
119 *data++ = pdata->ext_stats.txq_packets[i]; in xgbe_get_ethtool_stats()
120 *data++ = pdata->ext_stats.txq_bytes[i]; in xgbe_get_ethtool_stats()
122 for (i = 0; i < pdata->rx_ring_count; i++) { in xgbe_get_ethtool_stats()
123 *data++ = pdata->ext_stats.rxq_packets[i]; in xgbe_get_ethtool_stats()
124 *data++ = pdata->ext_stats.rxq_bytes[i]; in xgbe_get_ethtool_stats()
130 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_sset_count() local
136 (pdata->tx_ring_count * 2) + in xgbe_get_sset_count()
137 (pdata->rx_ring_count * 2); in xgbe_get_sset_count()
150 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_pauseparam() local
152 pause->autoneg = pdata->phy.pause_autoneg; in xgbe_get_pauseparam()
153 pause->tx_pause = pdata->phy.tx_pause; in xgbe_get_pauseparam()
154 pause->rx_pause = pdata->phy.rx_pause; in xgbe_get_pauseparam()
160 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_set_pauseparam() local
161 struct ethtool_link_ksettings *lks = &pdata->phy.lks; in xgbe_set_pauseparam()
164 if (pause->autoneg && (pdata->phy.autoneg != AUTONEG_ENABLE)) { in xgbe_set_pauseparam()
170 pdata->phy.pause_autoneg = pause->autoneg; in xgbe_set_pauseparam()
171 pdata->phy.tx_pause = pause->tx_pause; in xgbe_set_pauseparam()
172 pdata->phy.rx_pause = pause->rx_pause; in xgbe_set_pauseparam()
191 ret = pdata->phy_if.phy_config_aneg(pdata); in xgbe_set_pauseparam()
199 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_link_ksettings() local
200 struct ethtool_link_ksettings *lks = &pdata->phy.lks; in xgbe_get_link_ksettings()
202 cmd->base.phy_address = pdata->phy.address; in xgbe_get_link_ksettings()
205 cmd->base.speed = pdata->phy.speed; in xgbe_get_link_ksettings()
206 cmd->base.duplex = pdata->phy.duplex; in xgbe_get_link_ksettings()
212 cmd->base.autoneg = pdata->phy.autoneg; in xgbe_get_link_ksettings()
225 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_set_link_ksettings() local
226 struct ethtool_link_ksettings *lks = &pdata->phy.lks; in xgbe_set_link_ksettings()
233 if (cmd->base.phy_address != pdata->phy.address) { in xgbe_set_link_ksettings()
247 if (!pdata->phy_if.phy_valid_speed(pdata, speed)) { in xgbe_set_link_ksettings()
259 netif_dbg(pdata, link, netdev, in xgbe_set_link_ksettings()
275 pdata->phy.autoneg = cmd->base.autoneg; in xgbe_set_link_ksettings()
276 pdata->phy.speed = speed; in xgbe_set_link_ksettings()
277 pdata->phy.duplex = cmd->base.duplex; in xgbe_set_link_ksettings()
286 ret = pdata->phy_if.phy_config_aneg(pdata); in xgbe_set_link_ksettings()
294 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_drvinfo() local
295 struct xgbe_hw_features *hw_feat = &pdata->hw_feat; in xgbe_get_drvinfo()
298 strscpy(drvinfo->bus_info, dev_name(pdata->dev), in xgbe_get_drvinfo()
308 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_msglevel() local
310 return pdata->msg_enable; in xgbe_get_msglevel()
315 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_set_msglevel() local
317 pdata->msg_enable = msglevel; in xgbe_set_msglevel()
325 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_coalesce() local
329 ec->rx_coalesce_usecs = pdata->rx_usecs; in xgbe_get_coalesce()
330 ec->rx_max_coalesced_frames = pdata->rx_frames; in xgbe_get_coalesce()
332 ec->tx_max_coalesced_frames = pdata->tx_frames; in xgbe_get_coalesce()
342 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_set_coalesce() local
343 struct xgbe_hw_if *hw_if = &pdata->hw_if; in xgbe_set_coalesce()
347 rx_riwt = hw_if->usec_to_riwt(pdata, ec->rx_coalesce_usecs); in xgbe_set_coalesce()
358 hw_if->riwt_to_usec(pdata, XGMAC_MAX_DMA_RIWT)); in xgbe_set_coalesce()
361 if (rx_frames > pdata->rx_desc_count) { in xgbe_set_coalesce()
363 pdata->rx_desc_count); in xgbe_set_coalesce()
370 if (tx_frames > pdata->tx_desc_count) { in xgbe_set_coalesce()
372 pdata->tx_desc_count); in xgbe_set_coalesce()
376 pdata->rx_riwt = rx_riwt; in xgbe_set_coalesce()
377 pdata->rx_usecs = rx_usecs; in xgbe_set_coalesce()
378 pdata->rx_frames = rx_frames; in xgbe_set_coalesce()
379 hw_if->config_rx_coalesce(pdata); in xgbe_set_coalesce()
381 pdata->tx_frames = tx_frames; in xgbe_set_coalesce()
382 hw_if->config_tx_coalesce(pdata); in xgbe_set_coalesce()
390 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_rxnfc() local
394 rxnfc->data = pdata->rx_ring_count; in xgbe_get_rxnfc()
405 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_rxfh_key_size() local
407 return sizeof(pdata->rss_key); in xgbe_get_rxfh_key_size()
412 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_rxfh_indir_size() local
414 return ARRAY_SIZE(pdata->rss_table); in xgbe_get_rxfh_indir_size()
420 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_rxfh() local
424 for (i = 0; i < ARRAY_SIZE(pdata->rss_table); i++) in xgbe_get_rxfh()
425 rxfh->indir[i] = XGMAC_GET_BITS(pdata->rss_table[i], in xgbe_get_rxfh()
430 memcpy(rxfh->key, pdata->rss_key, sizeof(pdata->rss_key)); in xgbe_get_rxfh()
441 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_set_rxfh() local
442 struct xgbe_hw_if *hw_if = &pdata->hw_if; in xgbe_set_rxfh()
452 ret = hw_if->set_rss_lookup_table(pdata, rxfh->indir); in xgbe_set_rxfh()
458 ret = hw_if->set_rss_hash_key(pdata, rxfh->key); in xgbe_set_rxfh()
469 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_ts_info() local
476 if (pdata->ptp_clock) in xgbe_get_ts_info()
477 ts_info->phc_index = ptp_clock_index(pdata->ptp_clock); in xgbe_get_ts_info()
498 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_module_info() local
500 return pdata->phy_if.module_info(pdata, modinfo); in xgbe_get_module_info()
506 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_module_eeprom() local
508 return pdata->phy_if.module_eeprom(pdata, eeprom, data); in xgbe_get_module_eeprom()
517 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_ringparam() local
521 ringparam->rx_pending = pdata->rx_desc_count; in xgbe_get_ringparam()
522 ringparam->tx_pending = pdata->tx_desc_count; in xgbe_get_ringparam()
530 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_set_ringparam() local
566 if ((rx == pdata->rx_desc_count) && in xgbe_set_ringparam()
567 (tx == pdata->tx_desc_count)) in xgbe_set_ringparam()
570 pdata->rx_desc_count = rx; in xgbe_set_ringparam()
571 pdata->tx_desc_count = tx; in xgbe_set_ringparam()
573 xgbe_restart_dev(pdata); in xgbe_set_ringparam()
582 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_get_channels() local
591 rx = min(pdata->hw_feat.rx_ch_cnt, pdata->rx_max_channel_count); in xgbe_get_channels()
592 rx = min(rx, pdata->channel_irq_count); in xgbe_get_channels()
593 tx = min(pdata->hw_feat.tx_ch_cnt, pdata->tx_max_channel_count); in xgbe_get_channels()
594 tx = min(tx, pdata->channel_irq_count); in xgbe_get_channels()
595 tx = min(tx, pdata->tx_max_q_count); in xgbe_get_channels()
604 rx = pdata->new_rx_ring_count ? : pdata->rx_ring_count; in xgbe_get_channels()
605 tx = pdata->new_tx_ring_count ? : pdata->tx_ring_count; in xgbe_get_channels()
627 struct xgbe_prv_data *pdata = netdev_priv(netdev); in xgbe_set_channels() local
636 rx = min(pdata->hw_feat.rx_ch_cnt, pdata->rx_max_channel_count); in xgbe_set_channels()
637 rx = min(rx, pdata->channel_irq_count); in xgbe_set_channels()
638 tx = min(pdata->hw_feat.tx_ch_cnt, pdata->tx_max_channel_count); in xgbe_set_channels()
639 tx = min(tx, pdata->tx_max_q_count); in xgbe_set_channels()
640 tx = min(tx, pdata->channel_irq_count); in xgbe_set_channels()
696 rx_curr = pdata->new_rx_ring_count ? : pdata->rx_ring_count; in xgbe_set_channels()
697 tx_curr = pdata->new_tx_ring_count ? : pdata->tx_ring_count; in xgbe_set_channels()
702 pdata->new_rx_ring_count = rx; in xgbe_set_channels()
703 pdata->new_tx_ring_count = tx; in xgbe_set_channels()
705 xgbe_full_restart_dev(pdata); in xgbe_set_channels()