> From: Jörg Sommer <joerg@xxxxxxxx> > Sent: Tuesday, January 7, 2025 2:14 PM > To: Pieter Van Trappen <pieter.van.trappen@xxxxxxx> > Cc: Christian Eggers <ceggers@xxxxxxx>; Jakub Kicinski <kuba@xxxxxxxxxx>; Tristram > Ha - C24268 <Tristram.Ha@xxxxxxxxxxxxx>; Woojung Huh - C21699 > <Woojung.Huh@xxxxxxxxxxxxx>; netdev@xxxxxxxxxxxxxxx; linux-spi@xxxxxxxxxxxxxxx; > Andrew Lunn <andrew@xxxxxxx> > Subject: Re: KSZ8795 not detected at start to boot from NFS > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content > is safe It is perfectly okay to remove the code as KSZ switches are not limited to SPI mode 3. Generally they work for SPI modes 0, 2, and 3. This SPI access problem is caused by the SPI bus driver. In certain kernel versions the Atmel SPI bus driver has this problem. There is a workaround for that but the fix occurs in the main SPI bus driver, not the Atmel sub-driver. This problem does not occur in latest kernels and I do not know which part of SPI driver fixed the behavior. The problem is the very first SPI access after kernel boots is not recognized by the chip and so it does not return any value. This is probably caused by the SPI chip select signal not setting properly because of polarity. A workaround is to read the chip again or just use SPI mode 0, which starts with low level instead of high level.