Thread (88 messages) 88 messages, 9 authors, 2022-02-01

Re: [PATCH net-next v4 05/11] net: dsa: realtek: use phy_read in ds->ops

From: Andrew Lunn <andrew@lunn.ch>
Date: 2022-01-21 23:49:05

Should I submit a patch to make dsa work like this then?

dsa_switch_setup() {
        ....
        ds->ops->setup()
        ....
        if (ds->ops->phy_read) {
              if (ds->slave_mii_bus)
                    error("ds->ops->phy_read is set, I should be the
one allocating ds->slave_mii_bus!")
              ...allocate and register ds->slave_mii_bus...
        }
}
You could add a WARN_ON(ds->ops->phy_read && ds->ops->phy_read);

    Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help