Lines Matching refs:drv
63 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_enable() local
67 dsaf_set_dev_bit(drv, GMAC_PORT_EN_REG, GMAC_PORT_TX_EN_B, 1); in hns_gmac_enable()
71 dsaf_set_dev_bit(drv, GMAC_PCS_RX_EN_REG, 0, 0); in hns_gmac_enable()
72 dsaf_set_dev_bit(drv, GMAC_PORT_EN_REG, GMAC_PORT_RX_EN_B, 1); in hns_gmac_enable()
78 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_disable() local
82 dsaf_set_dev_bit(drv, GMAC_PORT_EN_REG, GMAC_PORT_TX_EN_B, 0); in hns_gmac_disable()
86 dsaf_set_dev_bit(drv, GMAC_PCS_RX_EN_REG, 0, 1); in hns_gmac_disable()
87 dsaf_set_dev_bit(drv, GMAC_PORT_EN_REG, GMAC_PORT_RX_EN_B, 0); in hns_gmac_disable()
98 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_get_en() local
101 porten = dsaf_read_dev(drv, GMAC_PORT_EN_REG); in hns_gmac_get_en()
108 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_free() local
110 = (struct dsaf_device *)dev_get_drvdata(drv->dev); in hns_gmac_free()
112 u32 mac_id = drv->mac_id; in hns_gmac_free()
119 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_set_tx_auto_pause_frames() local
121 dsaf_set_dev_field(drv, GMAC_FC_TX_TIMER_REG, GMAC_FC_TX_TIMER_M, in hns_gmac_set_tx_auto_pause_frames()
127 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_get_tx_auto_pause_frames() local
129 *newval = dsaf_get_dev_field(drv, GMAC_FC_TX_TIMER_REG, in hns_gmac_get_tx_auto_pause_frames()
135 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_config_max_frame_length() local
137 dsaf_set_dev_field(drv, GMAC_MAX_FRM_SIZE_REG, GMAC_MAX_FRM_SIZE_M, in hns_gmac_config_max_frame_length()
140 dsaf_set_dev_field(drv, GAMC_RX_MAX_FRAME, GMAC_MAX_FRM_SIZE_M, in hns_gmac_config_max_frame_length()
147 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_config_pad_and_crc() local
149 tx_ctrl = dsaf_read_dev(drv, GMAC_TRANSMIT_CONTROL_REG); in hns_gmac_config_pad_and_crc()
152 dsaf_write_dev(drv, GMAC_TRANSMIT_CONTROL_REG, tx_ctrl); in hns_gmac_config_pad_and_crc()
157 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_config_an_mode() local
159 dsaf_set_dev_bit(drv, GMAC_TRANSMIT_CONTROL_REG, in hns_gmac_config_an_mode()
166 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_tx_loop_pkt_dis() local
168 tx_loop_pkt_pri = dsaf_read_dev(drv, GMAC_TX_LOOP_PKT_PRI_REG); in hns_gmac_tx_loop_pkt_dis()
171 dsaf_write_dev(drv, GMAC_TX_LOOP_PKT_PRI_REG, tx_loop_pkt_pri); in hns_gmac_tx_loop_pkt_dis()
177 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_get_duplex_type() local
180 drv, GMAC_DUPLEX_TYPE_REG, GMAC_DUPLEX_TYPE_B); in hns_gmac_get_duplex_type()
185 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_get_port_mode() local
188 drv, GMAC_PORT_MODE_REG, GMAC_PORT_MODE_M, GMAC_PORT_MODE_S); in hns_gmac_get_port_mode()
196 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_port_mode_get() local
199 drv, GMAC_PORT_MODE_REG, GMAC_PORT_MODE_M, GMAC_PORT_MODE_S); in hns_gmac_port_mode_get()
201 tx_ctrl = dsaf_read_dev(drv, GMAC_TRANSMIT_CONTROL_REG); in hns_gmac_port_mode_get()
202 recv_ctrl = dsaf_read_dev(drv, GMAC_RECV_CONTROL_REG); in hns_gmac_port_mode_get()
205 dsaf_get_dev_field(drv, GMAC_MAX_FRM_SIZE_REG, in hns_gmac_port_mode_get()
208 dsaf_get_dev_field(drv, GMAC_SHORT_RUNTS_THR_REG, in hns_gmac_port_mode_get()
226 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_pause_frm_cfg() local
228 pause_en = dsaf_read_dev(drv, GMAC_PAUSE_EN_REG); in hns_gmac_pause_frm_cfg()
231 dsaf_write_dev(drv, GMAC_PAUSE_EN_REG, pause_en); in hns_gmac_pause_frm_cfg()
238 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_get_pausefrm_cfg() local
240 pause_en = dsaf_read_dev(drv, GMAC_PAUSE_EN_REG); in hns_gmac_get_pausefrm_cfg()
249 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_need_adjust_link() local
250 struct hns_mac_cb *mac_cb = drv->mac_cb; in hns_gmac_need_adjust_link()
259 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_adjust_link() local
261 dsaf_set_dev_bit(drv, GMAC_DUPLEX_TYPE_REG, in hns_gmac_adjust_link()
267 drv, GMAC_PORT_MODE_REG, in hns_gmac_adjust_link()
272 drv, GMAC_PORT_MODE_REG, in hns_gmac_adjust_link()
277 drv, GMAC_PORT_MODE_REG, in hns_gmac_adjust_link()
281 dev_err(drv->dev, in hns_gmac_adjust_link()
283 speed, drv->mac_id); in hns_gmac_adjust_link()
292 struct mac_driver *drv = mac_drv; in hns_gmac_set_uc_match() local
294 dsaf_set_dev_bit(drv, GMAC_REC_FILT_CONTROL_REG, in hns_gmac_set_uc_match()
296 dsaf_set_dev_bit(drv, GMAC_STATION_ADDR_HIGH_2_REG, in hns_gmac_set_uc_match()
302 struct mac_driver *drv = mac_drv; in hns_gmac_set_promisc() local
304 if (drv->mac_cb->mac_type == HNAE_PORT_DEBUG) in hns_gmac_set_promisc()
310 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_wait_fifo_clean() local
316 val = dsaf_read_dev(drv, GMAC_FIFO_STATE_REG); in hns_gmac_wait_fifo_clean()
324 dev_err(drv->dev, in hns_gmac_wait_fifo_clean()
325 "hns ge %d fifo was not idle.\n", drv->mac_id); in hns_gmac_wait_fifo_clean()
335 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_init() local
337 = (struct dsaf_device *)dev_get_drvdata(drv->dev); in hns_gmac_init()
339 port = drv->mac_id; in hns_gmac_init()
347 if (drv->mac_cb->mac_type == HNAE_PORT_DEBUG) in hns_gmac_init()
352 dsaf_set_dev_bit(drv, GMAC_MODE_CHANGE_EN_REG, in hns_gmac_init()
358 dsaf_set_dev_field(drv, GMAC_TX_WATER_LINE_REG, GMAC_TX_WATER_LINE_MASK, in hns_gmac_init()
365 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_update_stats() local
367 hw_stats = &drv->mac_cb->hw_stats; in hns_gmac_update_stats()
371 += dsaf_read_dev(drv, GMAC_RX_OCTETS_TOTAL_OK_REG); in hns_gmac_update_stats()
373 += dsaf_read_dev(drv, GMAC_RX_OCTETS_BAD_REG); in hns_gmac_update_stats()
374 hw_stats->rx_uc_pkts += dsaf_read_dev(drv, GMAC_RX_UC_PKTS_REG); in hns_gmac_update_stats()
375 hw_stats->rx_mc_pkts += dsaf_read_dev(drv, GMAC_RX_MC_PKTS_REG); in hns_gmac_update_stats()
376 hw_stats->rx_bc_pkts += dsaf_read_dev(drv, GMAC_RX_BC_PKTS_REG); in hns_gmac_update_stats()
378 += dsaf_read_dev(drv, GMAC_RX_PKTS_64OCTETS_REG); in hns_gmac_update_stats()
380 += dsaf_read_dev(drv, GMAC_RX_PKTS_65TO127OCTETS_REG); in hns_gmac_update_stats()
382 += dsaf_read_dev(drv, GMAC_RX_PKTS_128TO255OCTETS_REG); in hns_gmac_update_stats()
384 += dsaf_read_dev(drv, GMAC_RX_PKTS_255TO511OCTETS_REG); in hns_gmac_update_stats()
386 += dsaf_read_dev(drv, GMAC_RX_PKTS_512TO1023OCTETS_REG); in hns_gmac_update_stats()
388 += dsaf_read_dev(drv, GMAC_RX_PKTS_1024TO1518OCTETS_REG); in hns_gmac_update_stats()
390 += dsaf_read_dev(drv, GMAC_RX_PKTS_1519TOMAXOCTETS_REG); in hns_gmac_update_stats()
391 hw_stats->rx_fcs_err += dsaf_read_dev(drv, GMAC_RX_FCS_ERRORS_REG); in hns_gmac_update_stats()
392 hw_stats->rx_vlan_pkts += dsaf_read_dev(drv, GMAC_RX_TAGGED_REG); in hns_gmac_update_stats()
393 hw_stats->rx_data_err += dsaf_read_dev(drv, GMAC_RX_DATA_ERR_REG); in hns_gmac_update_stats()
395 += dsaf_read_dev(drv, GMAC_RX_ALIGN_ERRORS_REG); in hns_gmac_update_stats()
397 += dsaf_read_dev(drv, GMAC_RX_LONG_ERRORS_REG); in hns_gmac_update_stats()
399 += dsaf_read_dev(drv, GMAC_RX_JABBER_ERRORS_REG); in hns_gmac_update_stats()
401 += dsaf_read_dev(drv, GMAC_RX_PAUSE_MACCTRL_FRAM_REG); in hns_gmac_update_stats()
403 += dsaf_read_dev(drv, GMAC_RX_UNKNOWN_MACCTRL_FRAM_REG); in hns_gmac_update_stats()
405 += dsaf_read_dev(drv, GMAC_RX_VERY_LONG_ERR_CNT_REG); in hns_gmac_update_stats()
407 += dsaf_read_dev(drv, GMAC_RX_RUNT_ERR_CNT_REG); in hns_gmac_update_stats()
409 += dsaf_read_dev(drv, GMAC_RX_SHORT_ERR_CNT_REG); in hns_gmac_update_stats()
411 += dsaf_read_dev(drv, GMAC_RX_FILT_PKT_CNT_REG); in hns_gmac_update_stats()
413 += dsaf_read_dev(drv, GMAC_RX_OCTETS_TOTAL_FILT_REG); in hns_gmac_update_stats()
415 += dsaf_read_dev(drv, GMAC_RX_OVERRUN_CNT_REG); in hns_gmac_update_stats()
417 += dsaf_read_dev(drv, GMAC_RX_LENGTHFIELD_ERR_CNT_REG); in hns_gmac_update_stats()
419 += dsaf_read_dev(drv, GMAC_RX_FAIL_COMMA_CNT_REG); in hns_gmac_update_stats()
423 += dsaf_read_dev(drv, GMAC_OCTETS_TRANSMITTED_OK_REG); in hns_gmac_update_stats()
425 += dsaf_read_dev(drv, GMAC_OCTETS_TRANSMITTED_BAD_REG); in hns_gmac_update_stats()
426 hw_stats->tx_uc_pkts += dsaf_read_dev(drv, GMAC_TX_UC_PKTS_REG); in hns_gmac_update_stats()
427 hw_stats->tx_mc_pkts += dsaf_read_dev(drv, GMAC_TX_MC_PKTS_REG); in hns_gmac_update_stats()
428 hw_stats->tx_bc_pkts += dsaf_read_dev(drv, GMAC_TX_BC_PKTS_REG); in hns_gmac_update_stats()
430 += dsaf_read_dev(drv, GMAC_TX_PKTS_64OCTETS_REG); in hns_gmac_update_stats()
432 += dsaf_read_dev(drv, GMAC_TX_PKTS_65TO127OCTETS_REG); in hns_gmac_update_stats()
434 += dsaf_read_dev(drv, GMAC_TX_PKTS_128TO255OCTETS_REG); in hns_gmac_update_stats()
436 += dsaf_read_dev(drv, GMAC_TX_PKTS_255TO511OCTETS_REG); in hns_gmac_update_stats()
438 += dsaf_read_dev(drv, GMAC_TX_PKTS_512TO1023OCTETS_REG); in hns_gmac_update_stats()
440 += dsaf_read_dev(drv, GMAC_TX_PKTS_1024TO1518OCTETS_REG); in hns_gmac_update_stats()
442 += dsaf_read_dev(drv, GMAC_TX_PKTS_1519TOMAXOCTETS_REG); in hns_gmac_update_stats()
444 += dsaf_read_dev(drv, GMAC_TX_EXCESSIVE_LENGTH_DROP_REG); in hns_gmac_update_stats()
446 += dsaf_read_dev(drv, GMAC_TX_UNDERRUN_REG); in hns_gmac_update_stats()
447 hw_stats->tx_vlan += dsaf_read_dev(drv, GMAC_TX_TAGGED_REG); in hns_gmac_update_stats()
448 hw_stats->tx_crc_err += dsaf_read_dev(drv, GMAC_TX_CRC_ERROR_REG); in hns_gmac_update_stats()
450 += dsaf_read_dev(drv, GMAC_TX_PAUSE_FRAMES_REG); in hns_gmac_update_stats()
455 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_set_mac_addr() local
462 u32 val = dsaf_read_dev(drv, GMAC_STATION_ADDR_HIGH_2_REG); in hns_gmac_set_mac_addr()
465 dsaf_write_dev(drv, GMAC_STATION_ADDR_LOW_2_REG, low_val); in hns_gmac_set_mac_addr()
466 dsaf_write_dev(drv, GMAC_STATION_ADDR_HIGH_2_REG, in hns_gmac_set_mac_addr()
473 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_config_loopback() local
477 dsaf_set_dev_bit(drv, GMAC_LOOP_REG, GMAC_LP_REG_CF2MI_LP_EN_B, in hns_gmac_config_loopback()
481 dev_err(drv->dev, "loop_mode error\n"); in hns_gmac_config_loopback()
535 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_autoneg_stat() local
537 *enable = dsaf_get_dev_bit(drv, GMAC_TRANSMIT_CONTROL_REG, in hns_gmac_autoneg_stat()
543 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_get_link_status() local
545 *link_stat = dsaf_get_dev_bit(drv, GMAC_AN_NEG_STATE_REG, in hns_gmac_get_link_status()
553 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_get_regs() local
556 regs[0] = dsaf_read_dev(drv, GMAC_DUPLEX_TYPE_REG); in hns_gmac_get_regs()
557 regs[1] = dsaf_read_dev(drv, GMAC_FD_FC_TYPE_REG); in hns_gmac_get_regs()
558 regs[2] = dsaf_read_dev(drv, GMAC_FC_TX_TIMER_REG); in hns_gmac_get_regs()
559 regs[3] = dsaf_read_dev(drv, GMAC_FD_FC_ADDR_LOW_REG); in hns_gmac_get_regs()
560 regs[4] = dsaf_read_dev(drv, GMAC_FD_FC_ADDR_HIGH_REG); in hns_gmac_get_regs()
561 regs[5] = dsaf_read_dev(drv, GMAC_IPG_TX_TIMER_REG); in hns_gmac_get_regs()
562 regs[6] = dsaf_read_dev(drv, GMAC_PAUSE_THR_REG); in hns_gmac_get_regs()
563 regs[7] = dsaf_read_dev(drv, GMAC_MAX_FRM_SIZE_REG); in hns_gmac_get_regs()
564 regs[8] = dsaf_read_dev(drv, GMAC_PORT_MODE_REG); in hns_gmac_get_regs()
565 regs[9] = dsaf_read_dev(drv, GMAC_PORT_EN_REG); in hns_gmac_get_regs()
566 regs[10] = dsaf_read_dev(drv, GMAC_PAUSE_EN_REG); in hns_gmac_get_regs()
567 regs[11] = dsaf_read_dev(drv, GMAC_SHORT_RUNTS_THR_REG); in hns_gmac_get_regs()
568 regs[12] = dsaf_read_dev(drv, GMAC_AN_NEG_STATE_REG); in hns_gmac_get_regs()
569 regs[13] = dsaf_read_dev(drv, GMAC_TX_LOCAL_PAGE_REG); in hns_gmac_get_regs()
570 regs[14] = dsaf_read_dev(drv, GMAC_TRANSMIT_CONTROL_REG); in hns_gmac_get_regs()
571 regs[15] = dsaf_read_dev(drv, GMAC_REC_FILT_CONTROL_REG); in hns_gmac_get_regs()
572 regs[16] = dsaf_read_dev(drv, GMAC_PTP_CONFIG_REG); in hns_gmac_get_regs()
575 regs[17] = dsaf_read_dev(drv, GMAC_RX_OCTETS_TOTAL_OK_REG); in hns_gmac_get_regs()
576 regs[18] = dsaf_read_dev(drv, GMAC_RX_OCTETS_BAD_REG); in hns_gmac_get_regs()
577 regs[19] = dsaf_read_dev(drv, GMAC_RX_UC_PKTS_REG); in hns_gmac_get_regs()
578 regs[20] = dsaf_read_dev(drv, GMAC_RX_MC_PKTS_REG); in hns_gmac_get_regs()
579 regs[21] = dsaf_read_dev(drv, GMAC_RX_BC_PKTS_REG); in hns_gmac_get_regs()
580 regs[22] = dsaf_read_dev(drv, GMAC_RX_PKTS_64OCTETS_REG); in hns_gmac_get_regs()
581 regs[23] = dsaf_read_dev(drv, GMAC_RX_PKTS_65TO127OCTETS_REG); in hns_gmac_get_regs()
582 regs[24] = dsaf_read_dev(drv, GMAC_RX_PKTS_128TO255OCTETS_REG); in hns_gmac_get_regs()
583 regs[25] = dsaf_read_dev(drv, GMAC_RX_PKTS_255TO511OCTETS_REG); in hns_gmac_get_regs()
584 regs[26] = dsaf_read_dev(drv, GMAC_RX_PKTS_512TO1023OCTETS_REG); in hns_gmac_get_regs()
585 regs[27] = dsaf_read_dev(drv, GMAC_RX_PKTS_1024TO1518OCTETS_REG); in hns_gmac_get_regs()
586 regs[28] = dsaf_read_dev(drv, GMAC_RX_PKTS_1519TOMAXOCTETS_REG); in hns_gmac_get_regs()
587 regs[29] = dsaf_read_dev(drv, GMAC_RX_FCS_ERRORS_REG); in hns_gmac_get_regs()
588 regs[30] = dsaf_read_dev(drv, GMAC_RX_TAGGED_REG); in hns_gmac_get_regs()
589 regs[31] = dsaf_read_dev(drv, GMAC_RX_DATA_ERR_REG); in hns_gmac_get_regs()
590 regs[32] = dsaf_read_dev(drv, GMAC_RX_ALIGN_ERRORS_REG); in hns_gmac_get_regs()
591 regs[33] = dsaf_read_dev(drv, GMAC_RX_LONG_ERRORS_REG); in hns_gmac_get_regs()
592 regs[34] = dsaf_read_dev(drv, GMAC_RX_JABBER_ERRORS_REG); in hns_gmac_get_regs()
593 regs[35] = dsaf_read_dev(drv, GMAC_RX_PAUSE_MACCTRL_FRAM_REG); in hns_gmac_get_regs()
594 regs[36] = dsaf_read_dev(drv, GMAC_RX_UNKNOWN_MACCTRL_FRAM_REG); in hns_gmac_get_regs()
595 regs[37] = dsaf_read_dev(drv, GMAC_RX_VERY_LONG_ERR_CNT_REG); in hns_gmac_get_regs()
596 regs[38] = dsaf_read_dev(drv, GMAC_RX_RUNT_ERR_CNT_REG); in hns_gmac_get_regs()
597 regs[39] = dsaf_read_dev(drv, GMAC_RX_SHORT_ERR_CNT_REG); in hns_gmac_get_regs()
598 regs[40] = dsaf_read_dev(drv, GMAC_RX_FILT_PKT_CNT_REG); in hns_gmac_get_regs()
599 regs[41] = dsaf_read_dev(drv, GMAC_RX_OCTETS_TOTAL_FILT_REG); in hns_gmac_get_regs()
602 regs[42] = dsaf_read_dev(drv, GMAC_OCTETS_TRANSMITTED_OK_REG); in hns_gmac_get_regs()
603 regs[43] = dsaf_read_dev(drv, GMAC_OCTETS_TRANSMITTED_BAD_REG); in hns_gmac_get_regs()
604 regs[44] = dsaf_read_dev(drv, GMAC_TX_UC_PKTS_REG); in hns_gmac_get_regs()
605 regs[45] = dsaf_read_dev(drv, GMAC_TX_MC_PKTS_REG); in hns_gmac_get_regs()
606 regs[46] = dsaf_read_dev(drv, GMAC_TX_BC_PKTS_REG); in hns_gmac_get_regs()
607 regs[47] = dsaf_read_dev(drv, GMAC_TX_PKTS_64OCTETS_REG); in hns_gmac_get_regs()
608 regs[48] = dsaf_read_dev(drv, GMAC_TX_PKTS_65TO127OCTETS_REG); in hns_gmac_get_regs()
609 regs[49] = dsaf_read_dev(drv, GMAC_TX_PKTS_128TO255OCTETS_REG); in hns_gmac_get_regs()
610 regs[50] = dsaf_read_dev(drv, GMAC_TX_PKTS_255TO511OCTETS_REG); in hns_gmac_get_regs()
611 regs[51] = dsaf_read_dev(drv, GMAC_TX_PKTS_512TO1023OCTETS_REG); in hns_gmac_get_regs()
612 regs[52] = dsaf_read_dev(drv, GMAC_TX_PKTS_1024TO1518OCTETS_REG); in hns_gmac_get_regs()
613 regs[53] = dsaf_read_dev(drv, GMAC_TX_PKTS_1519TOMAXOCTETS_REG); in hns_gmac_get_regs()
614 regs[54] = dsaf_read_dev(drv, GMAC_TX_EXCESSIVE_LENGTH_DROP_REG); in hns_gmac_get_regs()
615 regs[55] = dsaf_read_dev(drv, GMAC_TX_UNDERRUN_REG); in hns_gmac_get_regs()
616 regs[56] = dsaf_read_dev(drv, GMAC_TX_TAGGED_REG); in hns_gmac_get_regs()
617 regs[57] = dsaf_read_dev(drv, GMAC_TX_CRC_ERROR_REG); in hns_gmac_get_regs()
618 regs[58] = dsaf_read_dev(drv, GMAC_TX_PAUSE_FRAMES_REG); in hns_gmac_get_regs()
620 regs[59] = dsaf_read_dev(drv, GAMC_RX_MAX_FRAME); in hns_gmac_get_regs()
621 regs[60] = dsaf_read_dev(drv, GMAC_LINE_LOOP_BACK_REG); in hns_gmac_get_regs()
622 regs[61] = dsaf_read_dev(drv, GMAC_CF_CRC_STRIP_REG); in hns_gmac_get_regs()
623 regs[62] = dsaf_read_dev(drv, GMAC_MODE_CHANGE_EN_REG); in hns_gmac_get_regs()
624 regs[63] = dsaf_read_dev(drv, GMAC_SIXTEEN_BIT_CNTR_REG); in hns_gmac_get_regs()
625 regs[64] = dsaf_read_dev(drv, GMAC_LD_LINK_COUNTER_REG); in hns_gmac_get_regs()
626 regs[65] = dsaf_read_dev(drv, GMAC_LOOP_REG); in hns_gmac_get_regs()
627 regs[66] = dsaf_read_dev(drv, GMAC_RECV_CONTROL_REG); in hns_gmac_get_regs()
628 regs[67] = dsaf_read_dev(drv, GMAC_VLAN_CODE_REG); in hns_gmac_get_regs()
629 regs[68] = dsaf_read_dev(drv, GMAC_RX_OVERRUN_CNT_REG); in hns_gmac_get_regs()
630 regs[69] = dsaf_read_dev(drv, GMAC_RX_LENGTHFIELD_ERR_CNT_REG); in hns_gmac_get_regs()
631 regs[70] = dsaf_read_dev(drv, GMAC_RX_FAIL_COMMA_CNT_REG); in hns_gmac_get_regs()
633 regs[71] = dsaf_read_dev(drv, GMAC_STATION_ADDR_LOW_0_REG); in hns_gmac_get_regs()
634 regs[72] = dsaf_read_dev(drv, GMAC_STATION_ADDR_HIGH_0_REG); in hns_gmac_get_regs()
635 regs[73] = dsaf_read_dev(drv, GMAC_STATION_ADDR_LOW_1_REG); in hns_gmac_get_regs()
636 regs[74] = dsaf_read_dev(drv, GMAC_STATION_ADDR_HIGH_1_REG); in hns_gmac_get_regs()
637 regs[75] = dsaf_read_dev(drv, GMAC_STATION_ADDR_LOW_2_REG); in hns_gmac_get_regs()
638 regs[76] = dsaf_read_dev(drv, GMAC_STATION_ADDR_HIGH_2_REG); in hns_gmac_get_regs()
639 regs[77] = dsaf_read_dev(drv, GMAC_STATION_ADDR_LOW_3_REG); in hns_gmac_get_regs()
640 regs[78] = dsaf_read_dev(drv, GMAC_STATION_ADDR_HIGH_3_REG); in hns_gmac_get_regs()
641 regs[79] = dsaf_read_dev(drv, GMAC_STATION_ADDR_LOW_4_REG); in hns_gmac_get_regs()
642 regs[80] = dsaf_read_dev(drv, GMAC_STATION_ADDR_HIGH_4_REG); in hns_gmac_get_regs()
643 regs[81] = dsaf_read_dev(drv, GMAC_STATION_ADDR_LOW_5_REG); in hns_gmac_get_regs()
644 regs[82] = dsaf_read_dev(drv, GMAC_STATION_ADDR_HIGH_5_REG); in hns_gmac_get_regs()
645 regs[83] = dsaf_read_dev(drv, GMAC_STATION_ADDR_LOW_MSK_0_REG); in hns_gmac_get_regs()
646 regs[84] = dsaf_read_dev(drv, GMAC_STATION_ADDR_HIGH_MSK_0_REG); in hns_gmac_get_regs()
647 regs[85] = dsaf_read_dev(drv, GMAC_STATION_ADDR_LOW_MSK_1_REG); in hns_gmac_get_regs()
648 regs[86] = dsaf_read_dev(drv, GMAC_STATION_ADDR_HIGH_MSK_1_REG); in hns_gmac_get_regs()
649 regs[87] = dsaf_read_dev(drv, GMAC_MAC_SKIP_LEN_REG); in hns_gmac_get_regs()
650 regs[88] = dsaf_read_dev(drv, GMAC_TX_LOOP_PKT_PRI_REG); in hns_gmac_get_regs()
661 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_gmac_get_stats() local
664 hw_stats = &drv->mac_cb->hw_stats; in hns_gmac_get_stats()