Re: [PATCH net-next 1/2] net: phy: phy-c45: add OATC14 10BASE-T1S PHY cable diagnostic support
From: Andrew Lunn
Date: Tue Nov 04 2025 - 10:49:44 EST
> +/* Bus Short/Open Status:
> + * 0 0 - no fault; everything is ok. (Default)
> + * 0 1 - detected as an open or missing termination(s)
> + * 1 0 - detected as a short or extra termination(s)
> + * 1 1 - fault but fault type not detectable. More details can be available by
> + * vender specific register if supported.
> + */
> +enum oatc14_hdd_status {
> + OATC14_HDD_STATUS_CABLE_OK,
> + OATC14_HDD_STATUS_OPEN,
> + OATC14_HDD_STATUS_SHORT,
> + OATC14_HDD_STATUS_NOT_DETECTABLE,
You frequently see the first enum has an = 0 at the end. I don't know
what the C standard allows the compiler to do, in terms of assigning
values to these enums, but it won't work if it uses 42, 43, 44, 45.
etc.
Otherwise, this looks O.K.
Andrew