mptscsih.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /*
  2. * linux/drivers/message/fusion/mptscsi.h
  3. * 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. *
  8. * Copyright (c) 1999-2005 LSI Logic Corporation
  9. * (mailto:mpt_linux_developer@lsil.com)
  10. *
  11. */
  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. This program is distributed in the hope that it will be useful,
  18. but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. GNU General Public License for more details.
  21. NO WARRANTY
  22. THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR
  23. CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT
  24. LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
  25. MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is
  26. solely responsible for determining the appropriateness of using and
  27. distributing the Program and assumes all risks associated with its
  28. exercise of rights under this Agreement, including but not limited to
  29. the risks and costs of program errors, damage to or loss of data,
  30. programs or equipment, and unavailability or interruption of operations.
  31. DISCLAIMER OF LIABILITY
  32. NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY
  33. DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  34. DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND
  35. ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
  36. TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
  37. USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
  38. HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES
  39. You should have received a copy of the GNU General Public License
  40. along with this program; if not, write to the Free Software
  41. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  42. */
  43. #ifndef SCSIHOST_H_INCLUDED
  44. #define SCSIHOST_H_INCLUDED
  45. /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  46. /*
  47. * SCSI Public stuff...
  48. */
  49. #define MPT_SCSI_CMD_PER_DEV_HIGH 31
  50. #define MPT_SCSI_CMD_PER_DEV_LOW 7
  51. #define MPT_SCSI_CMD_PER_LUN 7
  52. #define MPT_SCSI_MAX_SECTORS 8192
  53. /* To disable domain validation, uncomment the
  54. * following line. No effect for FC devices.
  55. * For SCSI devices, driver will negotiate to
  56. * NVRAM settings (if available) or to maximum adapter
  57. * capabilities.
  58. */
  59. #define MPTSCSIH_ENABLE_DOMAIN_VALIDATION
  60. /* SCSI driver setup structure. Settings can be overridden
  61. * by command line options.
  62. */
  63. #define MPTSCSIH_DOMAIN_VALIDATION 1
  64. #define MPTSCSIH_MAX_WIDTH 1
  65. #define MPTSCSIH_MIN_SYNC 0x08
  66. #define MPTSCSIH_SAF_TE 0
  67. #endif
  68. extern void mptscsih_remove(struct pci_dev *);
  69. extern void mptscsih_shutdown(struct pci_dev *);
  70. #ifdef CONFIG_PM
  71. extern int mptscsih_suspend(struct pci_dev *pdev, pm_message_t state);
  72. extern int mptscsih_resume(struct pci_dev *pdev);
  73. #endif
  74. extern int mptscsih_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset, int length, int func);
  75. extern const char * mptscsih_info(struct Scsi_Host *SChost);
  76. extern int mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *));
  77. extern int mptscsih_slave_alloc(struct scsi_device *device);
  78. extern void mptscsih_slave_destroy(struct scsi_device *device);
  79. extern int mptscsih_slave_configure(struct scsi_device *device);
  80. extern int mptscsih_abort(struct scsi_cmnd * SCpnt);
  81. extern int mptscsih_dev_reset(struct scsi_cmnd * SCpnt);
  82. extern int mptscsih_bus_reset(struct scsi_cmnd * SCpnt);
  83. extern int mptscsih_host_reset(struct scsi_cmnd *SCpnt);
  84. extern int mptscsih_bios_param(struct scsi_device * sdev, struct block_device *bdev, sector_t capacity, int geom[]);
  85. extern int mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r);
  86. extern int mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r);
  87. extern int mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r);
  88. extern int mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply);
  89. extern int mptscsih_ioc_reset(MPT_ADAPTER *ioc, int post_reset);
  90. extern int mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth);
  91. extern void mptscsih_timer_expired(unsigned long data);