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
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to