Commit | Line | Data |
---|---|---|
d7e75661 SV |
1 | This is a low level driver for Seagate ST01/02, Future Domain TMC-885, TMC-950 |
2 | SCSI host adapter that uses Julian Elishers SCSI code. | |
3 | ||
4 | This driver is the result of looking at code written by the following people: | |
5 | ||
6 | Drew Eckhardt | |
7 | Julian Elischer | |
8 | Glen Overby | |
9 | Gary Close | |
10 | ||
11 | Special thank to | |
12 | ||
13 | Robert Knier | |
14 | ||
15 | that made the fast blind transfer routines, and also helped with debugging. | |
16 | ||
17 | I am very grateful to these people. | |
18 | ||
19 | ||
20 | Operating system requirements: | |
21 | ||
22 | This driver uses the latest version of Julian Elischers scsi code, available | |
23 | at FreeBSD.cdrom.com in the file called newscsi3.tar.gz. The driver has been | |
24 | tested on FreeBSD 1.1-BETA, FreeBSD 1.0.2, 386bsd 0.1. I don't know if will | |
25 | work with NetBSD. (I hope it will.) | |
26 | ||
27 | ||
28 | The hardware: | |
29 | ||
30 | The ST01/02, and Future Domain 950 are very simple SCSI controllers. They are | |
31 | not busmastering, so the processor must do all transfers a la IDE. They support | |
32 | blind transfer by adding wait states (up to a certain limit). Interrupt is | |
33 | generated for reconnect and parity errors (maybe also for some other events). | |
34 | ||
35 | The card consists of one command port that writes to scsi control lines, reads | |
36 | status lines, and a data port that read/writes to the 8 data lines. The address | |
37 | decoding gives both data and control ports large memory areas to a single | |
38 | port. This is used by the code. | |
39 | ||
40 | The ST01/02 differs from the FD950 in memory address location and SCSI id. | |
41 | ||
42 | Probing for the card: | |
43 | ||
44 | A card is recognized by comparing the BIOS signature with known signatures. A | |
45 | new card may not be recognized if the BIOS signature has changed. Please send | |
46 | new signatures to me. | |
47 | ||
48 | Driver function: | |
49 | ||
50 | A scsi command is sent to scsi_cmd function. The command is either placed in | |
51 | the queue or an retryable message is returned. The routine may wait for | |
52 | completion of the command depending on the supplied flags. A timer is started | |
53 | for every command placed in the queue. The commands are added in the order they | |
54 | are received. There is a possiblity to make all REQUEST SENSE commands be | |
55 | queued before all other commands, but I dont think it is a good thing (Linux | |
56 | do however use this). | |
57 | ||
58 | The card is mostly controlled by the sea_main function. It is called by | |
59 | scsi_cmd, the interrupt routine, and the timeout routine. The sea_main routine | |
60 | runs as long there are something to do (transfer data, issue queued commands, | |
61 | and handle reconnected commands). | |
62 | ||
63 | The data transfers may be done in two different ways: Blind and polled | |
64 | transfers. They differ in the way the driver does it handshaking with the | |
65 | target. During a blind transfer, the driver code blindly transfers a block | |
66 | of data without checking for changed phase. During polled transfers, the | |
67 | phase is checked between every character transfered. The polled transfers | |
68 | are always used for status information and command transfers. | |
69 | ||
70 | Because the card does not use dma in any way, there is no need to handle | |
71 | physical addresses. There is no problem with the isa-bus address limit of | |
72 | 16MB, making bounce-buffers unnecessary. | |
73 | ||
74 | The data structures: | |
75 | ||
76 | Every card has a sea_data structure keeping the queues of commands waiting to | |
77 | be issued, and commands currently disconnected. The type of card (Seagate or | |
78 | Future Domain), data and control port addresses, scsi id, busy flags for all | |
79 | possible targets, and interrupt vector for the card. | |
80 | ||
81 | Every scsi command to be issued are stored in a sea_scb structure. It contains | |
82 | a flag describing status/error of the command, current data buffer position, | |
83 | and number of bytes remaining to be transfered. | |
84 | ||
85 | ||
86 | INSTALLATION | |
87 | ||
88 | 1) Copy seagate.c to /sys/i386/isa/seagate.c. Alter defines in seagate.c if you | |
89 | dont want to use blind transfers and/or disconnects. Please note that | |
90 | interrupts must be enabled on the board if disconnects are used. | |
91 | 2) Add the following to /sys/i386/conf/files.i386 | |
92 | i386/isa/seagate.c optional sea device-driver | |
93 | 3) Create a new config file in /sys/i386/conf containing defines for Julians | |
94 | scsi code (see GENERICAH or GENERICBT). Replace the aha or bt controller | |
95 | with: | |
96 | controller sea0 at isa? bio irq 5 iomem 0xC8000 iosiz 0x2000 vector seaintr | |
97 | 4) config, make depend, make, cp, shutdown -r | |
98 | ||
99 | You should now have a working kernel booted. | |
100 | ||
101 | I have tested the code on the following hardware: 386DX 24MHz 8MB AMI BIOS, | |
102 | Maxtor 7120A IDE, Seagate ST02, Maxtor LXT340S scsi disk, SONY CDU-8003 cdrom, | |
103 | (short test with) WANGTEK 6200HS DAT drive. | |
104 | ||
105 | ||
106 | PROBLEMS | |
107 | ||
108 | I have had problems getting the ST02 boot using FreeBSD boot floppies. I think | |
109 | is some problem with BIOS calls not working. It is unfortunately impossible to | |
110 | disconnect the ST02 floppy controller. | |
111 | ||
112 | I have had problem to get the driver talk to a 40 MB Seagate disk. I dont have | |
113 | access to it any more, so I can't do any more checks on that. | |
114 | ||
115 | NOTE: The ST02 creates its own description of the disk attached. This is not | |
116 | the same as the disk says. This translation problem may cause problems when | |
117 | sharing a disk between both DOS and BSD. It is however not impossible. | |
118 | ||
119 | ||
120 | /Kent | |
121 | ||
122 | ||
123 | Kent Palmkvist | |
124 | kentp@isy.liu.se | |
125 | ||
126 | ||
9b3b13e5 | 127 | $Id$ |