On Fri, Oct 24, 2003 at 04:00:10PM -0500, Richard Smith wrote:
Steve Gehlbach wrote:
Also added ERR bit checking after PIO commands. None of the above causes ERR, but the first READ_SECTORS command does. (error register = 0x4, ABORT error)
I noticed this Caviar drive works just fine under Linux (both 2.4 and 2.6-test), regardless of whether FILO touched it or not.
Takeshi-
I tried the same thing and I got the same result, and I also noticed the error bit is set. What is going on is very strange, but it does seem to be related to initialization and startup. I don't think it is the read commands or status loops; I tried modifying these to match the old code but got the same result.
I have tried all other differences I could see. READ_MULTI instead of READ_SECTORS, outb_p instead of outb, setting feature (precomp) register to 0xff, checking BSY (and DRDY) bit just before writing command register, etc.. but still unsuccessfull.
Maybe we are missing stupidly minor difference.
Perhaps some startup timeing requirement is being violated? HD drives do lots of self calibration stuff when you boot or reset them. I remember some older drives were really flaky. Not playing well with other drives and such. Perhaps you are tring to access it while its still in temp comp or head drift cal and not ready to do a seek.
Indeed, this drive takes longer on spin-up (but BSY is low and IDENTIFY takes time) and device diagnostic command, as compared to recent drives. But our driver properly waits for these to be done using status bits.
A previous COTS bios that I used had a startup delay parameter just for HD delay before the first access to the drive. I never needed it since a CF is ready almost instantly.
Hardcoded delay is needed if the drive doesn't assert BSY bit while spin-up.