Lines Matching refs:port

275 yge_mii_readreg(yge_port_t *port, uint8_t phy, uint8_t reg)  in yge_mii_readreg()  argument
277 yge_dev_t *dev = port->p_dev; in yge_mii_readreg()
278 int pnum = port->p_port; in yge_mii_readreg()
304 yge_mii_writereg(yge_port_t *port, uint8_t phy, uint8_t reg, uint16_t val) in yge_mii_writereg() argument
306 yge_dev_t *dev = port->p_dev; in yge_mii_writereg()
307 int pnum = port->p_port; in yge_mii_writereg()
319 yge_error(NULL, port, "phy write timeout"); in yge_mii_writereg()
325 yge_port_t *port = arg; in yge_mii_read() local
328 PHY_LOCK(port->p_dev); in yge_mii_read()
329 rv = yge_mii_readreg(port, phy, reg); in yge_mii_read()
330 PHY_UNLOCK(port->p_dev); in yge_mii_read()
337 yge_port_t *port = arg; in yge_mii_write() local
339 PHY_LOCK(port->p_dev); in yge_mii_write()
340 yge_mii_writereg(port, phy, reg, val); in yge_mii_write()
341 PHY_UNLOCK(port->p_dev); in yge_mii_write()
351 yge_port_t *port = arg; in yge_mii_notify() local
352 yge_dev_t *dev = port->p_dev; in yge_mii_notify()
359 fc = mii_get_flowctrl(port->p_mii); in yge_mii_notify()
360 duplex = mii_get_duplex(port->p_mii); in yge_mii_notify()
361 speed = mii_get_speed(port->p_mii); in yge_mii_notify()
368 CSR_WRITE_1(dev, MR_ADDR(port->p_port, GMAC_IRQ_MSK), in yge_mii_notify()
418 GMAC_WRITE_2(dev, port->p_port, GM_GP_CTRL, gpcr); in yge_mii_notify()
421 (void) GMAC_READ_2(dev, port->p_port, GM_GP_CTRL); in yge_mii_notify()
424 CSR_WRITE_4(dev, MR_ADDR(port->p_port, GMAC_CTRL), gmac); in yge_mii_notify()
428 gpcr = GMAC_READ_2(dev, port->p_port, GM_GP_CTRL); in yge_mii_notify()
430 GMAC_WRITE_2(dev, port->p_port, GM_GP_CTRL, gpcr); in yge_mii_notify()
433 (void) GMAC_READ_2(dev, port->p_port, GM_GP_CTRL); in yge_mii_notify()
438 mac_link_update(port->p_mh, link); in yge_mii_notify()
440 if (port->p_running && (link == LINK_STATE_UP)) { in yge_mii_notify()
441 mac_tx_update(port->p_mh); in yge_mii_notify()
446 yge_setrxfilt(yge_port_t *port) in yge_setrxfilt() argument
454 dev = port->p_dev; in yge_setrxfilt()
455 pnum = port->p_port; in yge_setrxfilt()
456 ea = port->p_curraddr; in yge_setrxfilt()
457 mchash = port->p_mchash; in yge_setrxfilt()
474 if (port->p_promisc) { in yge_setrxfilt()
489 yge_init_rx_ring(yge_port_t *port) in yge_init_rx_ring() argument
495 port->p_rx_cons = 0; in yge_init_rx_ring()
496 port->p_rx_putwm = YGE_PUT_WM; in yge_init_rx_ring()
497 ring = &port->p_rx_ring; in yge_init_rx_ring()
504 rxb = &port->p_rx_buf[prod]; in yge_init_rx_ring()
507 PUTCTRL(ring, prod, port->p_framesize | OP_PACKET | HW_OWNER); in yge_init_rx_ring()
512 yge_set_prefetch(port->p_dev, port->p_rxq, ring); in yge_init_rx_ring()
515 CSR_WRITE_2(port->p_dev, in yge_init_rx_ring()
516 Y2_PREF_Q_ADDR(port->p_rxq, PREF_UNIT_PUT_IDX_REG), in yge_init_rx_ring()
521 yge_init_tx_ring(yge_port_t *port) in yge_init_tx_ring() argument
523 yge_ring_t *ring = &port->p_tx_ring; in yge_init_tx_ring()
525 port->p_tx_prod = 0; in yge_init_tx_ring()
526 port->p_tx_cons = 0; in yge_init_tx_ring()
527 port->p_tx_cnt = 0; in yge_init_tx_ring()
532 yge_set_prefetch(port->p_dev, port->p_txq, ring); in yge_init_tx_ring()
909 yge_init_port(yge_port_t *port) in yge_init_port() argument
911 yge_dev_t *dev = port->p_dev; in yge_init_port()
915 port->p_flags = dev->d_pflags; in yge_init_port()
916 port->p_ppa = ddi_get_instance(dev->d_dip) + (port->p_port * 100); in yge_init_port()
918 port->p_tx_buf = kmem_zalloc(sizeof (yge_buf_t) * YGE_TX_RING_CNT, in yge_init_port()
920 port->p_rx_buf = kmem_zalloc(sizeof (yge_buf_t) * YGE_RX_RING_CNT, in yge_init_port()
924 if (port->p_port == YGE_PORT_A) { in yge_init_port()
925 port->p_txq = Q_XA1; in yge_init_port()
926 port->p_txsq = Q_XS1; in yge_init_port()
927 port->p_rxq = Q_R1; in yge_init_port()
929 port->p_txq = Q_XA2; in yge_init_port()
930 port->p_txsq = Q_XS2; in yge_init_port()
931 port->p_rxq = Q_R2; in yge_init_port()
936 port->p_flags |= PORT_FLAG_NOJUMBO; in yge_init_port()
945 port->p_mtu = ETHERMTU; in yge_init_port()
947 port->p_mii = mii_alloc(port, dev->d_dip, &yge_mii_ops); in yge_init_port()
948 if (port->p_mii == NULL) { in yge_init_port()
949 yge_error(NULL, port, "MII handle allocation failed"); in yge_init_port()
953 mii_set_pauseable(port->p_mii, B_TRUE, B_TRUE); in yge_init_port()
965 port->p_curraddr[i] = in yge_init_port()
966 CSR_READ_1(dev, B2_MAC_1 + (port->p_port * 8) + i); in yge_init_port()
971 yge_error(NULL, port, "MAC handle allocation failed"); in yge_init_port()
975 macp->m_driver = port; in yge_init_port()
977 macp->m_src_addr = port->p_curraddr; in yge_init_port()
980 macp->m_max_sdu = port->p_mtu; in yge_init_port()
981 macp->m_instance = port->p_ppa; in yge_init_port()
984 port->p_mreg = macp; in yge_init_port()
1333 yge_port_t *port = dev->d_port[i]; in yge_attach() local
1334 if (yge_init_port(port) != DDI_SUCCESS) { in yge_attach()
1345 yge_port_t *port = dev->d_port[i]; in yge_attach() local
1346 if (yge_register_port(port) == DDI_SUCCESS) { in yge_attach()
1372 yge_register_port(yge_port_t *port) in yge_register_port() argument
1374 if (mac_register(port->p_mreg, &port->p_mh) != DDI_SUCCESS) { in yge_register_port()
1375 yge_error(NULL, port, "MAC registration failed"); in yge_register_port()
1387 yge_uninit_port(yge_port_t *port) in yge_uninit_port() argument
1389 ASSERT(!port->p_running); in yge_uninit_port()
1391 if (port->p_mreg) in yge_uninit_port()
1392 mac_free(port->p_mreg); in yge_uninit_port()
1394 if (port->p_mii) in yge_uninit_port()
1395 mii_free(port->p_mii); in yge_uninit_port()
1397 yge_txrx_dma_free(port); in yge_uninit_port()
1399 if (port->p_tx_buf) in yge_uninit_port()
1400 kmem_free(port->p_tx_buf, in yge_uninit_port()
1402 if (port->p_rx_buf) in yge_uninit_port()
1403 kmem_free(port->p_rx_buf, in yge_uninit_port()
1465 yge_alloc_ring(yge_port_t *port, yge_dev_t *dev, yge_ring_t *ring, uint32_t num) in yge_alloc_ring() argument
1474 if (port && !dev) in yge_alloc_ring()
1475 dev = port->p_dev; in yge_alloc_ring()
1483 yge_error(dev, port, "Unable to allocate ring DMA handle"); in yge_alloc_ring()
1491 yge_error(dev, port, "Unable to allocate ring DMA memory"); in yge_alloc_ring()
1503 yge_error(dev, port, "Unable to bind ring DMA handle"); in yge_alloc_ring()
1528 yge_alloc_buf(yge_port_t *port, yge_buf_t *b, size_t bufsz, int flag) in yge_alloc_buf() argument
1530 yge_dev_t *dev = port->p_dev; in yge_alloc_buf()
1543 yge_error(NULL, port, "Unable to alloc DMA handle for buffer"); in yge_alloc_buf()
1550 yge_error(NULL, port, "Unable to alloc DMA memory for buffer"); in yge_alloc_buf()
1557 yge_error(NULL, port, "Unable to bind DMA handle for buffer"); in yge_alloc_buf()
1581 yge_txrx_dma_alloc(yge_port_t *port) in yge_txrx_dma_alloc() argument
1600 bufsz = port->p_mtu; in yge_txrx_dma_alloc()
1603 rv = yge_alloc_ring(port, NULL, &port->p_tx_ring, YGE_TX_RING_CNT); in yge_txrx_dma_alloc()
1609 b = port->p_tx_buf; in yge_txrx_dma_alloc()
1611 rv = yge_alloc_buf(port, b, bufsz, in yge_txrx_dma_alloc()
1620 rv = yge_alloc_ring(port, NULL, &port->p_rx_ring, YGE_RX_RING_CNT); in yge_txrx_dma_alloc()
1626 b = port->p_rx_buf; in yge_txrx_dma_alloc()
1628 rv = yge_alloc_buf(port, b, bufsz, in yge_txrx_dma_alloc()
1640 yge_txrx_dma_free(yge_port_t *port) in yge_txrx_dma_free() argument
1645 yge_free_ring(&port->p_tx_ring); in yge_txrx_dma_free()
1648 yge_free_ring(&port->p_rx_ring); in yge_txrx_dma_free()
1651 b = port->p_tx_buf; in yge_txrx_dma_free()
1656 b = port->p_rx_buf; in yge_txrx_dma_free()
1663 yge_send(yge_port_t *port, mblk_t *mp) in yge_send() argument
1665 yge_ring_t *ring = &port->p_tx_ring; in yge_send()
1675 if (len > port->p_framesize) { in yge_send()
1682 if (port->p_tx_cnt + 1 >= in yge_send()
1684 port->p_wantw = B_TRUE; in yge_send()
1688 prod = port->p_tx_prod; in yge_send()
1690 txb = &port->p_tx_buf[prod]; in yge_send()
1697 port->p_tx_cnt++; in yge_send()
1702 port->p_tx_prod = prod; in yge_send()
1711 yge_port_t *port = dev->d_port[i]; in yge_suspend() local
1712 mii_suspend(port->p_mii); in yge_suspend()
1719 yge_port_t *port = dev->d_port[i]; in yge_suspend() local
1721 if (port->p_running) { in yge_suspend()
1722 yge_stop_port(port); in yge_suspend()
1787 yge_port_t *port = dev->d_port[i]; in yge_resume() local
1789 if (port != NULL && port->p_running) { in yge_resume()
1790 yge_start_port(port); in yge_resume()
1799 yge_port_t *port = dev->d_port[i]; in yge_resume() local
1801 if (port->p_running) { in yge_resume()
1802 mii_resume(port->p_mii); in yge_resume()
1803 mac_tx_update(port->p_mh); in yge_resume()
1811 yge_rxeof(yge_port_t *port, uint32_t status, int len) in yge_rxeof() argument
1813 yge_dev_t *dev = port->p_dev; in yge_rxeof()
1821 if (!port->p_running) in yge_rxeof()
1824 ring = &port->p_rx_ring; in yge_rxeof()
1825 cons = port->p_rx_cons; in yge_rxeof()
1827 rxb = &port->p_rx_buf[cons]; in yge_rxeof()
1838 if ((len > port->p_framesize) || (rxlen != len)) { in yge_rxeof()
1842 if ((len > port->p_framesize) || (rxlen != len) || in yge_rxeof()
1857 port->p_stats.rx_nobuf++; in yge_rxeof()
1862 PUTCTRL(ring, cons, port->p_framesize | OP_PACKET | HW_OWNER); in yge_rxeof()
1866 Y2_PREF_Q_ADDR(port->p_rxq, PREF_UNIT_PUT_IDX_REG), in yge_rxeof()
1869 YGE_INC(port->p_rx_cons, YGE_RX_RING_CNT); in yge_rxeof()
1875 yge_txeof_locked(yge_port_t *port, int idx) in yge_txeof_locked() argument
1881 if (!port->p_running) { in yge_txeof_locked()
1885 cons = port->p_tx_cons; in yge_txeof_locked()
1888 if (port->p_tx_cnt <= 0) in yge_txeof_locked()
1891 port->p_tx_cnt--; in yge_txeof_locked()
1895 port->p_tx_cons = cons; in yge_txeof_locked()
1898 resched = port->p_wantw; in yge_txeof_locked()
1899 port->p_tx_wdog = 0; in yge_txeof_locked()
1900 port->p_wantw = B_FALSE; in yge_txeof_locked()
1908 yge_txeof(yge_port_t *port, int idx) in yge_txeof() argument
1912 TX_LOCK(port->p_dev); in yge_txeof()
1914 resched = yge_txeof_locked(port, idx); in yge_txeof()
1916 TX_UNLOCK(port->p_dev); in yge_txeof()
1918 if (resched && port->p_running) { in yge_txeof()
1919 mac_tx_update(port->p_mh); in yge_txeof()
1926 yge_port_t *port; in yge_restart_task() local
1932 port = dev->d_port[i]; in yge_restart_task()
1933 if (port->p_running) in yge_restart_task()
1938 port = dev->d_port[i]; in yge_restart_task()
1940 if (port->p_running) in yge_restart_task()
1941 yge_start_port(port); in yge_restart_task()
1947 port = dev->d_port[i]; in yge_restart_task()
1949 mii_reset(port->p_mii); in yge_restart_task()
1950 if (port->p_running) in yge_restart_task()
1951 mac_tx_update(port->p_mh); in yge_restart_task()
1959 yge_port_t *port; in yge_tick() local
1972 port = dev->d_port[i]; in yge_tick()
1974 if (!port->p_running) in yge_tick()
1977 if (port->p_tx_cnt) { in yge_tick()
1984 ridx = port->p_port == YGE_PORT_A ? in yge_tick()
1987 if (port->p_tx_cons != idx) { in yge_tick()
1988 resched = yge_txeof_locked(port, idx); in yge_tick()
1993 port->p_tx_wdog++; in yge_tick()
1994 if (port->p_tx_wdog > YGE_TX_TIMEOUT) { in yge_tick()
1995 port->p_tx_wdog = 0; in yge_tick()
1996 yge_error(NULL, port, in yge_tick()
2010 port = dev->d_port[i]; in yge_tick()
2012 if (port->p_running) in yge_tick()
2013 mac_tx_update(port->p_mh); in yge_tick()
2020 yge_intr_gmac(yge_port_t *port) in yge_intr_gmac() argument
2022 yge_dev_t *dev = port->p_dev; in yge_intr_gmac()
2023 int pnum = port->p_port; in yge_intr_gmac()
2032 yge_error(NULL, port, "Rx FIFO overrun!"); in yge_intr_gmac()
2038 yge_error(NULL, port, "Tx FIFO underrun!"); in yge_intr_gmac()
2053 yge_handle_hwerr(yge_port_t *port, uint32_t status) in yge_handle_hwerr() argument
2055 yge_dev_t *dev = port->p_dev; in yge_handle_hwerr()
2058 yge_error(NULL, port, "RAM buffer read parity error"); in yge_handle_hwerr()
2060 CSR_WRITE_2(dev, SELECT_RAM_BUFFER(port->p_port, B3_RI_CTRL), in yge_handle_hwerr()
2064 yge_error(NULL, port, "RAM buffer write parity error"); in yge_handle_hwerr()
2066 CSR_WRITE_2(dev, SELECT_RAM_BUFFER(port->p_port, B3_RI_CTRL), in yge_handle_hwerr()
2070 yge_error(NULL, port, "Tx MAC parity error"); in yge_handle_hwerr()
2072 CSR_WRITE_4(dev, MR_ADDR(port->p_port, TX_GMF_CTRL_T), in yge_handle_hwerr()
2076 yge_error(NULL, port, "Rx parity error"); in yge_handle_hwerr()
2078 CSR_WRITE_4(dev, Q_ADDR(port->p_rxq, Q_CSR), BMU_CLR_IRQ_PAR); in yge_handle_hwerr()
2081 yge_error(NULL, port, "TCP segmentation error"); in yge_handle_hwerr()
2083 CSR_WRITE_4(dev, Q_ADDR(port->p_txq, Q_CSR), BMU_CLR_IRQ_TCP); in yge_handle_hwerr()
2175 yge_port_t *port; in yge_handle_events() local
2206 port = dev->d_port[pnum]; in yge_handle_events()
2207 if (port == NULL) { in yge_handle_events()
2215 mp = yge_rxeof(port, status, len); in yge_handle_events()
2376 yge_set_tx_stfwd(yge_port_t *port) in yge_set_tx_stfwd() argument
2378 yge_dev_t *dev = port->p_dev; in yge_set_tx_stfwd()
2379 int pnum = port->p_port; in yge_set_tx_stfwd()
2386 if (port->p_mtu > ETHERMTU) in yge_set_tx_stfwd()
2395 if (port->p_mtu > ETHERMTU) { in yge_set_tx_stfwd()
2412 yge_start_port(yge_port_t *port) in yge_start_port() argument
2414 yge_dev_t *dev = port->p_dev; in yge_start_port()
2421 pnum = port->p_port; in yge_start_port()
2422 txq = port->p_txq; in yge_start_port()
2423 rxq = port->p_rxq; in yge_start_port()
2425 if (port->p_mtu < ETHERMTU) in yge_start_port()
2426 port->p_framesize = ETHERMTU; in yge_start_port()
2428 port->p_framesize = port->p_mtu; in yge_start_port()
2429 port->p_framesize += sizeof (struct ether_vlan_header); in yge_start_port()
2455 yge_stats_clear(port); in yge_start_port()
2474 if (port->p_mtu > ETHERMTU) in yge_start_port()
2493 yge_setrxfilt(port); in yge_start_port()
2519 if ((port->p_flags & PORT_FLAG_RAMBUF) == 0) { in yge_start_port()
2534 yge_set_tx_stfwd(port); in yge_start_port()
2555 yge_set_rambuffer(port); in yge_start_port()
2558 CSR_WRITE_1(dev, RB_ADDR(port->p_txsq, RB_CTRL), RB_RST_SET); in yge_start_port()
2598 yge_init_tx_ring(port); in yge_start_port()
2604 yge_init_rx_ring(port); in yge_start_port()
2607 if (port == dev->d_port[YGE_PORT_A]) { in yge_start_port()
2610 } else if (port == dev->d_port[YGE_PORT_B]) { in yge_start_port()
2622 GMAC_WRITE_2(port->p_dev, port->p_port, GM_GP_CTRL, gmac); in yge_start_port()
2627 port->p_tx_wdog = 0; in yge_start_port()
2631 yge_set_rambuffer(yge_port_t *port) in yge_set_rambuffer() argument
2639 dev = port->p_dev; in yge_set_rambuffer()
2640 pnum = port->p_port; in yge_set_rambuffer()
2641 rxq = port->p_rxq; in yge_set_rambuffer()
2642 txq = port->p_txq; in yge_set_rambuffer()
2644 if ((port->p_flags & PORT_FLAG_RAMBUF) == 0) in yge_set_rambuffer()
2705 yge_stop_port(yge_port_t *port) in yge_stop_port() argument
2707 yge_dev_t *dev = port->p_dev; in yge_stop_port()
2708 int pnum = port->p_port; in yge_stop_port()
2709 uint32_t txq = port->p_txq; in yge_stop_port()
2710 uint32_t rxq = port->p_rxq; in yge_stop_port()
2714 dev = port->p_dev; in yge_stop_port()
2719 port->p_tx_wdog = 0; in yge_stop_port()
2742 yge_stats_update(port); in yge_stop_port()
2757 yge_error(NULL, port, "Tx BMU stop failed"); in yge_stop_port()
2803 yge_error(NULL, port, "Rx BMU stop failed"); in yge_stop_port()
2828 yge_stats_clear(yge_port_t *port) in yge_stats_clear() argument
2834 pnum = port->p_port; in yge_stats_clear()
2835 dev = port->p_dev; in yge_stats_clear()
2849 yge_stats_update(yge_port_t *port) in yge_stats_update() argument
2856 dev = port->p_dev; in yge_stats_update()
2857 pnum = port->p_port; in yge_stats_update()
2859 if (dev->d_suspended || !port->p_running) { in yge_stats_update()
2862 stats = &port->p_stats; in yge_stats_update()
2943 yge_port_t *port = arg; in yge_m_stat() local
2944 struct yge_hw_stats *stats = &port->p_stats; in yge_m_stat()
2952 DEV_LOCK(port->p_dev); in yge_m_stat()
2953 yge_stats_update(port); in yge_m_stat()
2954 DEV_UNLOCK(port->p_dev); in yge_m_stat()
2957 if (mii_m_getstat(port->p_mii, stat, val) == 0) { in yge_m_stat()
3055 yge_port_t *port = arg; in yge_m_start() local
3057 DEV_LOCK(port->p_dev); in yge_m_start()
3067 if (yge_txrx_dma_alloc(port) != DDI_SUCCESS) { in yge_m_start()
3069 yge_txrx_dma_free(port); in yge_m_start()
3070 DEV_UNLOCK(port->p_dev); in yge_m_start()
3074 if (!port->p_dev->d_suspended) in yge_m_start()
3075 yge_start_port(port); in yge_m_start()
3076 port->p_running = B_TRUE; in yge_m_start()
3077 DEV_UNLOCK(port->p_dev); in yge_m_start()
3079 mii_start(port->p_mii); in yge_m_start()
3087 yge_port_t *port = arg; in yge_m_stop() local
3088 yge_dev_t *dev = port->p_dev; in yge_m_stop()
3092 yge_stop_port(port); in yge_m_stop()
3094 port->p_running = B_FALSE; in yge_m_stop()
3097 yge_txrx_dma_free(port); in yge_m_stop()
3104 yge_port_t *port = arg; in yge_m_promisc() local
3106 DEV_LOCK(port->p_dev); in yge_m_promisc()
3109 port->p_promisc = on; in yge_m_promisc()
3110 yge_setrxfilt(port); in yge_m_promisc()
3112 DEV_UNLOCK(port->p_dev); in yge_m_promisc()
3120 yge_port_t *port = arg; in yge_m_multicst() local
3127 DEV_LOCK(port->p_dev); in yge_m_multicst()
3129 if (port->p_mccount[bit] == 0) { in yge_m_multicst()
3131 port->p_mchash[bit / 32] |= (1 << (bit % 32)); in yge_m_multicst()
3134 port->p_mccount[bit]++; in yge_m_multicst()
3136 ASSERT(port->p_mccount[bit] > 0); in yge_m_multicst()
3137 port->p_mccount[bit]--; in yge_m_multicst()
3138 if (port->p_mccount[bit] == 0) { in yge_m_multicst()
3139 port->p_mchash[bit / 32] &= ~(1 << (bit % 32)); in yge_m_multicst()
3145 yge_setrxfilt(port); in yge_m_multicst()
3147 DEV_UNLOCK(port->p_dev); in yge_m_multicst()
3154 yge_port_t *port = arg; in yge_m_unicst() local
3156 DEV_LOCK(port->p_dev); in yge_m_unicst()
3158 bcopy(macaddr, port->p_curraddr, ETHERADDRL); in yge_m_unicst()
3159 yge_setrxfilt(port); in yge_m_unicst()
3161 DEV_UNLOCK(port->p_dev); in yge_m_unicst()
3169 yge_port_t *port = arg; in yge_m_tx() local
3176 TX_LOCK(port->p_dev); in yge_m_tx()
3178 if (port->p_dev->d_suspended) { in yge_m_tx()
3180 TX_UNLOCK(port->p_dev); in yge_m_tx()
3191 ridx = port->p_port == YGE_PORT_A ? in yge_m_tx()
3193 idx = CSR_READ_2(port->p_dev, ridx); in yge_m_tx()
3194 if (port->p_tx_cons != idx) in yge_m_tx()
3195 resched = yge_txeof_locked(port, idx); in yge_m_tx()
3201 if (!yge_send(port, mp)) { in yge_m_tx()
3211 CSR_WRITE_2(port->p_dev, in yge_m_tx()
3212 Y2_PREF_Q_ADDR(port->p_txq, PREF_UNIT_PUT_IDX_REG), in yge_m_tx()
3213 port->p_tx_prod); in yge_m_tx()
3216 TX_UNLOCK(port->p_dev); in yge_m_tx()
3219 mac_tx_update(port->p_mh); in yge_m_tx()
3229 yge_port_t *port = arg; in yge_m_ioctl() local
3236 if (mii_m_loop_ioctl(port->p_mii, wq, mp)) in yge_m_ioctl()
3249 yge_port_t *port = arg; in yge_m_setprop() local
3253 err = mii_m_setprop(port->p_mii, pr_name, pr_num, pr_valsize, pr_val); in yge_m_setprop()
3258 DEV_LOCK(port->p_dev); in yge_m_setprop()
3267 if (new_mtu == port->p_mtu) { in yge_m_setprop()
3273 yge_error(NULL, port, in yge_m_setprop()
3278 if (new_mtu > (port->p_flags & PORT_FLAG_NOJUMBO ? in yge_m_setprop()
3280 yge_error(NULL, port, in yge_m_setprop()
3285 if (port->p_running) { in yge_m_setprop()
3286 yge_error(NULL, port, in yge_m_setprop()
3319 err = mac_maxsdu_update(port->p_mh, new_mtu); in yge_m_setprop()
3322 yge_error(NULL, port, in yge_m_setprop()
3325 port->p_mtu = new_mtu; in yge_m_setprop()
3335 DEV_UNLOCK(port->p_dev); in yge_m_setprop()
3344 yge_port_t *port = arg; in yge_m_getprop() local
3346 return (mii_m_getprop(port->p_mii, pr_name, pr_num, pr_valsize, in yge_m_getprop()
3354 yge_port_t *port = arg; in yge_m_propinfo() local
3359 port->p_flags & PORT_FLAG_NOJUMBO ? in yge_m_propinfo()
3363 mii_m_propinfo(port->p_mii, pr_name, pr_num, prh); in yge_m_propinfo()
3407 yge_error(yge_dev_t *dev, yge_port_t *port, char *fmt, ...) in yge_error() argument
3417 if (dev == NULL && port == NULL) { in yge_error()
3420 if (port != NULL) in yge_error()
3421 ppa = port->p_ppa; in yge_error()
3525 yge_port_t *port = dev->d_port[i]; in yge_quiesce() local
3526 if (port->p_running) in yge_quiesce()
3527 yge_stop_port(port); in yge_quiesce()