diff options
Diffstat (limited to 'drivers/net/sfc/mcdi_pcol.h')
| -rw-r--r-- | drivers/net/sfc/mcdi_pcol.h | 71 |
1 files changed, 55 insertions, 16 deletions
diff --git a/drivers/net/sfc/mcdi_pcol.h b/drivers/net/sfc/mcdi_pcol.h index bd59302695b3..90359e644006 100644 --- a/drivers/net/sfc/mcdi_pcol.h +++ b/drivers/net/sfc/mcdi_pcol.h | |||
| @@ -863,7 +863,7 @@ | |||
| 863 | * bist output. The driver should only consume the BIST output | 863 | * bist output. The driver should only consume the BIST output |
| 864 | * after validating OUTLEN and PHY_CFG.PHY_TYPE. | 864 | * after validating OUTLEN and PHY_CFG.PHY_TYPE. |
| 865 | * | 865 | * |
| 866 | * If a driver can't succesfully parse the BIST output, it should | 866 | * If a driver can't successfully parse the BIST output, it should |
| 867 | * still respect the pass/Fail in OUT.RESULT | 867 | * still respect the pass/Fail in OUT.RESULT |
| 868 | * | 868 | * |
| 869 | * Locks required: PHY_LOCK if doing a PHY BIST | 869 | * Locks required: PHY_LOCK if doing a PHY BIST |
| @@ -872,7 +872,7 @@ | |||
| 872 | #define MC_CMD_POLL_BIST 0x26 | 872 | #define MC_CMD_POLL_BIST 0x26 |
| 873 | #define MC_CMD_POLL_BIST_IN_LEN 0 | 873 | #define MC_CMD_POLL_BIST_IN_LEN 0 |
| 874 | #define MC_CMD_POLL_BIST_OUT_LEN UNKNOWN | 874 | #define MC_CMD_POLL_BIST_OUT_LEN UNKNOWN |
| 875 | #define MC_CMD_POLL_BIST_OUT_SFT9001_LEN 40 | 875 | #define MC_CMD_POLL_BIST_OUT_SFT9001_LEN 36 |
| 876 | #define MC_CMD_POLL_BIST_OUT_MRSFP_LEN 8 | 876 | #define MC_CMD_POLL_BIST_OUT_MRSFP_LEN 8 |
| 877 | #define MC_CMD_POLL_BIST_OUT_RESULT_OFST 0 | 877 | #define MC_CMD_POLL_BIST_OUT_RESULT_OFST 0 |
| 878 | #define MC_CMD_POLL_BIST_RUNNING 1 | 878 | #define MC_CMD_POLL_BIST_RUNNING 1 |
| @@ -882,15 +882,14 @@ | |||
| 882 | /* Generic: */ | 882 | /* Generic: */ |
| 883 | #define MC_CMD_POLL_BIST_OUT_PRIVATE_OFST 4 | 883 | #define MC_CMD_POLL_BIST_OUT_PRIVATE_OFST 4 |
| 884 | /* SFT9001-specific: */ | 884 | /* SFT9001-specific: */ |
| 885 | /* (offset 4 unused?) */ | 885 | #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_A_OFST 4 |
| 886 | #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_A_OFST 8 | 886 | #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_B_OFST 8 |
| 887 | #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_B_OFST 12 | 887 | #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_C_OFST 12 |
| 888 | #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_C_OFST 16 | 888 | #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_D_OFST 16 |
| 889 | #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_D_OFST 20 | 889 | #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_A_OFST 20 |
| 890 | #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_A_OFST 24 | 890 | #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_B_OFST 24 |
| 891 | #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_B_OFST 28 | 891 | #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_C_OFST 28 |
| 892 | #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_C_OFST 32 | 892 | #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_D_OFST 32 |
| 893 | #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_D_OFST 36 | ||
| 894 | #define MC_CMD_POLL_BIST_SFT9001_PAIR_OK 1 | 893 | #define MC_CMD_POLL_BIST_SFT9001_PAIR_OK 1 |
| 895 | #define MC_CMD_POLL_BIST_SFT9001_PAIR_OPEN 2 | 894 | #define MC_CMD_POLL_BIST_SFT9001_PAIR_OPEN 2 |
| 896 | #define MC_CMD_POLL_BIST_SFT9001_INTRA_PAIR_SHORT 3 | 895 | #define MC_CMD_POLL_BIST_SFT9001_INTRA_PAIR_SHORT 3 |
| @@ -1054,9 +1053,13 @@ | |||
| 1054 | /* MC_CMD_PHY_STATS: | 1053 | /* MC_CMD_PHY_STATS: |
| 1055 | * Get generic PHY statistics | 1054 | * Get generic PHY statistics |
| 1056 | * | 1055 | * |
| 1057 | * This call returns the statistics for a generic PHY, by direct DMA | 1056 | * This call returns the statistics for a generic PHY in a sparse |
| 1058 | * into host memory, in a sparse array (indexed by the enumerate). | 1057 | * array (indexed by the enumerate). Each value is represented by |
| 1059 | * Each value is represented by a 32bit number. | 1058 | * a 32bit number. |
| 1059 | * | ||
| 1060 | * If the DMA_ADDR is 0, then no DMA is performed, and the statistics | ||
| 1061 | * may be read directly out of shared memory. If DMA_ADDR != 0, then | ||
| 1062 | * the statistics are dmad to that (page-aligned location) | ||
| 1060 | * | 1063 | * |
| 1061 | * Locks required: None | 1064 | * Locks required: None |
| 1062 | * Returns: 0, ETIME | 1065 | * Returns: 0, ETIME |
| @@ -1066,7 +1069,8 @@ | |||
| 1066 | #define MC_CMD_PHY_STATS_IN_LEN 8 | 1069 | #define MC_CMD_PHY_STATS_IN_LEN 8 |
| 1067 | #define MC_CMD_PHY_STATS_IN_DMA_ADDR_LO_OFST 0 | 1070 | #define MC_CMD_PHY_STATS_IN_DMA_ADDR_LO_OFST 0 |
| 1068 | #define MC_CMD_PHY_STATS_IN_DMA_ADDR_HI_OFST 4 | 1071 | #define MC_CMD_PHY_STATS_IN_DMA_ADDR_HI_OFST 4 |
| 1069 | #define MC_CMD_PHY_STATS_OUT_LEN 0 | 1072 | #define MC_CMD_PHY_STATS_OUT_DMA_LEN 0 |
| 1073 | #define MC_CMD_PHY_STATS_OUT_NO_DMA_LEN (MC_CMD_PHY_NSTATS * 4) | ||
| 1070 | 1074 | ||
| 1071 | /* Unified MAC statistics enumeration */ | 1075 | /* Unified MAC statistics enumeration */ |
| 1072 | #define MC_CMD_MAC_GENERATION_START 0 | 1076 | #define MC_CMD_MAC_GENERATION_START 0 |
| @@ -1158,11 +1162,13 @@ | |||
| 1158 | #define MC_CMD_MAC_STATS_CMD_CLEAR_WIDTH 1 | 1162 | #define MC_CMD_MAC_STATS_CMD_CLEAR_WIDTH 1 |
| 1159 | #define MC_CMD_MAC_STATS_CMD_PERIODIC_CHANGE_LBN 2 | 1163 | #define MC_CMD_MAC_STATS_CMD_PERIODIC_CHANGE_LBN 2 |
| 1160 | #define MC_CMD_MAC_STATS_CMD_PERIODIC_CHANGE_WIDTH 1 | 1164 | #define MC_CMD_MAC_STATS_CMD_PERIODIC_CHANGE_WIDTH 1 |
| 1161 | /* Fields only relevent when PERIODIC_CHANGE is set */ | 1165 | /* Remaining PERIOD* fields only relevent when PERIODIC_CHANGE is set */ |
| 1162 | #define MC_CMD_MAC_STATS_CMD_PERIODIC_ENABLE_LBN 3 | 1166 | #define MC_CMD_MAC_STATS_CMD_PERIODIC_ENABLE_LBN 3 |
| 1163 | #define MC_CMD_MAC_STATS_CMD_PERIODIC_ENABLE_WIDTH 1 | 1167 | #define MC_CMD_MAC_STATS_CMD_PERIODIC_ENABLE_WIDTH 1 |
| 1164 | #define MC_CMD_MAC_STATS_CMD_PERIODIC_CLEAR_LBN 4 | 1168 | #define MC_CMD_MAC_STATS_CMD_PERIODIC_CLEAR_LBN 4 |
| 1165 | #define MC_CMD_MAC_STATS_CMD_PERIODIC_CLEAR_WIDTH 1 | 1169 | #define MC_CMD_MAC_STATS_CMD_PERIODIC_CLEAR_WIDTH 1 |
| 1170 | #define MC_CMD_MAC_STATS_CMD_PERIODIC_NOEVENT_LBN 5 | ||
| 1171 | #define MC_CMD_MAC_STATS_CMD_PERIODIC_NOEVENT_WIDTH 1 | ||
| 1166 | #define MC_CMD_MAC_STATS_CMD_PERIOD_MS_LBN 16 | 1172 | #define MC_CMD_MAC_STATS_CMD_PERIOD_MS_LBN 16 |
| 1167 | #define MC_CMD_MAC_STATS_CMD_PERIOD_MS_WIDTH 16 | 1173 | #define MC_CMD_MAC_STATS_CMD_PERIOD_MS_WIDTH 16 |
| 1168 | #define MC_CMD_MAC_STATS_IN_DMA_LEN_OFST 12 | 1174 | #define MC_CMD_MAC_STATS_IN_DMA_LEN_OFST 12 |
| @@ -1729,6 +1735,39 @@ | |||
| 1729 | #define MC_CMD_MRSFP_TWEAK_OUT_IOEXP_OUTPUTS_OFST 4 /* output bits */ | 1735 | #define MC_CMD_MRSFP_TWEAK_OUT_IOEXP_OUTPUTS_OFST 4 /* output bits */ |
| 1730 | #define MC_CMD_MRSFP_TWEAK_OUT_IOEXP_DIRECTION_OFST 8 /* dirs: 0=out, 1=in */ | 1736 | #define MC_CMD_MRSFP_TWEAK_OUT_IOEXP_DIRECTION_OFST 8 /* dirs: 0=out, 1=in */ |
| 1731 | 1737 | ||
| 1738 | /* MC_CMD_TEST_HACK: (debug (unsurprisingly)) | ||
| 1739 | * Change bits of network port state for test purposes in ways that would never be | ||
| 1740 | * useful in normal operation and so need a special command to change. */ | ||
| 1741 | #define MC_CMD_TEST_HACK 0x2f | ||
| 1742 | #define MC_CMD_TEST_HACK_IN_LEN 8 | ||
| 1743 | #define MC_CMD_TEST_HACK_IN_TXPAD_OFST 0 | ||
| 1744 | #define MC_CMD_TEST_HACK_IN_TXPAD_AUTO 0 /* Let the MC manage things */ | ||
| 1745 | #define MC_CMD_TEST_HACK_IN_TXPAD_ON 1 /* Force on */ | ||
| 1746 | #define MC_CMD_TEST_HACK_IN_TXPAD_OFF 2 /* Force on */ | ||
| 1747 | #define MC_CMD_TEST_HACK_IN_IPG_OFST 4 /* Takes a value in bits */ | ||
| 1748 | #define MC_CMD_TEST_HACK_IN_IPG_AUTO 0 /* The MC picks the value */ | ||
| 1749 | #define MC_CMD_TEST_HACK_OUT_LEN 0 | ||
| 1750 | |||
| 1751 | /* MC_CMD_SENSOR_SET_LIMS: (debug) (mostly) adjust the sensor limits. This | ||
| 1752 | * is a warranty-voiding operation. | ||
| 1753 | * | ||
| 1754 | * IN: sensor identifier (one of the enumeration starting with MC_CMD_SENSOR_CONTROLLER_TEMP | ||
| 1755 | * followed by 4 32-bit values: min(warning) max(warning), min(fatal), max(fatal). Which | ||
| 1756 | * of these limits are meaningful and what their interpretation is is sensor-specific. | ||
| 1757 | * | ||
| 1758 | * OUT: nothing | ||
| 1759 | * | ||
| 1760 | * Returns: ENOENT if the sensor specified does not exist, EINVAL if the limits are | ||
| 1761 | * out of range. | ||
| 1762 | */ | ||
| 1763 | #define MC_CMD_SENSOR_SET_LIMS 0x4e | ||
| 1764 | #define MC_CMD_SENSOR_SET_LIMS_IN_LEN 20 | ||
| 1765 | #define MC_CMD_SENSOR_SET_LIMS_IN_SENSOR_OFST 0 | ||
| 1766 | #define MC_CMD_SENSOR_SET_LIMS_IN_LOW0_OFST 4 | ||
| 1767 | #define MC_CMD_SENSOR_SET_LIMS_IN_HI0_OFST 8 | ||
| 1768 | #define MC_CMD_SENSOR_SET_LIMS_IN_LOW1_OFST 12 | ||
| 1769 | #define MC_CMD_SENSOR_SET_LIMS_IN_HI1_OFST 16 | ||
| 1770 | |||
| 1732 | /* Do NOT add new commands beyond 0x4f as part of 3.0 : 0x50 - 0x7f will be | 1771 | /* Do NOT add new commands beyond 0x4f as part of 3.0 : 0x50 - 0x7f will be |
| 1733 | * used for post-3.0 extensions. If you run out of space, look for gaps or | 1772 | * used for post-3.0 extensions. If you run out of space, look for gaps or |
| 1734 | * commands that are unused in the existing range. */ | 1773 | * commands that are unused in the existing range. */ |
