Annotation of researchv10dc/cmd/oworm/oscsi/scsi.h, revision 1.1.1.1

1.1       root        1: #include       <libc.h>
                      2: 
                      3: struct scsi_i
                      4: {
                      5:        short bus_id;
                      6:        char cmd[10];
                      7:        char data[4*1024];
                      8: };
                      9: #define                N(n)    (12+n)
                     10: 
                     11: /*
                     12:        STATUS:
                     13:        +0:     scsi status phase byte
                     14:        +1:     message phase command
                     15:        +2:     controller status?
                     16: */
                     17: 
                     18: struct scsi_o
                     19: {
                     20:        unsigned char status[4];
                     21:        unsigned short csr;
                     22:        unsigned short per;
                     23:        unsigned char data[4*1024];
                     24: };
                     25: 
                     26: #define        CHECK(o)        ((((o).status[0]&0xFF) != 0xEE) && ((o).status[0]&2))
                     27: 
                     28: extern int scsi_fd;
                     29: extern int scsi_id;
                     30: extern int scsi_verbose;
                     31: 
                     32: #define                V               scsi_verbose
                     33: 
                     34: #define                CSR_DONE        0x8000
                     35: #define                CSR_ERROR       0x1000
                     36: #define                CSR_R           0x0020
                     37: #define                CSR_M           0x0010
                     38: #define                CSR_I           0x0008
                     39: #define                CSR_C           0x0004
                     40: #define                CSR_S           0x0002
                     41: #define                CSR_B           0x0001
                     42: #define                CSR_BITS        (CSR_DONE|CSR_ERROR|CSR_R|CSR_M|CSR_I|CSR_C|CSR_S|CSR_B)
                     43: 
                     44: #define                PER_CHECK       0x2000
                     45: #define                PER_DRBUSY      0x1000
                     46: #define                PER_SBUSY       0x0040
                     47: #define                PER_SELECT      0x0010
                     48: 
                     49: #define                A               0
                     50: #define                B               1
                     51: 
                     52: #define                ULONG(d)        ((d[0]<<24)|(d[1]<<16)|(d[2]<<8)|d[3])
                     53: #define                LONG(cp)        ULONG(((unsigned char *)cp))

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.