[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Mac SE/30 -- "Error writing /target/etc/fstab"



> > I'm new to Linux, but have programmed in Pascal, C and assembler on the PC
> > (not professionally though).
> Me, 4 years ago: I was new to Linux, but had programmed in basic, fortran, C
> and assembler on the Amiga/C64, not professionally though.
> Nevertheless last christmas I succeeded fixing/backporting the first drivers
> for Linux-m68k. 
 
> I wonder how many "professionals" are hacking on linux?

Quite a number of Linux hackers are CS students, so future 'professionals'. 
Some people helping on the Mac port were professionals, to the extent that I
got a very detailed description of the ADB wire protocol from an analyzer
session when I wrote the first ADB driver. 
 
> > I'd be interested in helping if I can.
> You can.

Yep, install a crosscompiler on your Intel machine, get the current stable 
kernel from cvs.mac.linux-m68k.org (it's 2.2.10 IIRC) and start working with 
drivers/scsi/mac_scsinew.c and drivers/scsi/NCR5380.c. The SE/30 has a NMI
switch, and the kernel should pause on pressing this switch, resume the next
time the switch is pressed (see arch/m68k/mac/macints.c). This NMI function
can be used to read status information from the SCSI driver (sample code for
this should be in there) or do just about anything you like. I'd start by
experimenting with the driver queue depth, or adding a separate 'no
disconnect' flag (see mac5380_setup() in mac_scsinew.c). If reducing the 
queue depth solves the problem, chances are the time spent for each command 
just is too long, and optimizing data transfers would help. If disabling 
disconnects fixes the problem, there's a race condition in the driver which 
is harder to find. 

Optimizing data transfers can be done by using the obscure hardware
handshake feature of the Mac 5380 implementation. For this to work without 
bad effects like random bus errors, the data read or write code needs to be 
done similar to the copy_to/from_user functions (assembly; install a
temporary replacement for the buserror handler while talking to the
controller). Judged from how copy_from_user is used elsewhere in the kernel,
this should be possible while enabling interrupts which is a a good idea in
case the NCR5380 has something to tell us. 

I can give you more details on these issues if you are interested. I can
even give you sample code. What I can't do is compile or test this myself
because I don't have a Mac. 

Please subscribe to linux-mac68k@mac.linux-m68k.org for discussion of Mac
kernel development issues.

	Michael


Reply to: