Lines Matching full:drv

88  *@drv: mac driver
91 static void hns_xgmac_tx_enable(struct mac_driver *drv, u32 value) in hns_xgmac_tx_enable() argument
93 dsaf_set_dev_bit(drv, XGMAC_MAC_ENABLE_REG, XGMAC_ENABLE_TX_B, !!value); in hns_xgmac_tx_enable()
98 *@drv: mac driver
101 static void hns_xgmac_rx_enable(struct mac_driver *drv, u32 value) in hns_xgmac_rx_enable() argument
103 dsaf_set_dev_bit(drv, XGMAC_MAC_ENABLE_REG, XGMAC_ENABLE_RX_B, !!value); in hns_xgmac_rx_enable()
138 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_enable() local
140 hns_xgmac_lf_rf_insert(drv, HNS_XGMAC_NO_LF_RF_INSERT); in hns_xgmac_enable()
144 hns_xgmac_tx_enable(drv, 1); in hns_xgmac_enable()
146 hns_xgmac_rx_enable(drv, 1); in hns_xgmac_enable()
148 hns_xgmac_tx_enable(drv, 1); in hns_xgmac_enable()
149 hns_xgmac_rx_enable(drv, 1); in hns_xgmac_enable()
151 dev_err(drv->dev, "error mac mode:%d\n", mode); in hns_xgmac_enable()
162 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_disable() local
165 hns_xgmac_tx_enable(drv, 0); in hns_xgmac_disable()
167 hns_xgmac_rx_enable(drv, 0); in hns_xgmac_disable()
169 hns_xgmac_tx_enable(drv, 0); in hns_xgmac_disable()
170 hns_xgmac_rx_enable(drv, 0); in hns_xgmac_disable()
172 hns_xgmac_lf_rf_insert(drv, HNS_XGMAC_LF_INSERT); in hns_xgmac_disable()
177 *@drv: mac driver
182 static void hns_xgmac_pma_fec_enable(struct mac_driver *drv, u32 tx_value, in hns_xgmac_pma_fec_enable() argument
185 u32 origin = dsaf_read_dev(drv, XGMAC_PMA_FEC_CONTROL_REG); in hns_xgmac_pma_fec_enable()
189 dsaf_write_dev(drv, XGMAC_PMA_FEC_CONTROL_REG, origin); in hns_xgmac_pma_fec_enable()
193 static void hns_xgmac_exc_irq_en(struct mac_driver *drv, u32 en) in hns_xgmac_exc_irq_en() argument
198 dsaf_write_dev(drv, XGMAC_INT_STATUS_REG, clr_vlue); in hns_xgmac_exc_irq_en()
199 dsaf_write_dev(drv, XGMAC_INT_ENABLE_REG, msk_vlue); in hns_xgmac_exc_irq_en()
208 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_init() local
210 = (struct dsaf_device *)dev_get_drvdata(drv->dev); in hns_xgmac_init()
211 u32 port = drv->mac_id; in hns_xgmac_init()
218 hns_xgmac_lf_rf_control_init(drv); in hns_xgmac_init()
219 hns_xgmac_exc_irq_en(drv, 0); in hns_xgmac_init()
221 hns_xgmac_pma_fec_enable(drv, 0x0, 0x0); in hns_xgmac_init()
233 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_config_pad_and_crc() local
234 u32 origin = dsaf_read_dev(drv, XGMAC_MAC_CONTROL_REG); in hns_xgmac_config_pad_and_crc()
239 dsaf_write_dev(drv, XGMAC_MAC_CONTROL_REG, origin); in hns_xgmac_config_pad_and_crc()
250 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_pausefrm_cfg() local
251 u32 origin = dsaf_read_dev(drv, XGMAC_MAC_PAUSE_CTRL_REG); in hns_xgmac_pausefrm_cfg()
255 dsaf_write_dev(drv, XGMAC_MAC_PAUSE_CTRL_REG, origin); in hns_xgmac_pausefrm_cfg()
260 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_set_pausefrm_mac_addr() local
265 dsaf_write_dev(drv, XGMAC_MAC_PAUSE_LOCAL_MAC_L_REG, low_val); in hns_xgmac_set_pausefrm_mac_addr()
266 dsaf_write_dev(drv, XGMAC_MAC_PAUSE_LOCAL_MAC_H_REG, high_val); in hns_xgmac_set_pausefrm_mac_addr()
276 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_set_tx_auto_pause_frames() local
278 dsaf_set_dev_bit(drv, XGMAC_MAC_PAUSE_CTRL_REG, in hns_xgmac_set_tx_auto_pause_frames()
283 dsaf_write_dev(drv, XGMAC_MAC_PAUSE_TIME_REG, enable); in hns_xgmac_set_tx_auto_pause_frames()
293 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_config_max_frame_length() local
295 dsaf_write_dev(drv, XGMAC_MAC_MAX_PKT_SIZE_REG, newval); in hns_xgmac_config_max_frame_length()
300 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_update_stats() local
301 struct mac_hw_stats *hw_stats = &drv->mac_cb->hw_stats; in hns_xgmac_update_stats()
305 = hns_mac_reg_read64(drv, XGMAC_TX_PKTS_FRAGMENT); in hns_xgmac_update_stats()
307 = hns_mac_reg_read64(drv, XGMAC_TX_PKTS_UNDERSIZE); in hns_xgmac_update_stats()
309 = hns_mac_reg_read64(drv, XGMAC_TX_PKTS_UNDERMIN); in hns_xgmac_update_stats()
310 hw_stats->tx_64bytes = hns_mac_reg_read64(drv, XGMAC_TX_PKTS_64OCTETS); in hns_xgmac_update_stats()
312 = hns_mac_reg_read64(drv, XGMAC_TX_PKTS_65TO127OCTETS); in hns_xgmac_update_stats()
314 = hns_mac_reg_read64(drv, XGMAC_TX_PKTS_128TO255OCTETS); in hns_xgmac_update_stats()
316 = hns_mac_reg_read64(drv, XGMAC_TX_PKTS_256TO511OCTETS); in hns_xgmac_update_stats()
318 = hns_mac_reg_read64(drv, XGMAC_TX_PKTS_512TO1023OCTETS); in hns_xgmac_update_stats()
320 = hns_mac_reg_read64(drv, XGMAC_TX_PKTS_1024TO1518OCTETS); in hns_xgmac_update_stats()
322 = hns_mac_reg_read64(drv, XGMAC_TX_PKTS_1519TOMAXOCTETS); in hns_xgmac_update_stats()
324 = hns_mac_reg_read64(drv, XGMAC_TX_PKTS_1519TOMAXOCTETSOK); in hns_xgmac_update_stats()
325 hw_stats->tx_oversize = hns_mac_reg_read64(drv, XGMAC_TX_PKTS_OVERSIZE); in hns_xgmac_update_stats()
326 hw_stats->tx_jabber_err = hns_mac_reg_read64(drv, XGMAC_TX_PKTS_JABBER); in hns_xgmac_update_stats()
327 hw_stats->tx_good_pkts = hns_mac_reg_read64(drv, XGMAC_TX_GOODPKTS); in hns_xgmac_update_stats()
328 hw_stats->tx_good_bytes = hns_mac_reg_read64(drv, XGMAC_TX_GOODOCTETS); in hns_xgmac_update_stats()
329 hw_stats->tx_total_pkts = hns_mac_reg_read64(drv, XGMAC_TX_TOTAL_PKTS); in hns_xgmac_update_stats()
331 = hns_mac_reg_read64(drv, XGMAC_TX_TOTALOCTETS); in hns_xgmac_update_stats()
332 hw_stats->tx_uc_pkts = hns_mac_reg_read64(drv, XGMAC_TX_UNICASTPKTS); in hns_xgmac_update_stats()
333 hw_stats->tx_mc_pkts = hns_mac_reg_read64(drv, XGMAC_TX_MULTICASTPKTS); in hns_xgmac_update_stats()
334 hw_stats->tx_bc_pkts = hns_mac_reg_read64(drv, XGMAC_TX_BROADCASTPKTS); in hns_xgmac_update_stats()
335 hw_stats->tx_pfc_tc0 = hns_mac_reg_read64(drv, XGMAC_TX_PRI0PAUSEPKTS); in hns_xgmac_update_stats()
336 hw_stats->tx_pfc_tc1 = hns_mac_reg_read64(drv, XGMAC_TX_PRI1PAUSEPKTS); in hns_xgmac_update_stats()
337 hw_stats->tx_pfc_tc2 = hns_mac_reg_read64(drv, XGMAC_TX_PRI2PAUSEPKTS); in hns_xgmac_update_stats()
338 hw_stats->tx_pfc_tc3 = hns_mac_reg_read64(drv, XGMAC_TX_PRI3PAUSEPKTS); in hns_xgmac_update_stats()
339 hw_stats->tx_pfc_tc4 = hns_mac_reg_read64(drv, XGMAC_TX_PRI4PAUSEPKTS); in hns_xgmac_update_stats()
340 hw_stats->tx_pfc_tc5 = hns_mac_reg_read64(drv, XGMAC_TX_PRI5PAUSEPKTS); in hns_xgmac_update_stats()
341 hw_stats->tx_pfc_tc6 = hns_mac_reg_read64(drv, XGMAC_TX_PRI6PAUSEPKTS); in hns_xgmac_update_stats()
342 hw_stats->tx_pfc_tc7 = hns_mac_reg_read64(drv, XGMAC_TX_PRI7PAUSEPKTS); in hns_xgmac_update_stats()
343 hw_stats->tx_ctrl = hns_mac_reg_read64(drv, XGMAC_TX_MACCTRLPKTS); in hns_xgmac_update_stats()
344 hw_stats->tx_1731_pkts = hns_mac_reg_read64(drv, XGMAC_TX_1731PKTS); in hns_xgmac_update_stats()
345 hw_stats->tx_1588_pkts = hns_mac_reg_read64(drv, XGMAC_TX_1588PKTS); in hns_xgmac_update_stats()
347 = hns_mac_reg_read64(drv, XGMAC_RX_FROMAPPGOODPKTS); in hns_xgmac_update_stats()
349 = hns_mac_reg_read64(drv, XGMAC_RX_FROMAPPBADPKTS); in hns_xgmac_update_stats()
350 hw_stats->tx_bad_pkts = hns_mac_reg_read64(drv, XGMAC_TX_ERRALLPKTS); in hns_xgmac_update_stats()
354 = hns_mac_reg_read64(drv, XGMAC_RX_PKTS_FRAGMENT); in hns_xgmac_update_stats()
356 = hns_mac_reg_read64(drv, XGMAC_RX_PKTSUNDERSIZE); in hns_xgmac_update_stats()
358 = hns_mac_reg_read64(drv, XGMAC_RX_PKTS_UNDERMIN); in hns_xgmac_update_stats()
359 hw_stats->rx_64bytes = hns_mac_reg_read64(drv, XGMAC_RX_PKTS_64OCTETS); in hns_xgmac_update_stats()
361 = hns_mac_reg_read64(drv, XGMAC_RX_PKTS_65TO127OCTETS); in hns_xgmac_update_stats()
363 = hns_mac_reg_read64(drv, XGMAC_RX_PKTS_128TO255OCTETS); in hns_xgmac_update_stats()
365 = hns_mac_reg_read64(drv, XGMAC_RX_PKTS_256TO511OCTETS); in hns_xgmac_update_stats()
367 = hns_mac_reg_read64(drv, XGMAC_RX_PKTS_512TO1023OCTETS); in hns_xgmac_update_stats()
369 = hns_mac_reg_read64(drv, XGMAC_RX_PKTS_1024TO1518OCTETS); in hns_xgmac_update_stats()
371 = hns_mac_reg_read64(drv, XGMAC_RX_PKTS_1519TOMAXOCTETS); in hns_xgmac_update_stats()
373 = hns_mac_reg_read64(drv, XGMAC_RX_PKTS_1519TOMAXOCTETSOK); in hns_xgmac_update_stats()
374 hw_stats->rx_oversize = hns_mac_reg_read64(drv, XGMAC_RX_PKTS_OVERSIZE); in hns_xgmac_update_stats()
375 hw_stats->rx_jabber_err = hns_mac_reg_read64(drv, XGMAC_RX_PKTS_JABBER); in hns_xgmac_update_stats()
376 hw_stats->rx_good_pkts = hns_mac_reg_read64(drv, XGMAC_RX_GOODPKTS); in hns_xgmac_update_stats()
377 hw_stats->rx_good_bytes = hns_mac_reg_read64(drv, XGMAC_RX_GOODOCTETS); in hns_xgmac_update_stats()
378 hw_stats->rx_total_pkts = hns_mac_reg_read64(drv, XGMAC_RX_TOTAL_PKTS); in hns_xgmac_update_stats()
380 = hns_mac_reg_read64(drv, XGMAC_RX_TOTALOCTETS); in hns_xgmac_update_stats()
381 hw_stats->rx_uc_pkts = hns_mac_reg_read64(drv, XGMAC_RX_UNICASTPKTS); in hns_xgmac_update_stats()
382 hw_stats->rx_mc_pkts = hns_mac_reg_read64(drv, XGMAC_RX_MULTICASTPKTS); in hns_xgmac_update_stats()
383 hw_stats->rx_bc_pkts = hns_mac_reg_read64(drv, XGMAC_RX_BROADCASTPKTS); in hns_xgmac_update_stats()
384 hw_stats->rx_pfc_tc0 = hns_mac_reg_read64(drv, XGMAC_RX_PRI0PAUSEPKTS); in hns_xgmac_update_stats()
385 hw_stats->rx_pfc_tc1 = hns_mac_reg_read64(drv, XGMAC_RX_PRI1PAUSEPKTS); in hns_xgmac_update_stats()
386 hw_stats->rx_pfc_tc2 = hns_mac_reg_read64(drv, XGMAC_RX_PRI2PAUSEPKTS); in hns_xgmac_update_stats()
387 hw_stats->rx_pfc_tc3 = hns_mac_reg_read64(drv, XGMAC_RX_PRI3PAUSEPKTS); in hns_xgmac_update_stats()
388 hw_stats->rx_pfc_tc4 = hns_mac_reg_read64(drv, XGMAC_RX_PRI4PAUSEPKTS); in hns_xgmac_update_stats()
389 hw_stats->rx_pfc_tc5 = hns_mac_reg_read64(drv, XGMAC_RX_PRI5PAUSEPKTS); in hns_xgmac_update_stats()
390 hw_stats->rx_pfc_tc6 = hns_mac_reg_read64(drv, XGMAC_RX_PRI6PAUSEPKTS); in hns_xgmac_update_stats()
391 hw_stats->rx_pfc_tc7 = hns_mac_reg_read64(drv, XGMAC_RX_PRI7PAUSEPKTS); in hns_xgmac_update_stats()
394 = hns_mac_reg_read64(drv, XGMAC_RX_MACCTRLPKTS); in hns_xgmac_update_stats()
396 = hns_mac_reg_read64(drv, XGMAC_TX_SENDAPPGOODPKTS); in hns_xgmac_update_stats()
398 = hns_mac_reg_read64(drv, XGMAC_TX_SENDAPPBADPKTS); in hns_xgmac_update_stats()
399 hw_stats->rx_1731_pkts = hns_mac_reg_read64(drv, XGMAC_RX_1731PKTS); in hns_xgmac_update_stats()
401 = hns_mac_reg_read64(drv, XGMAC_RX_SYMBOLERRPKTS); in hns_xgmac_update_stats()
402 hw_stats->rx_fcs_err = hns_mac_reg_read64(drv, XGMAC_RX_FCSERRPKTS); in hns_xgmac_update_stats()
411 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_free() local
413 = (struct dsaf_device *)dev_get_drvdata(drv->dev); in hns_xgmac_free()
415 u32 mac_id = drv->mac_id; in hns_xgmac_free()
427 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_get_info() local
430 ctrl_val = dsaf_read_dev(drv, XGMAC_MAC_CONTROL_REG); in hns_xgmac_get_info()
434 pause_time = dsaf_read_dev(drv, XGMAC_MAC_PAUSE_TIME_REG); in hns_xgmac_get_info()
437 port_mode = dsaf_read_dev(drv, XGMAC_PORT_MODE_REG); in hns_xgmac_get_info()
445 pause_ctrl = dsaf_read_dev(drv, XGMAC_MAC_PAUSE_CTRL_REG); in hns_xgmac_get_info()
458 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_get_pausefrm_cfg() local
461 pause_ctrl = dsaf_read_dev(drv, XGMAC_MAC_PAUSE_CTRL_REG); in hns_xgmac_get_pausefrm_cfg()
473 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_get_link_status() local
475 *link_stat = dsaf_read_dev(drv, XGMAC_LINK_STATUS_REG); in hns_xgmac_get_link_status()
486 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_get_regs() local
491 regs[0] = dsaf_read_dev(drv, XGMAC_INT_STATUS_REG); in hns_xgmac_get_regs()
492 regs[1] = dsaf_read_dev(drv, XGMAC_INT_ENABLE_REG); in hns_xgmac_get_regs()
493 regs[2] = dsaf_read_dev(drv, XGMAC_INT_SET_REG); in hns_xgmac_get_regs()
494 regs[3] = dsaf_read_dev(drv, XGMAC_IERR_U_INFO_REG); in hns_xgmac_get_regs()
495 regs[4] = dsaf_read_dev(drv, XGMAC_OVF_INFO_REG); in hns_xgmac_get_regs()
496 regs[5] = dsaf_read_dev(drv, XGMAC_OVF_CNT_REG); in hns_xgmac_get_regs()
497 regs[6] = dsaf_read_dev(drv, XGMAC_PORT_MODE_REG); in hns_xgmac_get_regs()
498 regs[7] = dsaf_read_dev(drv, XGMAC_CLK_ENABLE_REG); in hns_xgmac_get_regs()
499 regs[8] = dsaf_read_dev(drv, XGMAC_RESET_REG); in hns_xgmac_get_regs()
500 regs[9] = dsaf_read_dev(drv, XGMAC_LINK_CONTROL_REG); in hns_xgmac_get_regs()
501 regs[10] = dsaf_read_dev(drv, XGMAC_LINK_STATUS_REG); in hns_xgmac_get_regs()
503 regs[11] = dsaf_read_dev(drv, XGMAC_SPARE_REG); in hns_xgmac_get_regs()
504 regs[12] = dsaf_read_dev(drv, XGMAC_SPARE_CNT_REG); in hns_xgmac_get_regs()
505 regs[13] = dsaf_read_dev(drv, XGMAC_MAC_ENABLE_REG); in hns_xgmac_get_regs()
506 regs[14] = dsaf_read_dev(drv, XGMAC_MAC_CONTROL_REG); in hns_xgmac_get_regs()
507 regs[15] = dsaf_read_dev(drv, XGMAC_MAC_IPG_REG); in hns_xgmac_get_regs()
508 regs[16] = dsaf_read_dev(drv, XGMAC_MAC_MSG_CRC_EN_REG); in hns_xgmac_get_regs()
509 regs[17] = dsaf_read_dev(drv, XGMAC_MAC_MSG_IMG_REG); in hns_xgmac_get_regs()
510 regs[18] = dsaf_read_dev(drv, XGMAC_MAC_MSG_FC_CFG_REG); in hns_xgmac_get_regs()
511 regs[19] = dsaf_read_dev(drv, XGMAC_MAC_MSG_TC_CFG_REG); in hns_xgmac_get_regs()
512 regs[20] = dsaf_read_dev(drv, XGMAC_MAC_PAD_SIZE_REG); in hns_xgmac_get_regs()
513 regs[21] = dsaf_read_dev(drv, XGMAC_MAC_MIN_PKT_SIZE_REG); in hns_xgmac_get_regs()
514 regs[22] = dsaf_read_dev(drv, XGMAC_MAC_MAX_PKT_SIZE_REG); in hns_xgmac_get_regs()
515 regs[23] = dsaf_read_dev(drv, XGMAC_MAC_PAUSE_CTRL_REG); in hns_xgmac_get_regs()
516 regs[24] = dsaf_read_dev(drv, XGMAC_MAC_PAUSE_TIME_REG); in hns_xgmac_get_regs()
517 regs[25] = dsaf_read_dev(drv, XGMAC_MAC_PAUSE_GAP_REG); in hns_xgmac_get_regs()
518 regs[26] = dsaf_read_dev(drv, XGMAC_MAC_PAUSE_LOCAL_MAC_H_REG); in hns_xgmac_get_regs()
519 regs[27] = dsaf_read_dev(drv, XGMAC_MAC_PAUSE_LOCAL_MAC_L_REG); in hns_xgmac_get_regs()
520 regs[28] = dsaf_read_dev(drv, XGMAC_MAC_PAUSE_PEER_MAC_H_REG); in hns_xgmac_get_regs()
521 regs[29] = dsaf_read_dev(drv, XGMAC_MAC_PAUSE_PEER_MAC_L_REG); in hns_xgmac_get_regs()
522 regs[30] = dsaf_read_dev(drv, XGMAC_MAC_PFC_PRI_EN_REG); in hns_xgmac_get_regs()
523 regs[31] = dsaf_read_dev(drv, XGMAC_MAC_1588_CTRL_REG); in hns_xgmac_get_regs()
524 regs[32] = dsaf_read_dev(drv, XGMAC_MAC_1588_TX_PORT_DLY_REG); in hns_xgmac_get_regs()
525 regs[33] = dsaf_read_dev(drv, XGMAC_MAC_1588_RX_PORT_DLY_REG); in hns_xgmac_get_regs()
526 regs[34] = dsaf_read_dev(drv, XGMAC_MAC_1588_ASYM_DLY_REG); in hns_xgmac_get_regs()
527 regs[35] = dsaf_read_dev(drv, XGMAC_MAC_1588_ADJUST_CFG_REG); in hns_xgmac_get_regs()
529 regs[36] = dsaf_read_dev(drv, XGMAC_MAC_Y1731_ETH_TYPE_REG); in hns_xgmac_get_regs()
530 regs[37] = dsaf_read_dev(drv, XGMAC_MAC_MIB_CONTROL_REG); in hns_xgmac_get_regs()
531 regs[38] = dsaf_read_dev(drv, XGMAC_MAC_WAN_RATE_ADJUST_REG); in hns_xgmac_get_regs()
532 regs[39] = dsaf_read_dev(drv, XGMAC_MAC_TX_ERR_MARK_REG); in hns_xgmac_get_regs()
533 regs[40] = dsaf_read_dev(drv, XGMAC_MAC_TX_LF_RF_CONTROL_REG); in hns_xgmac_get_regs()
534 regs[41] = dsaf_read_dev(drv, XGMAC_MAC_RX_LF_RF_STATUS_REG); in hns_xgmac_get_regs()
535 regs[42] = dsaf_read_dev(drv, XGMAC_MAC_TX_RUNT_PKT_CNT_REG); in hns_xgmac_get_regs()
536 regs[43] = dsaf_read_dev(drv, XGMAC_MAC_RX_RUNT_PKT_CNT_REG); in hns_xgmac_get_regs()
537 regs[44] = dsaf_read_dev(drv, XGMAC_MAC_RX_PREAM_ERR_PKT_CNT_REG); in hns_xgmac_get_regs()
538 regs[45] = dsaf_read_dev(drv, XGMAC_MAC_TX_LF_RF_TERM_PKT_CNT_REG); in hns_xgmac_get_regs()
539 regs[46] = dsaf_read_dev(drv, XGMAC_MAC_TX_SN_MISMATCH_PKT_CNT_REG); in hns_xgmac_get_regs()
540 regs[47] = dsaf_read_dev(drv, XGMAC_MAC_RX_ERR_MSG_CNT_REG); in hns_xgmac_get_regs()
541 regs[48] = dsaf_read_dev(drv, XGMAC_MAC_RX_ERR_EFD_CNT_REG); in hns_xgmac_get_regs()
542 regs[49] = dsaf_read_dev(drv, XGMAC_MAC_ERR_INFO_REG); in hns_xgmac_get_regs()
543 regs[50] = dsaf_read_dev(drv, XGMAC_MAC_DBG_INFO_REG); in hns_xgmac_get_regs()
545 regs[51] = dsaf_read_dev(drv, XGMAC_PCS_BASER_SYNC_THD_REG); in hns_xgmac_get_regs()
546 regs[52] = dsaf_read_dev(drv, XGMAC_PCS_STATUS1_REG); in hns_xgmac_get_regs()
547 regs[53] = dsaf_read_dev(drv, XGMAC_PCS_BASER_STATUS1_REG); in hns_xgmac_get_regs()
548 regs[54] = dsaf_read_dev(drv, XGMAC_PCS_BASER_STATUS2_REG); in hns_xgmac_get_regs()
549 regs[55] = dsaf_read_dev(drv, XGMAC_PCS_BASER_SEEDA_0_REG); in hns_xgmac_get_regs()
550 regs[56] = dsaf_read_dev(drv, XGMAC_PCS_BASER_SEEDA_1_REG); in hns_xgmac_get_regs()
551 regs[57] = dsaf_read_dev(drv, XGMAC_PCS_BASER_SEEDB_0_REG); in hns_xgmac_get_regs()
552 regs[58] = dsaf_read_dev(drv, XGMAC_PCS_BASER_SEEDB_1_REG); in hns_xgmac_get_regs()
553 regs[59] = dsaf_read_dev(drv, XGMAC_PCS_BASER_TEST_CONTROL_REG); in hns_xgmac_get_regs()
554 regs[60] = dsaf_read_dev(drv, XGMAC_PCS_BASER_TEST_ERR_CNT_REG); in hns_xgmac_get_regs()
555 regs[61] = dsaf_read_dev(drv, XGMAC_PCS_DBG_INFO_REG); in hns_xgmac_get_regs()
556 regs[62] = dsaf_read_dev(drv, XGMAC_PCS_DBG_INFO1_REG); in hns_xgmac_get_regs()
557 regs[63] = dsaf_read_dev(drv, XGMAC_PCS_DBG_INFO2_REG); in hns_xgmac_get_regs()
558 regs[64] = dsaf_read_dev(drv, XGMAC_PCS_DBG_INFO3_REG); in hns_xgmac_get_regs()
560 regs[65] = dsaf_read_dev(drv, XGMAC_PMA_ENABLE_REG); in hns_xgmac_get_regs()
561 regs[66] = dsaf_read_dev(drv, XGMAC_PMA_CONTROL_REG); in hns_xgmac_get_regs()
562 regs[67] = dsaf_read_dev(drv, XGMAC_PMA_SIGNAL_STATUS_REG); in hns_xgmac_get_regs()
563 regs[68] = dsaf_read_dev(drv, XGMAC_PMA_DBG_INFO_REG); in hns_xgmac_get_regs()
564 regs[69] = dsaf_read_dev(drv, XGMAC_PMA_FEC_ABILITY_REG); in hns_xgmac_get_regs()
565 regs[70] = dsaf_read_dev(drv, XGMAC_PMA_FEC_CONTROL_REG); in hns_xgmac_get_regs()
566 regs[71] = dsaf_read_dev(drv, XGMAC_PMA_FEC_CORR_BLOCK_CNT__REG); in hns_xgmac_get_regs()
567 regs[72] = dsaf_read_dev(drv, XGMAC_PMA_FEC_UNCORR_BLOCK_CNT__REG); in hns_xgmac_get_regs()
576 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_PKTS_FRAGMENT); in hns_xgmac_get_regs()
578 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_PKTS_UNDERSIZE); in hns_xgmac_get_regs()
580 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_PKTS_UNDERMIN); in hns_xgmac_get_regs()
582 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_PKTS_64OCTETS); in hns_xgmac_get_regs()
584 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_PKTS_65TO127OCTETS); in hns_xgmac_get_regs()
586 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_PKTS_128TO255OCTETS); in hns_xgmac_get_regs()
588 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_PKTS_256TO511OCTETS); in hns_xgmac_get_regs()
590 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_PKTS_512TO1023OCTETS); in hns_xgmac_get_regs()
592 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_PKTS_1024TO1518OCTETS); in hns_xgmac_get_regs()
594 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_PKTS_1519TOMAXOCTETS); in hns_xgmac_get_regs()
596 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_PKTS_1519TOMAXOCTETSOK); in hns_xgmac_get_regs()
598 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_PKTS_OVERSIZE); in hns_xgmac_get_regs()
600 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_PKTS_JABBER); in hns_xgmac_get_regs()
602 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_GOODPKTS); in hns_xgmac_get_regs()
604 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_GOODOCTETS); in hns_xgmac_get_regs()
606 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_TOTAL_PKTS); in hns_xgmac_get_regs()
608 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_TOTALOCTETS); in hns_xgmac_get_regs()
610 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_UNICASTPKTS); in hns_xgmac_get_regs()
612 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_MULTICASTPKTS); in hns_xgmac_get_regs()
614 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_BROADCASTPKTS); in hns_xgmac_get_regs()
616 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_PRI0PAUSEPKTS); in hns_xgmac_get_regs()
618 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_PRI1PAUSEPKTS); in hns_xgmac_get_regs()
620 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_PRI2PAUSEPKTS); in hns_xgmac_get_regs()
622 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_PRI3PAUSEPKTS); in hns_xgmac_get_regs()
624 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_PRI4PAUSEPKTS); in hns_xgmac_get_regs()
626 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_PRI5PAUSEPKTS); in hns_xgmac_get_regs()
628 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_PRI6PAUSEPKTS); in hns_xgmac_get_regs()
630 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_PRI7PAUSEPKTS); in hns_xgmac_get_regs()
632 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_MACCTRLPKTS); in hns_xgmac_get_regs()
634 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_1731PKTS); in hns_xgmac_get_regs()
636 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_1588PKTS); in hns_xgmac_get_regs()
638 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_FROMAPPGOODPKTS); in hns_xgmac_get_regs()
640 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_FROMAPPBADPKTS); in hns_xgmac_get_regs()
642 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_ERRALLPKTS); in hns_xgmac_get_regs()
646 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_PKTS_FRAGMENT); in hns_xgmac_get_regs()
648 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_PKTSUNDERSIZE); in hns_xgmac_get_regs()
650 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_PKTS_UNDERMIN); in hns_xgmac_get_regs()
652 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_PKTS_64OCTETS); in hns_xgmac_get_regs()
654 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_PKTS_65TO127OCTETS); in hns_xgmac_get_regs()
656 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_PKTS_128TO255OCTETS); in hns_xgmac_get_regs()
658 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_PKTS_256TO511OCTETS); in hns_xgmac_get_regs()
660 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_PKTS_512TO1023OCTETS); in hns_xgmac_get_regs()
662 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_PKTS_1024TO1518OCTETS); in hns_xgmac_get_regs()
664 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_PKTS_1519TOMAXOCTETS); in hns_xgmac_get_regs()
666 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_PKTS_1519TOMAXOCTETSOK); in hns_xgmac_get_regs()
668 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_PKTS_OVERSIZE); in hns_xgmac_get_regs()
670 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_PKTS_JABBER); in hns_xgmac_get_regs()
672 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_GOODPKTS); in hns_xgmac_get_regs()
674 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_GOODOCTETS); in hns_xgmac_get_regs()
676 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_TOTAL_PKTS); in hns_xgmac_get_regs()
678 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_TOTALOCTETS); in hns_xgmac_get_regs()
680 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_UNICASTPKTS); in hns_xgmac_get_regs()
682 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_MULTICASTPKTS); in hns_xgmac_get_regs()
684 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_BROADCASTPKTS); in hns_xgmac_get_regs()
686 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_PRI0PAUSEPKTS); in hns_xgmac_get_regs()
688 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_PRI1PAUSEPKTS); in hns_xgmac_get_regs()
690 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_PRI2PAUSEPKTS); in hns_xgmac_get_regs()
692 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_PRI3PAUSEPKTS); in hns_xgmac_get_regs()
694 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_PRI4PAUSEPKTS); in hns_xgmac_get_regs()
696 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_PRI5PAUSEPKTS); in hns_xgmac_get_regs()
698 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_PRI6PAUSEPKTS); in hns_xgmac_get_regs()
700 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_PRI7PAUSEPKTS); in hns_xgmac_get_regs()
703 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_MACCTRLPKTS); in hns_xgmac_get_regs()
705 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_SENDAPPGOODPKTS); in hns_xgmac_get_regs()
707 qtmp = hns_mac_reg_read64(drv, XGMAC_TX_SENDAPPBADPKTS); in hns_xgmac_get_regs()
709 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_1731PKTS); in hns_xgmac_get_regs()
711 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_SYMBOLERRPKTS); in hns_xgmac_get_regs()
713 qtmp = hns_mac_reg_read64(drv, XGMAC_RX_FCSERRPKTS); in hns_xgmac_get_regs()
730 struct mac_driver *drv = (struct mac_driver *)mac_drv; in hns_xgmac_get_stats() local
733 hw_stats = &drv->mac_cb->hw_stats; in hns_xgmac_get_stats()