I am testing an ethernet driver for dm6446 and find an issue. In the transmit-interrupt-handler function of the ethernet driver for dm6446 device (function called after tx interrupt occurs), we check the ownership bit to verify that the descriptor has indeed been returned to the driver. Based on whether the ownership is returned back to the driver, the descriptor (memory) can be made re-usable.
The issue is that a certain delay before or immediately after setting the head-pointer register with the current descriptor's address causes the ownership to be reflected correctly.
This delay seems to be a hack to make the transmit part of the driver work. Why is this necessary?
Please help.
Thank you.
PS: The delay is not coded in the reference driver for dm6446 emac (in lxr).