1 /*
2 * sd.h Copyright (C) 1992 Drew Eckhardt
3 * SCSI disk driver header file by
4 * Drew Eckhardt
5 *
6 * <drew@colorado.edu>
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/07/24 06:27:38 root Exp root $
12 */
13
14 #ifndef _SCSI_H
15 #include "scsi.h"
16 #endif
17
18 #ifndef _GENDISK_H
19 #include <linux/genhd.h>
20 #endif
21
22 /*
23 This is an arbitrary constant, and may be changed to whatever
24 suits your purposes. Note that smaller will get you a few bytes
25 more in kernel space if that is your thing.
26 */
27
28 #define MAX_SD 4
29 extern int NR_SD;
30
31 extern struct hd_struct sd[MAX_SD << 4];
32
33 typedef struct {
34 unsigned capacity; /* size in blocks */
35 unsigned sector_size; /* size in bytes */
36 Scsi_Device *device;
37 unsigned char sector_bit_size; /* sector_size = 2 to the bit size power */
38 unsigned char sector_bit_shift; /* power of 2 sectors per FS block */
39 unsigned ten:1; /* support ten byte read / write */
40 unsigned remap:1; /* support remapping */
41 } Scsi_Disk;
42
43 extern Scsi_Disk rscsi_disks[MAX_SD];
44
45 void sd_init(void);
46
47 #define HOST (rscsi_disks[DEVICE_NR(CURRENT->dev)].device->host_no)
48 #define ID (rscsi_disks[DEVICE_NR(CURRENT->dev)].device->id)
49 #define LUN (rscsi_disks[DEVICE_NR(CURRENT->dev)].device->lun)
50 #endif