blob: d3cba12f4bd95c38c110327bfbde76d9d6ecf1af [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Moore, Eric Dean466544d2005-09-14 18:09:10 -06002 * linux/drivers/message/fusion/mptscsih.h
Linus Torvalds1da177e2005-04-16 15:20:36 -07003 * High performance SCSI / Fibre Channel SCSI Host device driver.
4 * For use with PCI chip/adapter(s):
5 * LSIFC9xx/LSI409xx Fibre Channel
6 * running LSI Logic Fusion MPT (Message Passing Technology) firmware.
7 *
Moore, Eric Dean 0d0c7972005-04-22 18:02:09 -04008 * Copyright (c) 1999-2005 LSI Logic Corporation
Linus Torvalds1da177e2005-04-16 15:20:36 -07009 * (mailto:mpt_linux_developer@lsil.com)
10 *
Linus Torvalds1da177e2005-04-16 15:20:36 -070011 */
12/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
13/*
14 This program is free software; you can redistribute it and/or modify
15 it under the terms of the GNU General Public License as published by
16 the Free Software Foundation; version 2 of the License.
17
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
22
23 NO WARRANTY
24 THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR
25 CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT
26 LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
27 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is
28 solely responsible for determining the appropriateness of using and
29 distributing the Program and assumes all risks associated with its
30 exercise of rights under this Agreement, including but not limited to
31 the risks and costs of program errors, damage to or loss of data,
32 programs or equipment, and unavailability or interruption of operations.
33
34 DISCLAIMER OF LIABILITY
35 NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY
36 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37 DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND
38 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
39 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
40 USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
41 HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES
42
43 You should have received a copy of the GNU General Public License
44 along with this program; if not, write to the Free Software
45 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
46*/
47
48#ifndef SCSIHOST_H_INCLUDED
49#define SCSIHOST_H_INCLUDED
50
51/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
52/*
53 * SCSI Public stuff...
54 */
55
Moore, Eric Dean466544d2005-09-14 18:09:10 -060056#define MPT_SCSI_CMD_PER_DEV_HIGH 64
57#define MPT_SCSI_CMD_PER_DEV_LOW 32
Linus Torvalds1da177e2005-04-16 15:20:36 -070058
59#define MPT_SCSI_CMD_PER_LUN 7
60
61#define MPT_SCSI_MAX_SECTORS 8192
62
63/* To disable domain validation, uncomment the
64 * following line. No effect for FC devices.
65 * For SCSI devices, driver will negotiate to
66 * NVRAM settings (if available) or to maximum adapter
67 * capabilities.
68 */
69
70#define MPTSCSIH_ENABLE_DOMAIN_VALIDATION
71
72
73/* SCSI driver setup structure. Settings can be overridden
74 * by command line options.
75 */
76#define MPTSCSIH_DOMAIN_VALIDATION 1
77#define MPTSCSIH_MAX_WIDTH 1
78#define MPTSCSIH_MIN_SYNC 0x08
79#define MPTSCSIH_SAF_TE 0
Moore, Eric Dean466544d2005-09-14 18:09:10 -060080#define MPTSCSIH_PT_CLEAR 0
Linus Torvalds1da177e2005-04-16 15:20:36 -070081
Moore, Eric Dean 0d0c7972005-04-22 18:02:09 -040082
Linus Torvalds1da177e2005-04-16 15:20:36 -070083#endif
Moore, Eric Dean 0d0c7972005-04-22 18:02:09 -040084
85extern void mptscsih_remove(struct pci_dev *);
Greg Kroah-Hartmand18c3db2005-06-23 17:35:56 -070086extern void mptscsih_shutdown(struct pci_dev *);
Moore, Eric Dean 0d0c7972005-04-22 18:02:09 -040087#ifdef CONFIG_PM
Pavel Machek2a569572005-07-07 17:56:40 -070088extern int mptscsih_suspend(struct pci_dev *pdev, pm_message_t state);
Moore, Eric Dean 0d0c7972005-04-22 18:02:09 -040089extern int mptscsih_resume(struct pci_dev *pdev);
90#endif
91extern int mptscsih_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset, int length, int func);
92extern const char * mptscsih_info(struct Scsi_Host *SChost);
93extern int mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *));
Moore, Eric Deanc7c82982005-11-16 18:54:25 -070094extern int mptscsih_target_alloc(struct scsi_target *starget);
Moore, Eric Dean 0d0c7972005-04-22 18:02:09 -040095extern int mptscsih_slave_alloc(struct scsi_device *device);
Moore, Eric Deanc7c82982005-11-16 18:54:25 -070096extern void mptscsih_target_destroy(struct scsi_target *starget);
Moore, Eric Dean 0d0c7972005-04-22 18:02:09 -040097extern void mptscsih_slave_destroy(struct scsi_device *device);
98extern int mptscsih_slave_configure(struct scsi_device *device);
99extern int mptscsih_abort(struct scsi_cmnd * SCpnt);
100extern int mptscsih_dev_reset(struct scsi_cmnd * SCpnt);
101extern int mptscsih_bus_reset(struct scsi_cmnd * SCpnt);
102extern int mptscsih_host_reset(struct scsi_cmnd *SCpnt);
103extern int mptscsih_bios_param(struct scsi_device * sdev, struct block_device *bdev, sector_t capacity, int geom[]);
104extern int mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r);
105extern int mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r);
106extern int mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r);
107extern int mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply);
108extern int mptscsih_ioc_reset(MPT_ADAPTER *ioc, int post_reset);
Moore, Eric Dean6e3815b2005-06-24 12:18:57 -0600109extern int mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth);
Moore, Eric Dean 0d0c7972005-04-22 18:02:09 -0400110extern void mptscsih_timer_expired(unsigned long data);