Root/
1 | /* |
2 | * Disk Array driver for HP Smart Array controllers, SCSI Tape module. |
3 | * (C) Copyright 2001, 2007 Hewlett-Packard Development Company, L.P. |
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; version 2 of the License. |
8 | * |
9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | * General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place, Suite 300, Boston, MA |
17 | * 02111-1307, 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 | |
40 | /* |
41 | |
42 | If the upper scsi layer tries to track how many commands we have |
43 | outstanding, it will be operating under the misapprehension that it is |
44 | the only one sending us requests. We also have the block interface, |
45 | which is where most requests must surely come from, so the upper layer's |
46 | notion of how many requests we have outstanding will be wrong most or |
47 | all of the time. |
48 | |
49 | Note, the normal SCSI mid-layer error handling doesn't work well |
50 | for this driver because 1) it takes the io_request_lock before |
51 | calling error handlers and uses a local variable to store flags, |
52 | so the io_request_lock cannot be released and interrupts enabled |
53 | inside the error handlers, and, the error handlers cannot poll |
54 | for command completion because they might get commands from the |
55 | block half of the driver completing, and not know what to do |
56 | with them. That's what we get for making a hybrid scsi/block |
57 | driver, I suppose. |
58 | |
59 | */ |
60 | |
61 | struct cciss_scsi_dev_t { |
62 | int devtype; |
63 | int bus, target, lun; /* as presented to the OS */ |
64 | unsigned char scsi3addr[8]; /* as presented to the HW */ |
65 | unsigned char device_id[16]; /* from inquiry pg. 0x83 */ |
66 | unsigned char vendor[8]; /* bytes 8-15 of inquiry data */ |
67 | unsigned char model[16]; /* bytes 16-31 of inquiry data */ |
68 | unsigned char revision[4]; /* bytes 32-35 of inquiry data */ |
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 */ |
80 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9