Subject: Re: More on se0
To: Julian Coleman <>
From: Leo Weppelman <>
List: port-atari
Date: 08/10/1998 11:26:47
On Sat 08 Aug 1998, Julian Coleman wrote:
[ ... ]
> 		handle_message()
> This is where I think the problem is.  In ncr5380_scsi_cmd() (file
> ... src/sys/arch/atari/dev/ncr5380.c), there are the lines :
> 	run_main(xs->sc_link->adaptor_softc);
> 	if (xs->flags & SCSI_POLL|ITSDONE)
> 		return (COMPLETE);
> Back in scsipi_execute_xs() (file ... src/sys/dev/scsipi/scsipi_base.c),
> returning 'SUCESSFULLY_QUEUED' causes :
> 		...
> 		tsleep (xs, PRIBIO + 1, "scsipi_cmd", 0);
> causing ifconfig to sleep on wait channel 'scsipi_cmd'.  Unfortunately,
> it never gets woken up, so I don't get the prompt back :(

In a normal running system, 'SUCESSFULLY_QUEUED' is the normal return value
of ncr5380.c:ncr5380_scsi_cmd(). It more or less means that the command is
started and that the higher level driver will be told when it's done. The
higher level correctly free's the CPU (by calling tsleep() -
scsipi_base.c:scsipi_execute_xs()) and waits for a wakeup() call that is
located in scsipi_base.c:scsipi_done(). The latter function is called from

The million dollar question is: why doesn't the wakeup happen? The only
thing I can think of to debug this is adding printf's to scsipi_execute_xs()
and scsipi_done() (for the se-target that is ;-) - xs->sc_link->

> PS.  This may be a stupid question, but why is there a separate Atari
> version of the 5380 code?

The atari-driver was there before the mi driver. Stepping over on the mi
version has not reached the top of my todo-list yet. The same is true for
the zs-driver... 

Good luck,