Re: [PATCH net-next 8/8] net: dsa: mv88e6xxx: fail on mismatching probe

From: Andrew Lunn
Date: Wed Jun 08 2016 - 22:21:56 EST


On Wed, Jun 08, 2016 at 08:44:56PM -0400, Vivien Didelot wrote:
> Now that we have access at probe time to the chip info described in the
> device tree, check if the probed device matches the device node,
> otherwise warn the user and fail.

What good is this? So what if the device tree says a different
model. We don't care, we don't use that information at all, we read it
from the device itself.

The only thing that might make sense to check is the number of ports
in device tree against what we know the switch has. I don't think we
currently do this. But that actually requires a new method in the
driver structure, so the core can ask the driver after probe how many
ports it has.

Andrew