diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/block/cciss_scsi.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'drivers/block/cciss_scsi.h')
-rw-r--r-- | drivers/block/cciss_scsi.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/drivers/block/cciss_scsi.h b/drivers/block/cciss_scsi.h new file mode 100644 index 000000000000..5e7e06c07d6c --- /dev/null +++ b/drivers/block/cciss_scsi.h | |||
@@ -0,0 +1,79 @@ | |||
1 | /* | ||
2 | * Disk Array driver for Compaq SA53xx Controllers, SCSI Tape module | ||
3 | * Copyright 2001 Compaq Computer Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
13 | * NON INFRINGEMENT. See the GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
18 | * | ||
19 | * Questions/Comments/Bugfixes to iss_storagedev@hp.com | ||
20 | * | ||
21 | */ | ||
22 | #ifdef CONFIG_CISS_SCSI_TAPE | ||
23 | #ifndef _CCISS_SCSI_H_ | ||
24 | #define _CCISS_SCSI_H_ | ||
25 | |||
26 | #include <scsi/scsicam.h> /* possibly irrelevant, since we don't show disks */ | ||
27 | |||
28 | // the scsi id of the adapter... | ||
29 | #define SELF_SCSI_ID 15 | ||
30 | // 15 is somewhat arbitrary, since the scsi-2 bus | ||
31 | // that's presented by the driver to the OS is | ||
32 | // fabricated. The "real" scsi-3 bus the | ||
33 | // hardware presents is fabricated too. | ||
34 | // The actual, honest-to-goodness physical | ||
35 | // bus that the devices are attached to is not | ||
36 | // addressible natively, and may in fact turn | ||
37 | // out to be not scsi at all. | ||
38 | |||
39 | #define SCSI_CCISS_CAN_QUEUE 2 | ||
40 | |||
41 | /* | ||
42 | |||
43 | Note, cmd_per_lun could give us some trouble, so I'm setting it very low. | ||
44 | Likewise, SCSI_CCISS_CAN_QUEUE is set very conservatively. | ||
45 | |||
46 | If the upper scsi layer tries to track how many commands we have | ||
47 | outstanding, it will be operating under the misapprehension that it is | ||
48 | the only one sending us requests. We also have the block interface, | ||
49 | which is where most requests must surely come from, so the upper layer's | ||
50 | notion of how many requests we have outstanding will be wrong most or | ||
51 | all of the time. | ||
52 | |||
53 | Note, the normal SCSI mid-layer error handling doesn't work well | ||
54 | for this driver because 1) it takes the io_request_lock before | ||
55 | calling error handlers and uses a local variable to store flags, | ||
56 | so the io_request_lock cannot be released and interrupts enabled | ||
57 | inside the error handlers, and, the error handlers cannot poll | ||
58 | for command completion because they might get commands from the | ||
59 | block half of the driver completing, and not know what to do | ||
60 | with them. That's what we get for making a hybrid scsi/block | ||
61 | driver, I suppose. | ||
62 | |||
63 | */ | ||
64 | |||
65 | struct cciss_scsi_dev_t { | ||
66 | int devtype; | ||
67 | int bus, target, lun; /* as presented to the OS */ | ||
68 | unsigned char scsi3addr[8]; /* as presented to the HW */ | ||
69 | }; | ||
70 | |||
71 | struct cciss_scsi_hba_t { | ||
72 | char *name; | ||
73 | int ndevices; | ||
74 | #define CCISS_MAX_SCSI_DEVS_PER_HBA 16 | ||
75 | struct cciss_scsi_dev_t dev[CCISS_MAX_SCSI_DEVS_PER_HBA]; | ||
76 | }; | ||
77 | |||
78 | #endif /* _CCISS_SCSI_H_ */ | ||
79 | #endif /* CONFIG_CISS_SCSI_TAPE */ | ||