Subject: More on se0
To: NetBSD port-atari mailing list <port-atari@netbsd.org>
From: Julian Coleman <J.D.Coleman@newcastle.ac.uk>
List: port-atari
Date: 08/08/1998 23:19:36
Having looked somewhat closer at the SCSI and se code, I've got a slightly
better idea of what's happening. When I try to add IP to the adaptor
(ifconfig se0 inet 192.168.13.1), the command prompt doesn't come back.
I've traced the problem down to the SCSI code :
the IP stack sends an ARP request for its address -
the call sequence is -
...
ether_output()
se_ifstart()
scsi_scsipi_cmd()
scsipi_execute_xs()
ncr5380_scsi_cmd()
run_main()
scsi_main()
information_transfer()
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);
return (SUCESSFULLY_QUEUED);
Back in scsipi_execute_xs() (file ... src/sys/dev/scsipi/scsipi_base.c),
returning 'SUCESSFULLY_QUEUED' causes :
case SUCESSFULLY_QUEUED:
...
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 :(
The arp packet is sent out (seen with tcpdump), so I would (naively)
expect that the code would return 'COMPLETE' and not 'SUCESSFULLY_QUEUED'.
For it to return 'COMPLETE', 'ITSDONE' should be set (via finish_req()
called in handle_message() I assume), and I can't see why it isn't. I
would guess that the adaptor has finished, but the code thinks it hasn't :(
Pointers greatly appreciated. Alternatively, I shall wade through the
SCSI code with the debugger sometime tomorrow ...
J
PS. This may be a stupid question, but why is there a separate Atari
version of the 5380 code?
--
1024/55A5BC19 0F 3F 62 56 18 10 8B 84 43 8F F4 94 93 37 76 AA
S.E.P.