This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DP83867IR: Same data read from TDR result registers

Part Number: DP83867IR

Hello,

I'm currently in the process of updating the DP83867 driver to incorporate Time Domain Reflectometry (TDR) functionality. However, I've encountered an issue during testing. Regardless of how many times I run the test using 'ethtool --cable-test eno1', the results retrieved from the registers remain consistent, even after trying different cables.

Here's a snippet of the code I'm working with:

ret = phy_read(phydev, DP83867_TDR_PEAKS_LOC_8);
	if(ret < 0)
		return ret;

	printk("DP83867_TDR_PEAKS_LOC_8: %d", ret);

	matrix[0][0] = (ret & DP83867_TDR_PEAKS_LOC_8_D_0_MASK) >> DP83867_TDR_PEAKS_LOC_8_D_0_SHIFT;

	ret = phy_read(phydev, DP83867_TDR_PEAKS_LOC_9);
	if (ret < 0)
		return ret;

	printk("DP83867_TDR_PEAKS_LOC_9: %d", ret);

	matrix[1][0] = ret & DP83867_TDR_PEAKS_LOC_9_D_1_MASK;
	matrix[2][0] = (ret & DP83867_TDR_PEAKS_LOC_9_D_2_MASK) >> DP83867_TDR_PEAKS_LOC_9_D_2_SHIFT;

	ret = phy_read(phydev, DP83867_TDR_PEAKS_LOC_10);
	if (ret < 0)
		return ret;

Any insights or suggestions on resolving this issue would be greatly appreciated. Thank you in advance for your help.

kind regards,

Mart

  • Hi Mart,

    What result are you seeing? Is it possible to do manual register reads to verify there are distinct peak_val values across different cables?

    Thank you,

    Evan

  • Hi Evan,

    Thanks for your responses

    I added some print statements to the driver, here is a screenshot of the results. Everytime I rerun the test i get the same values from the registers. I already tried different cables but these give the same results.

  • Hi Mart,

    Is the phy_read() function able to access registers in extended MMD space?

    If not, you will need to incorporate or find a function that performs extended register procedure shown in this FAQ in order to access TDR registers (Read (No Post Increment) Operation).

    I recommend validating this function by reading any register past address 0x32 and confirming the default value is returned.

    Thank you,

    Evan