|
|
1.1 root 1: /*
2: * sd.h Copyright (C) 1992 Drew Eckhardt
3: * SCSI disk driver header file by
4: * Drew Eckhardt
5: *
6: * <[email protected]>
7: */
8: #ifndef _SD_H
9: #define _SD_H
10: /*
11: $Header: /usr/src/linux/kernel/blk_drv/scsi/RCS/sd.h,v 1.1 1992/04/24 18:01:50 root Exp root $
12: */
13:
14: #ifndef _SCSI_H
15: #include "scsi.h"
16: #endif
17:
18: #define MAX_SD 2
19:
20: typedef struct partition {
21: unsigned char boot_ind; /* 0x80 - active (unused) */
22: unsigned char head; /* ? */
23: unsigned char sector; /* ? */
24: unsigned char cyl; /* ? */
25: unsigned char sys_ind; /* ? */
26: unsigned char end_head; /* ? */
27: unsigned char end_sector; /* ? */
28: unsigned char end_cyl; /* ? */
29: unsigned int start_sect; /* starting sector counting from 0 */
30: unsigned int nr_sects; /* nr of sectors in partition */
31: } Partition;
32:
33: extern int NR_SD;
34:
35: extern Partition scsi_disks[MAX_SD << 4] ;
36:
37:
38: typedef struct {
39: unsigned capacity; /* size in blocks */
40: unsigned sector_size; /* size in bytes */
41: Scsi_Device *device;
42: unsigned char sector_bit_size; /* sector_size = 2 to the bit size power */
43: unsigned char sector_bit_shift; /* power of 2 sectors per FS block */
44: unsigned ten:1; /* support ten byte read / write */
45: unsigned remap:1; /* support remapping */
46: unsigned use:1; /* after the initial inquiry, is
47: the device still supported ? */
48: } Scsi_Disk;
49:
50: extern Scsi_Disk rscsi_disks[MAX_SD];
51:
52: void sd_init(void);
53:
54: #define HOST (rscsi_disks[DEVICE_NR(CURRENT->dev)].device->host_no)
55: #define ID (rscsi_disks[DEVICE_NR(CURRENT->dev)].device->id)
56: #define LUN (rscsi_disks[DEVICE_NR(CURRENT->dev)].device->lun)
57: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.