/titanic_50/usr/src/uts/common/io/nge/ |
H A D | nge_ndd.c | 47 nge_param_sync(nge_t *ngep) in nge_param_sync() argument 49 ngep->param_en_pause = ngep->param_adv_pause; in nge_param_sync() 50 ngep->param_en_asym_pause = ngep->param_adv_asym_pause; in nge_param_sync() 51 ngep->param_en_1000fdx = ngep->param_adv_1000fdx; in nge_param_sync() 52 ngep->param_en_1000hdx = ngep->param_adv_1000hdx; in nge_param_sync() 53 ngep->param_en_100fdx = ngep->param_adv_100fdx; in nge_param_sync() 54 ngep->param_en_100hdx = ngep->param_adv_100hdx; in nge_param_sync() 55 ngep->param_en_10fdx = ngep->param_adv_10fdx; in nge_param_sync() 56 ngep->param_en_10hdx = ngep->param_adv_10hdx; in nge_param_sync() 79 ngep->fieldname = propval; \ [all …]
|
H A D | nge_main.c | 232 nge_set_loop_mode(nge_t *ngep, uint32_t mode) in nge_set_loop_mode() argument 237 if (mode == ngep->param_loop_mode) in nge_set_loop_mode() 260 ngep->param_loop_mode = mode; in nge_set_loop_mode() 298 nge_alloc_dma_mem(nge_t *ngep, size_t memsize, ddi_device_acc_attr_t *attr_p, in nge_alloc_dma_mem() argument 305 (void *)ngep, memsize, attr_p, dma_flags, dma_p)); in nge_alloc_dma_mem() 309 err = ddi_dma_alloc_handle(ngep->devinfo, ngep->desc_attr.dma_attr, in nge_alloc_dma_mem() 374 nge_alloc_bufs(nge_t *ngep) in nge_alloc_bufs() argument 383 txbuffsize = ngep->tx_desc * ngep->buf_size; in nge_alloc_bufs() 384 rxdescsize = ngep->rx_desc; in nge_alloc_bufs() 385 txdescsize = ngep->tx_desc; in nge_alloc_bufs() [all …]
|
H A D | nge_xmii.c | 50 static uint16_t nge_mii_access(nge_t *ngep, nge_regno_t regno, 55 nge_mii_access(nge_t *ngep, nge_regno_t regno, uint16_t data, uint32_t cmd) in nge_mii_access() argument 63 (void *)ngep, regno, data, cmd)); in nge_mii_access() 68 intr_src.src_val = nge_reg_get8(ngep, NGE_MINTR_SRC); in nge_mii_access() 69 nge_reg_put8(ngep, NGE_MINTR_SRC, intr_src.src_val); in nge_mii_access() 74 mdio_adr.adr_val = nge_reg_get16(ngep, NGE_MDIO_ADR); in nge_mii_access() 79 mdio_adr.adr_val = nge_reg_get16(ngep, NGE_MDIO_ADR); in nge_mii_access() 88 nge_reg_put16(ngep, NGE_MDIO_ADR, mdio_adr.adr_val); in nge_mii_access() 96 mdio_adr.adr_bits.phy_adr = ngep->phy_xmii_addr; in nge_mii_access() 101 nge_reg_put16(ngep, NGE_MDIO_DATA, data); in nge_mii_access() [all …]
|
H A D | nge_chip.c | 39 uint8_t nge_reg_get8(nge_t *ngep, nge_regno_t regno); 43 nge_reg_get8(nge_t *ngep, nge_regno_t regno) in nge_reg_get8() argument 45 NGE_TRACE(("nge_reg_get8($%p, 0x%lx)", (void *)ngep, regno)); in nge_reg_get8() 47 return (ddi_get8(ngep->io_handle, PIO_ADDR(ngep, regno))); in nge_reg_get8() 50 void nge_reg_put8(nge_t *ngep, nge_regno_t regno, uint8_t data); 54 nge_reg_put8(nge_t *ngep, nge_regno_t regno, uint8_t data) in nge_reg_put8() argument 57 (void *)ngep, regno, data)); in nge_reg_put8() 58 ddi_put8(ngep->io_handle, PIO_ADDR(ngep, regno), data); in nge_reg_put8() 62 uint16_t nge_reg_get16(nge_t *ngep, nge_regno_t regno); 66 nge_reg_get16(nge_t *ngep, nge_regno_t regno) in nge_reg_get16() argument [all …]
|
H A D | nge_kstats.c | 70 nge_t *ngep; in nge_statistics_update() local 79 ngep = ksp->ks_private; in nge_statistics_update() 80 istp = &ngep->statistics; in nge_statistics_update() 89 hw_stp->a[ksip->index] += nge_reg_get32(ngep, regno); in nge_statistics_update() 141 nge_t *ngep; in nge_chipinfo_update() local 148 ngep = ksp->ks_private; in nge_chipinfo_update() 149 infop = &ngep->chipinfo; in nge_chipinfo_update() 161 (knp++)->value.ui64 = ngep->phy_mode; in nge_chipinfo_update() 162 (knp++)->value.ui64 = ngep->phy_id; in nge_chipinfo_update() 170 nge_t *ngep; in nge_debuginfo_update() local [all …]
|
H A D | nge_rx.c | 71 nge_t *ngep; in nge_recv_recycle() local 77 ngep = (nge_t *)bufp->private; in nge_recv_recycle() 78 brp = ngep->buff; in nge_recv_recycle() 79 sw_stp = &ngep->statistics.sw_statistics; in nge_recv_recycle() 102 ngep->buf_size + NGE_HEADROOM, 0, &bufp->rx_recycle); in nge_recv_recycle() 140 static mblk_t *nge_recv_packet(nge_t *ngep, uint32_t start_index, size_t len); 144 nge_recv_packet(nge_t *ngep, uint32_t start_index, size_t len) in nge_recv_packet() argument 156 brp = ngep->buff; in nge_recv_packet() 158 maxsize = ngep->max_sdu; in nge_recv_packet() 159 sw_stp = &ngep->statistics.sw_statistics; in nge_recv_packet() [all …]
|
H A D | nge_tx.c | 51 void nge_tx_recycle_all(nge_t *ngep); 55 nge_tx_recycle_all(nge_t *ngep) in nge_tx_recycle_all() argument 63 srp = ngep->send; in nge_tx_recycle_all() 83 if (ngep->nge_mac_state == NGE_MAC_STARTED && in nge_tx_recycle_all() 84 ngep->resched_needed == 1) { in nge_tx_recycle_all() 85 ngep->resched_needed = 0; in nge_tx_recycle_all() 86 mac_tx_update(ngep->mh); in nge_tx_recycle_all() 125 nge_tx_desc_sync(nge_t *ngep, uint32_t start_index, uint32_t bds, uint_t type) in nge_tx_desc_sync() argument 127 send_ring_t *srp = ngep->send; in nge_tx_desc_sync() 128 const size_t txd_size = ngep->desc_attr.txd_size; in nge_tx_desc_sync() [all …]
|
H A D | nge.h | 78 #define PIO_ADDR(ngep, offset) ((void *)((caddr_t)(ngep)->io_regs+(offset))) argument 491 struct nge *ngep; /* (const) containing */ member 517 struct nge *ngep; /* (const) containing */ member 539 struct nge *ngep; /* (const) containing */ member 944 #define NGE_LDB(b, args) NGE_XDB(b, ngep->debug, \ 945 (*nge_db(ngep)), args) 946 #define NGE_CDB(f, args) NGE_XDB(NGE_DBG, ngep->debug, f, args) 983 int nge_alloc_dma_mem(nge_t *ngep, size_t memsize, 986 int nge_restart(nge_t *ngep); 987 void nge_wake_factotum(nge_t *ngep); [all …]
|
H A D | nge_log.c | 71 nge_log(nge_t *ngep, const char *fmt, ...) in nge_log() argument 76 nge_log_data.who = ngep->ifname; in nge_log() 91 nge_problem(nge_t *ngep, const char *fmt, ...) in nge_problem() argument 96 nge_log_data.who = ngep->ifname; in nge_problem() 111 nge_error(nge_t *ngep, const char *fmt, ...) in nge_error() argument 116 nge_log_data.who = ngep->ifname; in nge_error() 171 nge_report(nge_t *ngep, uint8_t error_id) in nge_report() argument 176 nge_error(ngep, err_msg); in nge_report() 206 (*nge_db(nge_t *ngep))(const char *fmt, ...) in nge_db() argument 210 nge_log_data.who = ngep->ifname; in nge_db()
|