> > +static void ksz9477_phy_setup(struct ksz_device *dev, int port, > > + struct phy_device *phy) > > +{ > > + if (port < dev->phy_port_cnt) { > > + /* SUPPORTED_Asym_Pause and SUPPORTED_Pause can be > removed to > > + * disable flow control when rate limiting is used. > > + */ > > + } > > Hi Tristram > > Is this meant to be a TODO comment? > > What is supposed to happen here is that all forms of pause are disable > by default. The MAC driver needs to enable what it supports by calling > phy_support_sym_pause() or phy_support_asym_pause(). > > Ah, is this because there is not a real PHY driver?
The kernel has been changed so I am not sure about the current behavior. I would like to turn on flow control by default. Before I just assigned "supported" to "advertising." I know linkmode_copy is being used now for that. But last time I checked "advertising" is already the same as "supported." There will be a situation that flow control should not be turned on as the switch uses bandwidth control to limit outgoing traffic. The issue is actually becoming more complex as KSZ9477 has a variant which does not support gigabit speed, although the same PHY device id is being used. That means the driver has to fake it by returning a different id and also registering a different PHY driver to handle that. Marketing also likes to display the correct chip name during kernel booting so that users do not get confused.