Subject: Re: Trouble with SCSI writes on M700(asc.c)
To: None <port-arc@netbsd.org>
From: Michael 'Maki' Kato <mk2s@digitalcommute.com>
List: port-arc
Date: 06/10/2000 14:27:00
I'll answer my own questions since I think I now understand a bit more.

What's supposed to happen next is the DMA controller pushes out data to the 
scsi controller, and when the TC(transfer count - a register in the scsi 
controller) reaches the previously set number the scsi controller generates 
the appropriate interrupt to the processor, and the state machine moves to 
the next state.

The problem I was having was that my controller was being detected as a 
53C94, but in fact it's a FAS216 wich is more like a 53CF94.  The difference 
includes 24bit transfer counter vs. 16bin transfer counter for the 53C94.

fixing the code to detect the controller fixed the trasfercounter being set 
incorrectly which fixed the intrrupt from not happening which fixed my scsi 
write stalls.

It's all good now:)  I'm one step closer.

....maki....


>  I'm trying to get my Olivetti M700 running NetBSD.  I'm at the point where 
>I can mount a root partition and run commands from the shell.  I'm running 
>NetBSD-Current that's a few weeks old.  I cross compile from an Intel box.
>
>  The problem I'm having is that the operation of writing to disk is 
hanging.  
>I seem to be able to read fine, but when I write the machine stalls.
>
>  I've turned on the debug printouts in asc, and the last few things I see 
>when I run the command 'disklabel -r -R sd0' are
>
>asc_startcmd: asc0 target 1 cmd a len 8192
>asc_intr: status 80 ss c4 ir 18 cond 3:18
>asc_dma_out: buflen 8192, len 8192
>
>I believe at least 512 bytes are written since when I reboot my machine, 
some 
>changes to the disk are evident.( eg. when I run fdisk, I see the partition 
>type change )
>
>  I have a lot of questions, but if anyone can offer any help for the 
>following I would be grateful.
>
>  What's supposed to happen next in the above sequence?  I think I should 
get 
>an interrupt back from the scsi controller when the dma is done.  Is this 
>correct?  The code seems to look like the device driver is not asking for an 
>interrupt from the R4030 DMA controller when it is done, is this correct?  
>Anyone running this code on a similar machine such as Magnum4000?  How do I 
>figure out these kind of problems?
>
>  Thanks for reading, any help is appreciated
>
>....maki....
>
>