[ Article reposted from alphanet.ml.linux.scsi ]
[ Author was Marc SCHAEFER <[EMAIL PROTECTED]> ]
[ Posted on 25 May 1999 22:30:16 +0200 ]
Hi,
I am trying to make the ``IP over SCSI patch'' (2.1.97) work
on 2.2.9. I have it mostly working --- except that when the
data is actually send to SCSI (through scsi_do_cmd()),
the machine crashes in a way which makes difficult to understand why.
Replacing scsi_do_cmd() by a direct low-level queuing (using
hostt->queuecommand()) looks to ``work'' (at least not crash).
Is it because Scsi_Cmnd is badly initialized ? Or because
you can't call SCSI queuing from within networking ? (ARP
is running at that point, and I assume this runs not in
a process context).
However, something else I am a little puzzled with is the fact
that when drivers/net/scsinet.c has control again, it frees the
network buffer. However, NOTHING guarantees that the I/O has
completed. scsi_do_cmd() is just plain asynchronous. Completion
can only be ensured when the sn_tx_done() function is called. And
that function only frees the allocated Scsi_Cmnd structure. I don't
think you can just busy-wait in sn.c: you have to add a callback
to scsinet.c when I/O completes (or do the SKB freeing in sn.c).
Moreover, one function is missing in scsinet: arp_find_1() doesn't
seem to be available in all the kernels I checked. If I can
solve the first issue (crashes), I will try to understand what
the arp_find_1() function is supposed to do.
Also, is it possible to pre-load the ARP cache ? I tried
something like
snconfig sn0 add 0 2 3 4 5 6 8 9 10 11 12 13 14 15
# using SCSI ID 1, and 7 is host adapter.
ifconfig sn0 192.168.1.1
route add 192.168.1.2 dev sn0
arp -s 192.168.1.2 1 # tell it's on SCSI ID 1
This would aid understanding (since I don't have the target
side available anyway, and I simulate it through a hard drive).
Any idea, pointers or stuff could be well used :)
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]