RE: L68K: Re: IDE-Driver Update :: Testing Requested (fwd)

Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be)
Tue, 25 Aug 1998 23:24:50 +0200 (CEST)


---------- Forwarded message ----------
Date: Tue, 25 Aug 1998 10:05:39 -0700 (PDT)
From: Michael Schmitz <SCHMITZ@LCBVAX.CCHEM.BERKELEY.EDU>
To: Geert.Uytterhoeven@cs.kuleuven.ac.be
Cc: linux-m68k@lists.linux-m68k.org
Subject: RE: L68K: Re: IDE-Driver Update :: Testing Requested

Hi,

>> >[ Moving the discussion to linux-kernel.
>>
>> Forgot to CC: there.
>
>Deliberately?

Nah - just hit return too fast on the cc: line (I have to fill cc: manually each
time).

>> >| bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
>>
>> What's happening here? Polling for reset to complete? Why is set_handler() called
>> that often? But that may be normal - it's just so different from the pattern before
>> (aA or bB, never X or other unexpected things)
>
>The reset code installs a handler with a 50 ms time out. It is restarted until
>the drive responds or until 30 seconds are passed.

Ok, that explains it. And the driver can't send more than one request to each
drive (or on each hwif). Missing one interrupt on B would cause the driver to stal
and time out.

>> >Add more debugging code, to remember when the last request was posted. I don't
>> >have the log here (forgot to save it after reboot[*]), but here are the facts:
>> >
>> > - at jiffies = 18779, set_handler() calls add_timer() with an expiration
>> > time of 19779 (i.e. jiffies+10*HZ)
>> > - ide_timer_expiry() is called at jiffies = 18779 (i.e. immediately), while
>> > hwgroup->timer.expires still contains 19779 (i.e. future)
>> >
>> >So ide_timer_expiry() is called before the timer expires.

Can you add code to ide_timer_expiry to check for that case, and just restart the
timeout? Just to make sure this would fix the IDE behaviour and to get more stats
on the problem (how often, making sure it's not a jiffy overflow thing though that
didn't seem likely, check that IDE doesn't hang later for another reason, does it
only happen when copying a -> b?).

>> >Could it be m68k related?
>>
>> Maybe - what's the interrupt priority of timer and IDE on other machines?
>
>I don't know. On Amiga, IDE is level 2. The timer uses CIA B timer A, which is
>level 6.

On Atari, timer is a MFP int which is also pretty high IIRC. But I don't know what
exact level. Anyway, timer interrupts shouldn't be blocked by IDE in your case.
And 10 seconds is too much for a 'timer set in the past' race (which shouldn't be
possible anyway). I'm clueless.

I have no second IDE disk, so I can't test it. Any Falcon (or Mac) user with 2
IDE disks out there ??

Michael

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html