1The hardware: 2 3The ST01/02, and Future Domain 950 are very simple SCSI controllers. They are 4not busmastering, so the processor must do all transfers a la IDE. They support 5blind transfer by adding wait states (up to a certain limit). Interrupt is 6generated for reconnect and parity errors (maybe also for some other events). 7 8The card consists of one command port that writes to scsi control lines, reads 9status lines, and a data port that read/writes to the 8 data lines. The address 10decoding gives both data and control ports large memory areas to a single 11port. This is used by the code. 12 13The ST01/02 differs from the FD950 in memory address location and SCSI id. 14 15Probing for the card: 16 17A card is recognized by comparing the BIOS signature with known signatures. A 18new card may not be recognized if the BIOS signature has changed. Please send 19new signatures to me. 20 21Driver function: 22 23A scsi command is sent to scsi_cmd function. The command is either placed in 24the queue or an retryable message is returned. The routine may wait for 25completion of the command depending on the supplied flags. A timer is started 26for every command placed in the queue. The commands are added in the order they 27are received. There is a possiblity to make all REQUEST SENSE commands be 28queued before all other commands, but I dont think it is a good thing (Linux 29do however use this). 30 31The card is mostly controlled by the sea_main function. It is called by 32scsi_cmd, the interrupt routine, and the timeout routine. The sea_main routine 33runs as long there are something to do (transfer data, issue queued commands, 34and handle reconnected commands). 35 36The data transfers may be done in two different ways: Blind and polled 37transfers. They differ in the way the driver does it handshaking with the 38target. During a blind transfer, the driver code blindly transfers a block 39of data without checking for changed phase. During polled transfers, the 40phase is checked between every character transfered. The polled transfers 41are always used for status information and command transfers. 42 43Because the card does not use dma in any way, there is no need to handle 44physical addresses. There is no problem with the isa-bus address limit of 4516MB, making bounce-buffers unnecessary. 46 47The data structures: 48 49Every card has a sea_softc structure keeping the queues of commands waiting to 50be issued, and commands currently disconnected. The type of card (Seagate or 51Future Domain), data and control port addresses, scsi id, busy flags for all 52possible targets, and interrupt vector for the card. 53 54Every scsi command to be issued are stored in a sea_scb structure. It contains 55a flag describing status/error of the command, current data buffer position, 56and number of bytes remaining to be transfered. 57 58 59PROBLEMS 60 61I have had problems getting the ST02 boot using the boot floppies. I think it 62is some problem with BIOS calls not working. It is unfortunately impossible to 63disconnect the ST02 floppy controller. 64 65I have had problem to get the driver talk to a 40 MB Seagate disk. I dont have 66access to it any more, so I can't do any more checks on that. 67 68NOTE: The ST02 creates its own description of the disk attached. This is not 69the same as the disk says. This translation problem may cause problems when 70sharing a disk between both DOS and BSD. It is however not impossible. 71