Lines Matching refs:ixgbe
42 ixgbe_t *ixgbe = (ixgbe_t *)arg; in ixgbe_m_start() local
44 mutex_enter(&ixgbe->gen_lock); in ixgbe_m_start()
46 if (ixgbe->ixgbe_state & IXGBE_SUSPENDED) { in ixgbe_m_start()
47 mutex_exit(&ixgbe->gen_lock); in ixgbe_m_start()
51 if (ixgbe_start(ixgbe, B_TRUE) != IXGBE_SUCCESS) { in ixgbe_m_start()
52 mutex_exit(&ixgbe->gen_lock); in ixgbe_m_start()
56 atomic_or_32(&ixgbe->ixgbe_state, IXGBE_STARTED); in ixgbe_m_start()
58 mutex_exit(&ixgbe->gen_lock); in ixgbe_m_start()
63 ixgbe_enable_watchdog_timer(ixgbe); in ixgbe_m_start()
75 ixgbe_t *ixgbe = (ixgbe_t *)arg; in ixgbe_m_stop() local
77 mutex_enter(&ixgbe->gen_lock); in ixgbe_m_stop()
79 if (ixgbe->ixgbe_state & IXGBE_SUSPENDED) { in ixgbe_m_stop()
80 mutex_exit(&ixgbe->gen_lock); in ixgbe_m_stop()
84 atomic_and_32(&ixgbe->ixgbe_state, ~IXGBE_STARTED); in ixgbe_m_stop()
86 ixgbe_stop(ixgbe, B_TRUE); in ixgbe_m_stop()
88 mutex_exit(&ixgbe->gen_lock); in ixgbe_m_stop()
93 ixgbe_disable_watchdog_timer(ixgbe); in ixgbe_m_stop()
102 ixgbe_t *ixgbe = (ixgbe_t *)arg; in ixgbe_m_promisc() local
104 struct ixgbe_hw *hw = &ixgbe->hw; in ixgbe_m_promisc()
106 mutex_enter(&ixgbe->gen_lock); in ixgbe_m_promisc()
108 if (ixgbe->ixgbe_state & IXGBE_SUSPENDED) { in ixgbe_m_promisc()
109 mutex_exit(&ixgbe->gen_lock); in ixgbe_m_promisc()
119 IXGBE_WRITE_REG(&ixgbe->hw, IXGBE_FCTRL, reg_val); in ixgbe_m_promisc()
121 mutex_exit(&ixgbe->gen_lock); in ixgbe_m_promisc()
133 ixgbe_t *ixgbe = (ixgbe_t *)arg; in ixgbe_m_multicst() local
136 mutex_enter(&ixgbe->gen_lock); in ixgbe_m_multicst()
138 if (ixgbe->ixgbe_state & IXGBE_SUSPENDED) { in ixgbe_m_multicst()
139 mutex_exit(&ixgbe->gen_lock); in ixgbe_m_multicst()
143 result = (add) ? ixgbe_multicst_add(ixgbe, mcst_addr) in ixgbe_m_multicst()
144 : ixgbe_multicst_remove(ixgbe, mcst_addr); in ixgbe_m_multicst()
146 mutex_exit(&ixgbe->gen_lock); in ixgbe_m_multicst()
158 ixgbe_t *ixgbe = (ixgbe_t *)arg; in ixgbe_m_ioctl() local
165 mutex_enter(&ixgbe->gen_lock); in ixgbe_m_ioctl()
166 if (ixgbe->ixgbe_state & IXGBE_SUSPENDED) { in ixgbe_m_ioctl()
167 mutex_exit(&ixgbe->gen_lock); in ixgbe_m_ioctl()
171 mutex_exit(&ixgbe->gen_lock); in ixgbe_m_ioctl()
178 status = ixgbe_loopback_ioctl(ixgbe, iocp, mp); in ixgbe_m_ioctl()
226 ixgbe_t *ixgbe = arg; in ixgbe_led_set() local
227 struct ixgbe_hw *hw = &ixgbe->hw; in ixgbe_led_set()
228 uint32_t lidx = ixgbe->ixgbe_led_index; in ixgbe_led_set()
239 if (ixgbe->ixgbe_led_blink && mode != MAC_LED_IDENT) { in ixgbe_led_set()
243 ixgbe->ixgbe_led_blink = B_FALSE; in ixgbe_led_set()
246 if (mode != MAC_LED_DEFAULT && !ixgbe->ixgbe_led_active) { in ixgbe_led_set()
247 ixgbe->ixgbe_led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL); in ixgbe_led_set()
248 ixgbe->ixgbe_led_active = B_TRUE; in ixgbe_led_set()
253 if (ixgbe->ixgbe_led_active) { in ixgbe_led_set()
254 IXGBE_WRITE_REG(hw, IXGBE_LEDCTL, ixgbe->ixgbe_led_reg); in ixgbe_led_set()
255 ixgbe->ixgbe_led_active = B_FALSE; in ixgbe_led_set()
261 ixgbe->ixgbe_led_blink = B_TRUE; in ixgbe_led_set()
285 ixgbe_t *ixgbe = (ixgbe_t *)arg; in ixgbe_m_getcapab() local
297 if (!ixgbe->tx_hcksum_enable) in ixgbe_m_getcapab()
306 if (ixgbe->lso_enable) { in ixgbe_m_getcapab()
322 cap_rings->mr_rnum = ixgbe->num_rx_rings; in ixgbe_m_getcapab()
323 cap_rings->mr_gnum = ixgbe->num_rx_groups; in ixgbe_m_getcapab()
331 cap_rings->mr_rnum = ixgbe->num_tx_rings; in ixgbe_m_getcapab()
375 ixgbe_t *ixgbe = (ixgbe_t *)arg; in ixgbe_m_setprop() local
376 struct ixgbe_hw *hw = &ixgbe->hw; in ixgbe_m_setprop()
384 mutex_enter(&ixgbe->gen_lock); in ixgbe_m_setprop()
385 if (ixgbe->ixgbe_state & IXGBE_SUSPENDED) { in ixgbe_m_setprop()
386 mutex_exit(&ixgbe->gen_lock); in ixgbe_m_setprop()
398 speeds = ixgbe->speeds_supported; in ixgbe_m_setprop()
400 if (ixgbe->loopback_mode != IXGBE_LB_NONE && in ixgbe_m_setprop()
406 mutex_exit(&ixgbe->gen_lock); in ixgbe_m_setprop()
418 ixgbe->param_en_10000fdx_cap = *(uint8_t *)pr_val; in ixgbe_m_setprop()
427 ixgbe->param_en_5000fdx_cap = *(uint8_t *)pr_val; in ixgbe_m_setprop()
436 ixgbe->param_en_2500fdx_cap = *(uint8_t *)pr_val; in ixgbe_m_setprop()
445 ixgbe->param_en_1000fdx_cap = *(uint8_t *)pr_val; in ixgbe_m_setprop()
454 ixgbe->param_en_100fdx_cap = *(uint8_t *)pr_val; in ixgbe_m_setprop()
461 if (ixgbe->hw.phy.media_type != ixgbe_media_type_copper) { in ixgbe_m_setprop()
465 ixgbe->param_adv_autoneg_cap = *(uint8_t *)pr_val; in ixgbe_m_setprop()
490 if (ixgbe_driver_setup_link(ixgbe, B_TRUE) != in ixgbe_m_setprop()
507 cur_mtu = ixgbe->default_mtu; in ixgbe_m_setprop()
514 if (new_mtu < DEFAULT_MTU || new_mtu > ixgbe->capab->max_mtu) { in ixgbe_m_setprop()
519 if (ixgbe->ixgbe_state & IXGBE_STARTED) { in ixgbe_m_setprop()
524 err = mac_maxsdu_update(ixgbe->mac_hdl, new_mtu); in ixgbe_m_setprop()
526 ixgbe->default_mtu = new_mtu; in ixgbe_m_setprop()
527 ixgbe->max_frame_size = ixgbe->default_mtu + in ixgbe_m_setprop()
533 rx_size = ixgbe->max_frame_size + IPHDR_ALIGN_ROOM; in ixgbe_m_setprop()
534 ixgbe->rx_buf_size = ((rx_size >> 10) + ((rx_size & in ixgbe_m_setprop()
540 tx_size = ixgbe->max_frame_size; in ixgbe_m_setprop()
541 ixgbe->tx_buf_size = ((tx_size >> 10) + ((tx_size & in ixgbe_m_setprop()
546 err = ixgbe_set_priv_prop(ixgbe, pr_name, pr_valsize, pr_val); in ixgbe_m_setprop()
552 mutex_exit(&ixgbe->gen_lock); in ixgbe_m_setprop()
560 ixgbe_t *ixgbe = (ixgbe_t *)arg; in ixgbe_m_getprop() local
561 struct ixgbe_hw *hw = &ixgbe->hw; in ixgbe_m_getprop()
575 speeds = ixgbe->speeds_supported; in ixgbe_m_getprop()
580 bcopy(&ixgbe->link_duplex, pr_val, in ixgbe_m_getprop()
585 tmp = ixgbe->link_speed * 1000000ull; in ixgbe_m_getprop()
589 mutex_enter(&ixgbe->gen_lock); in ixgbe_m_getprop()
590 *(mac_ether_media_t *)pr_val = ixgbe_phy_to_media(ixgbe); in ixgbe_m_getprop()
591 mutex_exit(&ixgbe->gen_lock); in ixgbe_m_getprop()
594 *(uint8_t *)pr_val = ixgbe->param_adv_autoneg_cap; in ixgbe_m_getprop()
617 *(uint8_t *)pr_val = ixgbe->param_adv_10000fdx_cap; in ixgbe_m_getprop()
623 *(uint8_t *)pr_val = ixgbe->param_en_10000fdx_cap; in ixgbe_m_getprop()
629 *(uint8_t *)pr_val = ixgbe->param_adv_5000fdx_cap; in ixgbe_m_getprop()
635 *(uint8_t *)pr_val = ixgbe->param_en_5000fdx_cap; in ixgbe_m_getprop()
641 *(uint8_t *)pr_val = ixgbe->param_adv_2500fdx_cap; in ixgbe_m_getprop()
647 *(uint8_t *)pr_val = ixgbe->param_en_2500fdx_cap; in ixgbe_m_getprop()
653 *(uint8_t *)pr_val = ixgbe->param_adv_1000fdx_cap; in ixgbe_m_getprop()
659 *(uint8_t *)pr_val = ixgbe->param_en_1000fdx_cap; in ixgbe_m_getprop()
665 *(uint8_t *)pr_val = ixgbe->param_adv_100fdx_cap; in ixgbe_m_getprop()
671 *(uint8_t *)pr_val = ixgbe->param_en_100fdx_cap; in ixgbe_m_getprop()
676 err = ixgbe_get_priv_prop(ixgbe, pr_name, in ixgbe_m_getprop()
690 ixgbe_t *ixgbe = (ixgbe_t *)arg; in ixgbe_m_propinfo() local
691 struct ixgbe_hw *hw = &ixgbe->hw; in ixgbe_m_propinfo()
704 speeds = ixgbe->speeds_supported; in ixgbe_m_propinfo()
805 DEFAULT_MTU, ixgbe->capab->max_mtu); in ixgbe_m_propinfo()
833 value = ixgbe->capab->def_intr_throttle; in ixgbe_m_propinfo()
865 ixgbe_set_priv_prop(ixgbe_t *ixgbe, const char *pr_name, in ixgbe_set_priv_prop() argument
870 struct ixgbe_hw *hw = &ixgbe->hw; in ixgbe_set_priv_prop()
883 ixgbe->tx_copy_thresh = (uint32_t)result; in ixgbe_set_priv_prop()
897 ixgbe->tx_recycle_thresh = (uint32_t)result; in ixgbe_set_priv_prop()
911 ixgbe->tx_overload_thresh = (uint32_t)result; in ixgbe_set_priv_prop()
925 ixgbe->tx_resched_thresh = (uint32_t)result; in ixgbe_set_priv_prop()
939 ixgbe->rx_copy_thresh = (uint32_t)result; in ixgbe_set_priv_prop()
953 ixgbe->rx_limit_per_intr = (uint32_t)result; in ixgbe_set_priv_prop()
964 if (result < ixgbe->capab->min_intr_throttle || in ixgbe_set_priv_prop()
965 result > ixgbe->capab->max_intr_throttle) in ixgbe_set_priv_prop()
968 ixgbe->intr_throttling[0] = (uint32_t)result; in ixgbe_set_priv_prop()
979 ixgbe->intr_throttling[0] = in ixgbe_set_priv_prop()
980 ixgbe->intr_throttling[0] & 0xFF8; in ixgbe_set_priv_prop()
984 ixgbe->intr_throttling[i] = in ixgbe_set_priv_prop()
985 ixgbe->intr_throttling[0]; in ixgbe_set_priv_prop()
988 for (i = 0; i < ixgbe->intr_cnt; i++) in ixgbe_set_priv_prop()
990 ixgbe->intr_throttling[i]); in ixgbe_set_priv_prop()
998 ixgbe_get_priv_prop(ixgbe_t *ixgbe, const char *pr_name, in ixgbe_get_priv_prop() argument
1005 value = ixgbe->param_adv_pause_cap; in ixgbe_get_priv_prop()
1010 value = ixgbe->param_adv_asym_pause_cap; in ixgbe_get_priv_prop()
1015 value = ixgbe->tx_copy_thresh; in ixgbe_get_priv_prop()
1020 value = ixgbe->tx_recycle_thresh; in ixgbe_get_priv_prop()
1025 value = ixgbe->tx_overload_thresh; in ixgbe_get_priv_prop()
1030 value = ixgbe->tx_resched_thresh; in ixgbe_get_priv_prop()
1035 value = ixgbe->rx_copy_thresh; in ixgbe_get_priv_prop()
1040 value = ixgbe->rx_limit_per_intr; in ixgbe_get_priv_prop()
1045 value = ixgbe->intr_throttling[0]; in ixgbe_get_priv_prop()