Lines Matching refs:h

48 	struct hnae_handle *h;  in hns_nic_get_link()  local
51 h = priv->ae_handle; in hns_nic_get_link()
60 if (h->dev && h->dev->ops && h->dev->ops->get_status) in hns_nic_get_link()
61 link_stat = link_stat && h->dev->ops->get_status(h); in hns_nic_get_link()
127 struct hnae_handle *h; in hns_nic_get_settings() local
136 h = priv->ae_handle; in hns_nic_get_settings()
137 if (!h->dev || !h->dev->ops || !h->dev->ops->get_info) in hns_nic_get_settings()
140 ret = h->dev->ops->get_info(h, NULL, &speed, &duplex); in hns_nic_get_settings()
163 cmd->supported |= h->if_support; in hns_nic_get_settings()
164 if (h->phy_if == PHY_INTERFACE_MODE_SGMII) { in hns_nic_get_settings()
167 } else if (h->phy_if == PHY_INTERFACE_MODE_XGMII) { in hns_nic_get_settings()
172 if (h->port_type == HNAE_PORT_SERVICE) { in hns_nic_get_settings()
196 struct hnae_handle *h; in hns_nic_set_settings() local
206 h = priv->ae_handle; in hns_nic_set_settings()
209 if (h->phy_if == PHY_INTERFACE_MODE_XGMII) { in hns_nic_set_settings()
213 } else if (h->phy_if == PHY_INTERFACE_MODE_SGMII) { in hns_nic_set_settings()
231 if (h->dev->ops->adjust_link) { in hns_nic_set_settings()
232 h->dev->ops->adjust_link(h, (int)speed, cmd->duplex); in hns_nic_set_settings()
314 struct hnae_handle *h = priv->ae_handle; in __lb_setup() local
322 if ((h->dev->ops->set_loopback) && in __lb_setup()
324 ret = h->dev->ops->set_loopback(h, loop, 0x1); in __lb_setup()
327 if (h->dev->ops->set_loopback) in __lb_setup()
328 ret = h->dev->ops->set_loopback(h, loop, 0x1); in __lb_setup()
334 if (h->dev->ops->set_loopback) { in __lb_setup()
336 ret |= h->dev->ops->set_loopback(h, in __lb_setup()
339 ret |= h->dev->ops->set_loopback(h, in __lb_setup()
355 struct hnae_handle *h = priv->ae_handle; in __lb_up() local
365 ret = hns_nic_init_phy(ndev, h); in __lb_up()
376 ret = h->dev->ops->start ? h->dev->ops->start(h) : 0; in __lb_up()
390 h->dev->ops->adjust_link(h, speed, duplex); in __lb_up()
495 struct hnae_handle *h = priv->ae_handle; in __lb_run_test() local
540 h->q_num, h->q_num * 2 - 1, in __lb_run_test()
563 struct hnae_handle *h = priv->ae_handle; in __lb_down() local
575 if (h->dev->ops->stop) in __lb_down()
576 h->dev->ops->stop(h); in __lb_down()
579 (void)__lb_clean_rings(priv, 0, h->q_num - 1, 256); in __lb_down()
726 struct hnae_handle *h; in hns_set_pauseparam() local
731 h = priv->ae_handle; in hns_set_pauseparam()
732 ops = h->dev->ops; in hns_set_pauseparam()
840 struct hnae_handle *h = priv->ae_handle; in hns_get_ethtool_stats() local
844 if (!h->dev->ops->get_stats || !h->dev->ops->update_stats) { in hns_get_ethtool_stats()
849 h->dev->ops->update_stats(h, &netdev->stats); in hns_get_ethtool_stats()
884 h->dev->ops->get_stats(h, &p[26]); in hns_get_ethtool_stats()
896 struct hnae_handle *h = priv->ae_handle; in hns_get_strings() local
899 if (!h->dev->ops->get_strings) { in hns_get_strings()
972 h->dev->ops->get_strings(h, stringset, (u8 *)buff); in hns_get_strings()
986 struct hnae_handle *h = priv->ae_handle; in hns_get_sset_count() local
987 struct hnae_ae_ops *ops = h->dev->ops; in hns_get_sset_count()
1004 return (HNS_NET_STATS_CNT + ops->get_sset_count(h, stringset)); in hns_get_sset_count()
1048 struct hnae_handle *h = priv->ae_handle; in hns_set_phys_id() local
1105 return h->dev->ops->set_led_id(h, HNAE_LED_ACTIVE); in hns_set_phys_id()
1107 return h->dev->ops->set_led_id(h, HNAE_LED_ON); in hns_set_phys_id()
1109 return h->dev->ops->set_led_id(h, HNAE_LED_OFF); in hns_set_phys_id()
1111 return h->dev->ops->set_led_id(h, HNAE_LED_INACTIVE); in hns_set_phys_id()