Subject: SCSI driver

From: Stefan Hanske <[email-masked]>
Date: Fri, 12 Jun 1998 19:11:09 +0200 (METDST)

Hi,

I've tried to write a scsi driver for my ARXE 16-bit SCSI card ( no 
problem, it uses the well known fas216 chip in pseudo_dma mode, but has 
no interrupts so you need to poll it yourself until command is completed) 
and came along some very strange things.

Reading works very fine, when probing the bus fas216-driver complains 
about "incomplete data transfer detected..." (as usual in fasdma_pio 
mode) but all works well.

The strange things happen when WRITE is enabled & done. If you've got a 
writable partition (ext2, msdos...) on your scsi disc, you savely can 
copy to/from the scsi disc.
e2fsck & mke2fs return some error like "Kernel stack corrupted. Aiee!!!"
which is true (believe me, I'm happy if I still can shutdown) and 
tar makes the kernel hang with interrupts enabled (cursor still flashes, 
vt switching works, but you can't do anything else). 

I've checked my code over and over again and it's most unlikely that
there's something wrong since it uses all the same routines for read & 
writes and ONLY the actual transfer (r/w bytes from mem/chip) is done 
separately, the datapointers are updated by the same routine again. So I 
came to the conclusion that there are two possibilities left:

1.) Buggy scsi highlevel driver (which is mostly arch independent)
2.) Buggy highlevel-lowlevel driver interface

I'm using kernel v2.0.33 with patches from around 15-04-1998. Anybody's 
got some help???

(I've just downloaded the most recent kernel patches and will try again 
if that's what you'd answer.)

----------------------------------------------------------
|mailto: Stefan Hanske ([email-masked] |
|WWW : http://www.rzuser.uni-heidelberg.de/~shanske      |
|phone: I'm not silly                                    |
|--------------------------------------------------------|
| And don't forget to remember what you remembered not   |
| to forget to remember...				 |
----------------------------------------------------------

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]