Lines Matching refs:portn

37 	uint8_t portn;
49 portn = NXGE_GET_PORT_NUM(nxgep->function_num);
51 NXGE_DEBUG_MSG((nxgep, IPP_CTL, "==> nxge_ipp_init: port%d", portn));
57 if (portn < 2)
67 portn, i, 0, 0, 0, 0, 0)) != NPI_SUCCESS)
69 if ((rs = npi_ipp_read_dfifo(handle, portn,
75 if ((rs = npi_ipp_get_status(handle, portn, &istatus)) != NPI_SUCCESS)
77 if ((rs = npi_ipp_get_status(handle, portn, &istatus)) != NPI_SUCCESS)
84 if ((rs = npi_ipp_reset(handle, portn)) != NPI_SUCCESS)
88 IPP_REG_RD(nxgep->npi_handle, portn, IPP_ECC_ERR_COUNTER_REG, &val);
89 IPP_REG_RD(nxgep->npi_handle, portn, IPP_BAD_CKSUM_ERR_CNT_REG, &val);
90 IPP_REG_RD(nxgep->npi_handle, portn, IPP_DISCARD_PKT_CNT_REG, &val);
92 if ((rs = npi_ipp_get_status(handle, portn, &istatus)) != NPI_SUCCESS)
96 if ((rs = npi_ipp_iconfig(handle, INIT, portn, ICFG_IPP_ALL))
103 if ((rs = npi_ipp_config(handle, INIT, portn, config)) != NPI_SUCCESS)
109 if ((rs = npi_ipp_set_max_pktsize(handle, portn,
114 NXGE_DEBUG_MSG((nxgep, IPP_CTL, "<== nxge_ipp_init: port%d", portn));
120 portn));
128 uint8_t portn;
136 portn = NXGE_GET_PORT_NUM(nxgep->function_num);
138 NXGE_DEBUG_MSG((nxgep, IPP_CTL, "==> nxge_ipp_disable: port%d", portn));
144 (void) npi_ipp_get_dfifo_rd_ptr(handle, portn, &rd_ptr);
145 (void) npi_ipp_get_dfifo_wr_ptr(handle, portn, &wr_ptr);
149 (void) npi_ipp_get_dfifo_rd_ptr(handle, portn, &rd_ptr);
150 (void) npi_ipp_get_dfifo_wr_ptr(handle, portn, &wr_ptr);
158 " rd_fifo != wr_fifo", portn));
165 portn, config)) != NPI_SUCCESS)
169 if ((rs = npi_ipp_reset(handle, portn)) != NPI_SUCCESS)
172 NXGE_DEBUG_MSG((nxgep, IPP_CTL, "<== nxge_ipp_disable: port%d", portn));
176 "nxge_ipp_disable: Fail to disable IPP Port #%d\n", portn));
184 uint8_t portn;
192 portn = NXGE_GET_PORT_NUM(nxgep->function_num);
194 NXGE_DEBUG_MSG((nxgep, IPP_CTL, "==> nxge_ipp_reset: port%d", portn));
199 portn, config)) != NPI_SUCCESS)
205 (void) npi_ipp_get_dfifo_rd_ptr(handle, portn, &rd_ptr);
206 (void) npi_ipp_get_dfifo_wr_ptr(handle, portn, &wr_ptr);
210 (void) npi_ipp_get_dfifo_rd_ptr(handle, portn, &rd_ptr);
211 (void) npi_ipp_get_dfifo_wr_ptr(handle, portn, &wr_ptr);
219 " rd_fifo != wr_fifo", portn));
225 if ((rs = npi_ipp_reset(handle, portn)) != NPI_SUCCESS) {
230 if ((rs = npi_zcp_rest_cfifo_port(handle, portn)) != NPI_SUCCESS)
237 IPP_REG_WR(handle, portn, IPP_ECC_CTRL_REG, 0);
239 NXGE_DEBUG_MSG((nxgep, IPP_CTL, "<== nxge_ipp_reset: port%d", portn));
244 portn));
252 uint8_t portn;
259 portn = NXGE_GET_PORT_NUM(nxgep->function_num);
261 NXGE_DEBUG_MSG((nxgep, IPP_CTL, "==> nxge_ipp_enable: port%d", portn));
265 if ((rs = npi_ipp_config(handle, INIT, portn, config)) != NPI_SUCCESS)
271 if ((rs = npi_ipp_set_max_pktsize(handle, portn,
276 NXGE_DEBUG_MSG((nxgep, IPP_CTL, "<== nxge_ipp_enable: port%d", portn));
280 "nxge_ipp_init: Fail to Enable IPP Port #%d\n", portn));
288 uint8_t portn;
295 portn = NXGE_GET_PORT_NUM(nxgep->function_num);
297 NXGE_DEBUG_MSG((nxgep, IPP_CTL, "==> nxge_ipp_drain: port%d", portn));
302 (void) npi_ipp_get_dfifo_rd_ptr(handle, portn, &rd_ptr);
303 (void) npi_ipp_get_dfifo_wr_ptr(handle, portn, &wr_ptr);
307 (void) npi_ipp_get_dfifo_rd_ptr(handle, portn, &rd_ptr);
308 (void) npi_ipp_get_dfifo_wr_ptr(handle, portn, &wr_ptr);
316 " rd_fifo != wr_fifo", portn));
321 NXGE_DEBUG_MSG((nxgep, IPP_CTL, "<== nxge_ipp_drain: port%d", portn));
325 "Fail to Reset IPP Port #%d\n", portn));
337 uint8_t portn;
346 portn = nxgep->mac.portnum;
350 if ((rs = npi_ipp_get_status(handle, portn, &istatus)) != NPI_SUCCESS)
362 if ((rs = npi_ipp_get_dfifo_eopm_rdptr(handle, portn,
365 if ((rs = npi_ipp_get_state_mach(handle, portn,
368 NXGE_FM_REPORT_ERROR(nxgep, portn, NULL,
377 if ((rs = npi_ipp_get_dfifo_eopm_rdptr(handle, portn,
380 if ((rs = npi_ipp_get_state_mach(handle, portn,
383 NXGE_FM_REPORT_ERROR(nxgep, portn, NULL,
398 if ((rs = npi_ipp_get_ecc_syndrome(handle, portn,
401 NXGE_FM_REPORT_ERROR(nxgep, portn, NULL,
410 NXGE_FM_REPORT_ERROR(nxgep, portn, NULL,
420 NXGE_FM_REPORT_ERROR(nxgep, portn, NULL,
430 NXGE_FM_REPORT_ERROR(nxgep, portn, NULL,
447 (void) npi_ipp_get_cs_err_count(handle, portn, &cnt16);
459 (void) npi_ipp_get_pkt_dis_count(handle, portn, &cnt16);
467 (void) npi_ipp_get_ecc_err_count(handle, portn, &cnt8);
476 if (portn != 2) {
477 NXGE_FM_REPORT_ERROR(nxgep, portn, NULL,
490 IPP_REG_WR(handle, portn, IPP_ECC_CTRL_REG, 0);
495 " fatal Error on Port #%d\n", portn));
510 uint8_t portn = nxgep->mac.portnum;
520 IPP_REG_WR(nxgep->npi_handle, portn, IPP_ECC_CTRL_REG,
531 IPP_REG_WR(nxgep->npi_handle, portn, IPP_ECC_CTRL_REG,
544 IPP_REG_RD(nxgep->npi_handle, portn, IPP_INT_STATUS_REG,
563 IPP_REG_WR(nxgep->npi_handle, portn,
575 IPP_REG_WR(nxgep->npi_handle, portn,
583 IPP_REG_WR(nxgep->npi_handle, portn,
588 IPP_REG_WR(nxgep->npi_handle, portn, IPP_INT_STATUS_REG,
601 uint8_t portn;
615 portn = nxgep->mac.portnum;
621 IPP_REG_WR(handle, portn, IPP_ECC_CTRL_REG, 0);
629 NXGE_DEBUG_MSG((nxgep, IPP_CTL, "port%d Reset ZCP CFIFO...", portn));
630 if ((rs = npi_zcp_rest_cfifo_port(handle, portn)) != NPI_SUCCESS)
636 (void) npi_ipp_get_dfifo_rd_ptr(handle, portn, &rd_ptr);
637 (void) npi_ipp_get_dfifo_wr_ptr(handle, portn, &wr_ptr);
641 (void) npi_ipp_get_dfifo_rd_ptr(handle, portn, &rd_ptr);
642 (void) npi_ipp_get_dfifo_wr_ptr(handle, portn, &wr_ptr);
650 portn, rd_ptr, wr_ptr));
661 if (portn < 2)
671 if ((rs = npi_ipp_write_dfifo(handle, portn,
674 if ((rs = npi_ipp_read_dfifo(handle, portn, i,
680 if ((rs = npi_ipp_get_status(handle, portn, &istatus)) != NPI_SUCCESS)
682 if ((rs = npi_ipp_get_status(handle, portn, &istatus)) != NPI_SUCCESS)
686 NXGE_DEBUG_MSG((nxgep, IPP_CTL, "port%d Reset IPP...", portn));
687 if ((rs = npi_ipp_reset(handle, portn)) != NPI_SUCCESS)
690 NXGE_DEBUG_MSG((nxgep, IPP_CTL, "port%d Reset RxMAC...", portn));
694 NXGE_DEBUG_MSG((nxgep, IPP_CTL, "port%d Initialize RxMAC...", portn));
698 NXGE_DEBUG_MSG((nxgep, IPP_CTL, "port%d Enable RxMAC...", portn));
727 uint8_t portn;
736 portn = nxgep->mac.portnum;
739 if ((rs = npi_ipp_get_dfifo_rd_ptr(handle, portn, &rd_ptr))
742 if ((rs = npi_ipp_get_dfifo_wr_ptr(handle, portn, &wr_ptr))
757 portn, &curr_rd_ptr)) != NPI_SUCCESS)
760 portn, &curr_wr_ptr)) != NPI_SUCCESS)
778 if ((rs = npi_ipp_read_dfifo(handle, portn, rd_ptr,