Message ID | 20220826105634.3855578-9-o.rempel@pengutronix.de (mailing list archive) |
---|---|
State | Accepted |
Commit | b5708dc6539d7630b4ddbd9f72a74280630770b8 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: dsa: microchip: add error handling and register access validation | expand |
diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c index f60ceaf25a66c..fb9de6b447b12 100644 --- a/drivers/net/dsa/microchip/ksz9477.c +++ b/drivers/net/dsa/microchip/ksz9477.c @@ -193,6 +193,11 @@ int ksz9477_reset_switch(struct ksz_device *dev) ksz_write32(dev, REG_SW_PORT_INT_MASK__4, 0x7F); ksz_read32(dev, REG_SW_PORT_INT_STATUS__4, &data32); + /* KSZ9893 compatible chips do not support refclk configuration */ + if (dev->chip_id == KSZ9893_CHIP_ID || + dev->chip_id == KSZ8563_CHIP_ID) + return 0; + data8 = SW_ENABLE_REFCLKO; if (dev->synclko_disable) data8 = 0;