Lines Matching refs:rc

80 	enum _ecore_status_t rc = ECORE_INVAL;  in ecore_phy_core_write()  local
85 return rc; in ecore_phy_core_write()
89 rc = ecore_phy_write(p_hwfn, p_ptt, port, 0 /* lane */, addr, data_lo, in ecore_phy_core_write()
91 if (rc == ECORE_SUCCESS) in ecore_phy_core_write()
97 return rc; in ecore_phy_core_write()
104 enum _ecore_status_t rc = ECORE_INVAL; in ecore_phy_core_read() local
112 return rc; in ecore_phy_core_read()
116 rc = ecore_phy_read(p_hwfn, p_ptt, port, 0 /* lane */ , addr, in ecore_phy_core_read()
118 if (rc == ECORE_SUCCESS) { in ecore_phy_core_read()
127 return rc; in ecore_phy_core_read()
135 enum _ecore_status_t rc = ECORE_INVAL; in ecore_phy_raw_write() local
141 return rc; in ecore_phy_raw_write()
148 return rc; in ecore_phy_raw_write()
152 rc = ecore_phy_write(p_hwfn,p_ptt, port, lane, addr, data_lo, in ecore_phy_raw_write()
154 if (rc == ECORE_SUCCESS) in ecore_phy_raw_write()
160 return rc; in ecore_phy_raw_write()
167 enum _ecore_status_t rc = ECORE_INVAL; in ecore_phy_raw_read() local
176 return rc; in ecore_phy_raw_read()
183 return rc; in ecore_phy_raw_read()
187 rc = ecore_phy_read(p_hwfn,p_ptt, port, lane, addr, ECORE_PHY_RAW_READ, in ecore_phy_raw_read()
189 if (rc == ECORE_SUCCESS) { in ecore_phy_raw_read()
199 return rc; in ecore_phy_raw_read()
220 enum _ecore_status_t rc = ECORE_INVAL; in ecore_phy_info() local
287 return rc; in ecore_phy_info()
292 rc = ecore_phy_read(p_hwfn, p_ptt, port, 0, SERDESID, in ecore_phy_info()
294 if (rc == ECORE_SUCCESS) { in ecore_phy_info()
315 rc = ECORE_SUCCESS; in ecore_phy_info()
318 return rc; in ecore_phy_info()
589 enum _ecore_status_t rc = ECORE_INVAL; in ecore_bb_phy_mac_stat() local
596 rc = ecore_phy_read(p_hwfn, p_ptt, port, 0 /*lane*/, addr, in ecore_bb_phy_mac_stat()
602 if (rc == ECORE_SUCCESS) { in ecore_bb_phy_mac_stat()
625 return rc; in ecore_bb_phy_mac_stat()
689 static int ecore_sfp_set_error(enum _ecore_status_t rc, u32 offset, in ecore_sfp_set_error() argument
692 if (rc != ECORE_SUCCESS) { in ecore_sfp_set_error()
693 if (rc == ECORE_NODEV) in ecore_sfp_set_error()
703 return rc; in ecore_sfp_set_error()
735 enum _ecore_status_t rc; in ecore_validate_sfp_parameters() local
738 rc = ecore_validate_sfp_port(p_hwfn, p_ptt, port, p_phy_result_buf); in ecore_validate_sfp_parameters()
739 if (rc != ECORE_SUCCESS) in ecore_validate_sfp_parameters()
740 return rc; in ecore_validate_sfp_parameters()
765 return rc; in ecore_validate_sfp_parameters()
773 enum _ecore_status_t rc; in ecore_phy_sfp_write() local
775 rc = ecore_validate_sfp_parameters(p_hwfn, p_ptt, port, addr, in ecore_phy_sfp_write()
777 if (rc == ECORE_SUCCESS) in ecore_phy_sfp_write()
779 rc = ecore_mcp_phy_sfp_write(p_hwfn, p_ptt, port, addr, in ecore_phy_sfp_write()
782 if (rc != ECORE_SUCCESS) in ecore_phy_sfp_write()
783 return ecore_sfp_set_error(rc, 0, p_phy_result_buf, in ecore_phy_sfp_write()
790 return rc; in ecore_phy_sfp_write()
798 enum _ecore_status_t rc; in ecore_phy_sfp_read() local
801 rc = ecore_validate_sfp_parameters(p_hwfn, p_ptt, port, addr, in ecore_phy_sfp_read()
803 if (rc == ECORE_SUCCESS) in ecore_phy_sfp_read()
808 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, addr, in ecore_phy_sfp_read()
810 if (rc != ECORE_SUCCESS) in ecore_phy_sfp_read()
811 return ecore_sfp_set_error(rc, 0, p_phy_result_buf, in ecore_phy_sfp_read()
819 return rc; in ecore_phy_sfp_read()
840 enum _ecore_status_t rc; in ecore_decode_sfp_info() local
845 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, I2C_TRANSCEIVER_ADDR, in ecore_decode_sfp_info()
847 if (rc != ECORE_SUCCESS) in ecore_decode_sfp_info()
848 return ecore_sfp_set_error(rc, length, p_phy_result_buf, in ecore_decode_sfp_info()
860 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, in ecore_decode_sfp_info()
862 if (rc != ECORE_SUCCESS) in ecore_decode_sfp_info()
863 return ecore_sfp_set_error(rc, length, in ecore_decode_sfp_info()
890 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, in ecore_decode_sfp_info()
892 if (rc != ECORE_SUCCESS) in ecore_decode_sfp_info()
893 return ecore_sfp_set_error(rc, length, in ecore_decode_sfp_info()
922 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, in ecore_decode_sfp_info()
925 if (rc != ECORE_SUCCESS) in ecore_decode_sfp_info()
926 return ecore_sfp_set_error(rc, length, in ecore_decode_sfp_info()
957 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, in ecore_decode_sfp_info()
959 if (rc != ECORE_SUCCESS) in ecore_decode_sfp_info()
960 return ecore_sfp_set_error(rc, length, in ecore_decode_sfp_info()
981 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, I2C_TRANSCEIVER_ADDR, in ecore_decode_sfp_info()
983 if (rc != ECORE_SUCCESS) in ecore_decode_sfp_info()
984 return ecore_sfp_set_error(rc, length, p_phy_result_buf, in ecore_decode_sfp_info()
1001 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, I2C_TRANSCEIVER_ADDR, in ecore_decode_sfp_info()
1003 if (rc != ECORE_SUCCESS) in ecore_decode_sfp_info()
1004 return ecore_sfp_set_error(rc, length, p_phy_result_buf, in ecore_decode_sfp_info()
1012 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, I2C_TRANSCEIVER_ADDR, in ecore_decode_sfp_info()
1014 if (rc != ECORE_SUCCESS) in ecore_decode_sfp_info()
1015 return ecore_sfp_set_error(rc, length, p_phy_result_buf, in ecore_decode_sfp_info()
1023 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, I2C_TRANSCEIVER_ADDR, in ecore_decode_sfp_info()
1025 if (rc != ECORE_SUCCESS) in ecore_decode_sfp_info()
1026 return ecore_sfp_set_error(rc, length, p_phy_result_buf, in ecore_decode_sfp_info()
1034 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, I2C_TRANSCEIVER_ADDR, in ecore_decode_sfp_info()
1036 if (rc != ECORE_SUCCESS) in ecore_decode_sfp_info()
1037 return ecore_sfp_set_error(rc, length, p_phy_result_buf, in ecore_decode_sfp_info()
1044 return rc; in ecore_decode_sfp_info()
1065 enum _ecore_status_t rc; in ecore_decode_qsfp_info() local
1068 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, I2C_TRANSCEIVER_ADDR, in ecore_decode_qsfp_info()
1070 if (rc != ECORE_SUCCESS) in ecore_decode_qsfp_info()
1071 return ecore_sfp_set_error(rc, length, p_phy_result_buf, in ecore_decode_qsfp_info()
1132 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, in ecore_decode_qsfp_info()
1134 if (rc != ECORE_SUCCESS) in ecore_decode_qsfp_info()
1135 return ecore_sfp_set_error(rc, length, p_phy_result_buf, in ecore_decode_qsfp_info()
1199 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, I2C_TRANSCEIVER_ADDR, in ecore_decode_qsfp_info()
1201 if (rc != ECORE_SUCCESS) in ecore_decode_qsfp_info()
1202 return ecore_sfp_set_error(rc, length, p_phy_result_buf, in ecore_decode_qsfp_info()
1221 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, I2C_TRANSCEIVER_ADDR, in ecore_decode_qsfp_info()
1223 if (rc != ECORE_SUCCESS) in ecore_decode_qsfp_info()
1224 return ecore_sfp_set_error(rc, length, p_phy_result_buf, in ecore_decode_qsfp_info()
1232 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, I2C_TRANSCEIVER_ADDR, in ecore_decode_qsfp_info()
1234 if (rc != ECORE_SUCCESS) in ecore_decode_qsfp_info()
1235 return ecore_sfp_set_error(rc, length, p_phy_result_buf, in ecore_decode_qsfp_info()
1243 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, I2C_TRANSCEIVER_ADDR, in ecore_decode_qsfp_info()
1245 if (rc != ECORE_SUCCESS) in ecore_decode_qsfp_info()
1246 return ecore_sfp_set_error(rc, length, p_phy_result_buf, in ecore_decode_qsfp_info()
1254 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, I2C_TRANSCEIVER_ADDR, in ecore_decode_qsfp_info()
1256 if (rc != ECORE_SUCCESS) in ecore_decode_qsfp_info()
1257 return ecore_sfp_set_error(rc, length, p_phy_result_buf, in ecore_decode_qsfp_info()
1264 return rc; in ecore_decode_qsfp_info()
1271 enum _ecore_status_t rc; in ecore_phy_sfp_decode() local
1276 rc = ecore_validate_sfp_port(p_hwfn, p_ptt, port, p_phy_result_buf); in ecore_phy_sfp_decode()
1277 if (rc != ECORE_SUCCESS) in ecore_phy_sfp_decode()
1278 return rc; in ecore_phy_sfp_decode()
1280 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, I2C_TRANSCEIVER_ADDR, in ecore_phy_sfp_decode()
1282 if (rc != ECORE_SUCCESS) in ecore_phy_sfp_decode()
1283 return ecore_sfp_set_error(rc, length, p_phy_result_buf, in ecore_phy_sfp_decode()
1290 rc = ecore_decode_sfp_info(p_hwfn, p_ptt, port, in ecore_phy_sfp_decode()
1296 rc = ecore_decode_qsfp_info(p_hwfn, p_ptt, port, in ecore_phy_sfp_decode()
1302 rc = ecore_decode_qsfp_info(p_hwfn, p_ptt, port, in ecore_phy_sfp_decode()
1308 rc = ecore_decode_qsfp_info(p_hwfn, p_ptt, port, in ecore_phy_sfp_decode()
1314 rc = ECORE_UNKNOWN_ERROR; in ecore_phy_sfp_decode()
1319 rc = ECORE_UNKNOWN_ERROR; in ecore_phy_sfp_decode()
1323 return rc; in ecore_phy_sfp_decode()
1355 enum _ecore_status_t rc; in ecore_phy_sfp_get_txdisable() local
1360 rc = ecore_validate_sfp_port(p_hwfn, p_ptt, port, p_phy_result_buf); in ecore_phy_sfp_get_txdisable()
1361 if (rc != ECORE_SUCCESS) in ecore_phy_sfp_get_txdisable()
1362 return rc; in ecore_phy_sfp_get_txdisable()
1364 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, I2C_TRANSCEIVER_ADDR, in ecore_phy_sfp_get_txdisable()
1366 if (rc != ECORE_SUCCESS) in ecore_phy_sfp_get_txdisable()
1367 return ecore_sfp_set_error(rc, length, p_phy_result_buf, in ecore_phy_sfp_get_txdisable()
1372 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, in ecore_phy_sfp_get_txdisable()
1374 if (rc != ECORE_SUCCESS) in ecore_phy_sfp_get_txdisable()
1375 return ecore_sfp_set_error(rc, length, p_phy_result_buf, in ecore_phy_sfp_get_txdisable()
1383 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, in ecore_phy_sfp_get_txdisable()
1385 if (rc != ECORE_SUCCESS) in ecore_phy_sfp_get_txdisable()
1386 return ecore_sfp_set_error(rc, length, p_phy_result_buf, in ecore_phy_sfp_get_txdisable()
1394 rc = ECORE_UNKNOWN_ERROR; in ecore_phy_sfp_get_txdisable()
1398 return rc; in ecore_phy_sfp_get_txdisable()
1407 enum _ecore_status_t rc; in ecore_phy_sfp_set_txdisable() local
1419 rc = ecore_validate_sfp_port(p_hwfn, p_ptt, port, in ecore_phy_sfp_set_txdisable()
1421 if (rc != ECORE_SUCCESS) in ecore_phy_sfp_set_txdisable()
1422 return rc; in ecore_phy_sfp_set_txdisable()
1424 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, I2C_TRANSCEIVER_ADDR, in ecore_phy_sfp_set_txdisable()
1426 if (rc != ECORE_SUCCESS) in ecore_phy_sfp_set_txdisable()
1427 return ecore_sfp_set_error(rc, length, p_phy_result_buf, in ecore_phy_sfp_set_txdisable()
1432 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, in ecore_phy_sfp_set_txdisable()
1435 if (rc != ECORE_SUCCESS) in ecore_phy_sfp_set_txdisable()
1436 return ecore_sfp_set_error(rc, length, p_phy_result_buf, in ecore_phy_sfp_set_txdisable()
1441 rc = ecore_mcp_phy_sfp_write(p_hwfn, p_ptt, port, in ecore_phy_sfp_set_txdisable()
1445 if (rc != ECORE_SUCCESS) in ecore_phy_sfp_set_txdisable()
1465 rc = ecore_phy_gpio_write(p_hwfn, p_ptt, gpio, in ecore_phy_sfp_set_txdisable()
1468 if (rc != ECORE_SUCCESS) in ecore_phy_sfp_set_txdisable()
1476 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, in ecore_phy_sfp_set_txdisable()
1479 if (rc != ECORE_SUCCESS) in ecore_phy_sfp_set_txdisable()
1480 return ecore_sfp_set_error(rc, length, in ecore_phy_sfp_set_txdisable()
1485 rc = ecore_mcp_phy_sfp_write(p_hwfn, p_ptt, port, in ecore_phy_sfp_set_txdisable()
1489 if (rc != ECORE_SUCCESS) in ecore_phy_sfp_set_txdisable()
1497 rc = ECORE_UNKNOWN_ERROR; in ecore_phy_sfp_set_txdisable()
1501 return rc; in ecore_phy_sfp_set_txdisable()
1509 enum _ecore_status_t rc; in ecore_phy_sfp_get_txreset() local
1514 rc = ecore_validate_sfp_port(p_hwfn, p_ptt, port, p_phy_result_buf); in ecore_phy_sfp_get_txreset()
1515 if (rc != ECORE_SUCCESS) in ecore_phy_sfp_get_txreset()
1516 return rc; in ecore_phy_sfp_get_txreset()
1518 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, I2C_TRANSCEIVER_ADDR, in ecore_phy_sfp_get_txreset()
1520 if (rc != ECORE_SUCCESS) in ecore_phy_sfp_get_txreset()
1521 return ecore_sfp_set_error(rc, length, p_phy_result_buf, in ecore_phy_sfp_get_txreset()
1526 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, in ecore_phy_sfp_get_txreset()
1529 if (rc != ECORE_SUCCESS) in ecore_phy_sfp_get_txreset()
1530 return ecore_sfp_set_error(rc, length, p_phy_result_buf, in ecore_phy_sfp_get_txreset()
1538 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, in ecore_phy_sfp_get_txreset()
1541 if (rc != ECORE_SUCCESS) in ecore_phy_sfp_get_txreset()
1542 return ecore_sfp_set_error(rc, length, p_phy_result_buf, in ecore_phy_sfp_get_txreset()
1550 rc = ECORE_UNKNOWN_ERROR; in ecore_phy_sfp_get_txreset()
1554 return rc; in ecore_phy_sfp_get_txreset()
1562 enum _ecore_status_t rc; in ecore_phy_sfp_get_rxlos() local
1567 rc = ecore_validate_sfp_port(p_hwfn, p_ptt, port, p_phy_result_buf); in ecore_phy_sfp_get_rxlos()
1568 if (rc != ECORE_SUCCESS) in ecore_phy_sfp_get_rxlos()
1569 return rc; in ecore_phy_sfp_get_rxlos()
1571 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, I2C_TRANSCEIVER_ADDR, in ecore_phy_sfp_get_rxlos()
1573 if (rc != ECORE_SUCCESS) in ecore_phy_sfp_get_rxlos()
1574 return ecore_sfp_set_error(rc, length, p_phy_result_buf, in ecore_phy_sfp_get_rxlos()
1579 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, in ecore_phy_sfp_get_rxlos()
1582 if (rc != ECORE_SUCCESS) in ecore_phy_sfp_get_rxlos()
1583 return ecore_sfp_set_error(rc, length, p_phy_result_buf, in ecore_phy_sfp_get_rxlos()
1591 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, in ecore_phy_sfp_get_rxlos()
1594 if (rc != ECORE_SUCCESS) in ecore_phy_sfp_get_rxlos()
1595 return ecore_sfp_set_error(rc, length, p_phy_result_buf, in ecore_phy_sfp_get_rxlos()
1603 rc = ECORE_UNKNOWN_ERROR; in ecore_phy_sfp_get_rxlos()
1607 return rc; in ecore_phy_sfp_get_rxlos()
1615 enum _ecore_status_t rc; in ecore_phy_sfp_get_eeprom() local
1619 rc = ecore_validate_sfp_port(p_hwfn, p_ptt, port, p_phy_result_buf); in ecore_phy_sfp_get_eeprom()
1620 if (rc != ECORE_SUCCESS) in ecore_phy_sfp_get_eeprom()
1621 return rc; in ecore_phy_sfp_get_eeprom()
1623 rc = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt, port, I2C_TRANSCEIVER_ADDR, in ecore_phy_sfp_get_eeprom()
1625 if (rc != ECORE_SUCCESS) in ecore_phy_sfp_get_eeprom()
1626 return ecore_sfp_set_error(rc, 0, p_phy_result_buf, in ecore_phy_sfp_get_eeprom()
1634 rc = ecore_phy_sfp_read(p_hwfn, p_ptt, port, in ecore_phy_sfp_get_eeprom()
1642 rc = ECORE_UNKNOWN_ERROR; in ecore_phy_sfp_get_eeprom()
1646 return rc; in ecore_phy_sfp_get_eeprom()
1653 enum _ecore_status_t rc; in ecore_phy_gpio_write() local
1655 rc = ecore_mcp_gpio_write(p_hwfn, p_ptt, gpio, gpio_val); in ecore_phy_gpio_write()
1657 if (rc == ECORE_SUCCESS) in ecore_phy_gpio_write()
1665 return rc; in ecore_phy_gpio_write()
1672 enum _ecore_status_t rc; in ecore_phy_gpio_read() local
1675 rc = ecore_mcp_gpio_read(p_hwfn, p_ptt, gpio, &param); in ecore_phy_gpio_read()
1677 if (rc == ECORE_SUCCESS) in ecore_phy_gpio_read()
1683 return rc; in ecore_phy_gpio_read()
1691 enum _ecore_status_t rc; in ecore_phy_gpio_info() local
1693 rc = ecore_mcp_gpio_info(p_hwfn, p_ptt, gpio, &direction, &ctrl); in ecore_phy_gpio_info()
1695 if (rc != ECORE_SUCCESS) { in ecore_phy_gpio_info()
1698 return rc; in ecore_phy_gpio_info()
1734 enum _ecore_status_t rc; in ecore_phy_extphy_read() local
1738 rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_EXT_PHY_READ, in ecore_phy_extphy_read()
1745 if ((rc != ECORE_SUCCESS) || (resp_cmd != FW_MSG_CODE_PHY_OK)) { in ecore_phy_extphy_read()
1748 return rc; in ecore_phy_extphy_read()
1759 enum _ecore_status_t rc; in ecore_phy_extphy_write() local
1763 rc = ecore_mcp_nvm_wr_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_EXT_PHY_WRITE, in ecore_phy_extphy_write()
1772 if ((rc != ECORE_SUCCESS) || (resp_cmd != FW_MSG_CODE_PHY_OK)) { in ecore_phy_extphy_write()
1775 return rc; in ecore_phy_extphy_write()