回覆: [PATCH net v2] net: mdio: aspeed: Add dummy read for fire control

Jacky Chou jacky_chou at aspeedtech.com
Tue Nov 19 21:45:31 PST 2024


Hi Andrew Jeffery,

Thank you for your reply.

> > When the command bus is sometimes busy, it may cause the command is
> > not arrived to MDIO controller immediately. On software, the driver
> > issues a write command to the command bus does not wait for command
> > complete and it returned back to code immediately. But a read command
> > will wait for the data back, once a read command was back indicates
> > the previous write command had arrived to controller.
> > Add a dummy read to ensure triggering mdio controller before starting
> > polling the status of mdio controller to avoid polling unexpected
> > timeout.
> 
> Why use the explicit dummy read rather than adjust the poll interval or
> duration? I still don't think that's been adequately explained given the
> hardware-clear of the fire bit on completion, which is what we're polling for.

We cannot know exactly what the timeout value of polling should be set to.
Because no one could know when the write command has arrived MDIO controller.

A dummy read can ensure the previous write command had arrived MDIO controller
Therefore, we chose to use a dummy read instead of increasing the timeout value.

Thanks,
Jacky


More information about the linux-arm-kernel mailing list