Skip to content

Commit f2f62b0

Browse files
robi251kartben
authored andcommitted
drivers: dm8806: smi bus error check
SMI bus error check mechanism is preventing the host SMI bus to be interferred by noise on board level. Current implementation is checking if data which is writing to/reading from the PHY has correct CRC sum. If not, then writing/rading process is repeated by the number of attempts defined in the KConfig. If repeating transmission will fail by the numbers of ettemps defined in KConfing, drivers returns an error. Signed-off-by: Robert Slawinski <[email protected]>
1 parent 9a236f8 commit f2f62b0

File tree

3 files changed

+355
-105
lines changed

3 files changed

+355
-105
lines changed

drivers/ethernet/phy/Kconfig.dm8806

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,25 @@ config PHY_DM8806_THREAD_STACK_SIZE
4646
help
4747
Stack size of thread used by the driver to handle interrupts.
4848

49-
endif # PHY_DM8806_TRIGGER
49+
config PHY_DM8806_SMI_BUS_CHECK
50+
bool "Host SMI bus error check function"
51+
default y
52+
help
53+
This functionality prevents the host SMI bus to be interferered by the
54+
noise on board-level. During write procedure, the written value in
55+
register will be applied until the correct checksum is written. In read
56+
procedure, the hardware calculated checksum is compared with the software
57+
calculated one to detect correctness of received data.
58+
59+
config PHY_DM8806_SMI_BUS_CHECK_REPETITION
60+
int "SMI bus transmission repetitions"
61+
depends on PHY_DM8806_SMI_BUS_CHECK
62+
default 5
63+
help
64+
The numbers of SMI bus transmission repetition in case if CRC checksum
65+
fails during read or write. After this numbers of repetition, the reading
66+
message is dropped and will not be passed to the system. In write
67+
procedure, the written value in register will be applied until the correct
68+
checksum is written to the PHY register.
69+
70+
endif # PHY_DM8806

0 commit comments

Comments
 (0)