/*1* Disk Array driver for HP Smart Array controllers, SCSI Tape module.2* (C) Copyright 2001, 2007 Hewlett-Packard Development Company, L.P.3*4* This program is free software; you can redistribute it and/or modify5* it under the terms of the GNU General Public License as published by6* the Free Software Foundation; version 2 of the License.7*8* This program is distributed in the hope that it will be useful,9* but WITHOUT ANY WARRANTY; without even the implied warranty of10* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. See the GNU11* General Public License for more details.12*13* You should have received a copy of the GNU General Public License14* along with this program; if not, write to the Free Software15* Foundation, Inc., 59 Temple Place, Suite 300, Boston, MA16* 02111-1307, USA.17*18* Questions/Comments/Bugfixes to [email protected]19*20*/21#ifdef CONFIG_CISS_SCSI_TAPE22#ifndef _CCISS_SCSI_H_23#define _CCISS_SCSI_H_2425#include <scsi/scsicam.h> /* possibly irrelevant, since we don't show disks */2627/* the scsi id of the adapter... */28#define SELF_SCSI_ID 1529/* 15 is somewhat arbitrary, since the scsi-2 bus30that's presented by the driver to the OS is31fabricated. The "real" scsi-3 bus the32hardware presents is fabricated too.33The actual, honest-to-goodness physical34bus that the devices are attached to is not35addressible natively, and may in fact turn36out to be not scsi at all. */373839/*4041If the upper scsi layer tries to track how many commands we have42outstanding, it will be operating under the misapprehension that it is43the only one sending us requests. We also have the block interface,44which is where most requests must surely come from, so the upper layer's45notion of how many requests we have outstanding will be wrong most or46all of the time.4748Note, the normal SCSI mid-layer error handling doesn't work well49for this driver because 1) it takes the io_request_lock before50calling error handlers and uses a local variable to store flags,51so the io_request_lock cannot be released and interrupts enabled52inside the error handlers, and, the error handlers cannot poll53for command completion because they might get commands from the54block half of the driver completing, and not know what to do55with them. That's what we get for making a hybrid scsi/block56driver, I suppose.5758*/5960struct cciss_scsi_dev_t {61int devtype;62int bus, target, lun; /* as presented to the OS */63unsigned char scsi3addr[8]; /* as presented to the HW */64unsigned char device_id[16]; /* from inquiry pg. 0x83 */65unsigned char vendor[8]; /* bytes 8-15 of inquiry data */66unsigned char model[16]; /* bytes 16-31 of inquiry data */67unsigned char revision[4]; /* bytes 32-35 of inquiry data */68};6970struct cciss_scsi_hba_t {71char *name;72int ndevices;73#define CCISS_MAX_SCSI_DEVS_PER_HBA 1674struct cciss_scsi_dev_t dev[CCISS_MAX_SCSI_DEVS_PER_HBA];75};7677#endif /* _CCISS_SCSI_H_ */78#endif /* CONFIG_CISS_SCSI_TAPE */798081