Troubles with VIA VX900 chipset
Alexander Motin
mav at FreeBSD.org
Fri Oct 25 06:45:05 UTC 2013
Hi.
On 24.10.2013 16:56, Alexandre Martins wrote:
> We have seen some issues with the VIA VX900 chipset. The main trouble is that
> some SATA hard drive are not seen by the kernel (BIOS and boot-loader are OK).
>
> After investigations, it seems that during the initialisation of the
> controler, some reset commands are send via "ata_via_sata_reset" fonction.
> Into the chipset documentation, there is a warning about successive reset
> commands, and software must waiting the "BUSY" flag is clear, before send
> another reset. I have added a "DELAY(10000)" between the second call of
> "ata_sata_phy_reset" and the call of "ata_generic_reset" and the problem
> disapear.
>
> I also made a more complex fix which check the "BUSY" flag.
>
> Which fix of delai checking is the better one ?
One that sleeps less IMO should be better. Blocking system in a tight
loop is not good.
But still some comments:
- ATA devices often want to spinup before reporting !BUSY, that may
take up to 10 seconds, not 10 milliseconds, if you really want to get
exactly !BUSY, not just wait a bit;
- Waiting for readiness if phy reset found no device is probably
pointless.
- I would reduce polling interval -- 1ms is quite a lot.
--
Alexander Motin
More information about the freebsd-current
mailing list