ncr53c8xx.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:3k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /******************************************************************************
  2. **  Device driver for the PCI-SCSI NCR538XX controller family.
  3. **
  4. **  Copyright (C) 1994  Wolfgang Stanglmeier
  5. **
  6. **  This program is free software; you can redistribute it and/or modify
  7. **  it under the terms of the GNU General Public License as published by
  8. **  the Free Software Foundation; either version 2 of the License, or
  9. **  (at your option) any later version.
  10. **
  11. **  This program is distributed in the hope that it will be useful,
  12. **  but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. **  GNU General Public License for more details.
  15. **
  16. **  You should have received a copy of the GNU General Public License
  17. **  along with this program; if not, write to the Free Software
  18. **  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19. **
  20. **-----------------------------------------------------------------------------
  21. **
  22. **  This driver has been ported to Linux from the FreeBSD NCR53C8XX driver
  23. **  and is currently maintained by
  24. **
  25. **          Gerard Roudier              <groudier@free.fr>
  26. **
  27. **  Being given that this driver originates from the FreeBSD version, and
  28. **  in order to keep synergy on both, any suggested enhancements and corrections
  29. **  received on Linux are automatically a potential candidate for the FreeBSD 
  30. **  version.
  31. **
  32. **  The original driver has been written for 386bsd and FreeBSD by
  33. **          Wolfgang Stanglmeier        <wolf@cologne.de>
  34. **          Stefan Esser                <se@mi.Uni-Koeln.de>
  35. **
  36. **  And has been ported to NetBSD by
  37. **          Charles M. Hannum           <mycroft@gnu.ai.mit.edu>
  38. **
  39. *******************************************************************************
  40. */
  41. #ifndef NCR53C8XX_H
  42. #define NCR53C8XX_H
  43. #include "sym53c8xx_defs.h"
  44. /*
  45. ** Define Scsi_Host_Template parameters
  46. **
  47. ** Used by hosts.c and ncr53c8xx.c with module configuration.
  48. */
  49. #if (LINUX_VERSION_CODE >= 0x020400) || defined(HOSTS_C) || defined(MODULE)
  50. #include <scsi/scsicam.h>
  51. int ncr53c8xx_abort(Scsi_Cmnd *);
  52. int ncr53c8xx_detect(Scsi_Host_Template *tpnt);
  53. const char *ncr53c8xx_info(struct Scsi_Host *host);
  54. int ncr53c8xx_queue_command(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
  55. int ncr53c8xx_reset(Scsi_Cmnd *, unsigned int);
  56. #ifdef MODULE
  57. int ncr53c8xx_release(struct Scsi_Host *);
  58. #else
  59. #define ncr53c8xx_release NULL
  60. #endif
  61. #if LINUX_VERSION_CODE >= LinuxVersionCode(2,1,75)
  62. #define NCR53C8XX {     name:           "",
  63. detect:         ncr53c8xx_detect,
  64. release:        ncr53c8xx_release,
  65. info:           ncr53c8xx_info, 
  66. queuecommand:   ncr53c8xx_queue_command,
  67. abort:          ncr53c8xx_abort,
  68. reset:          ncr53c8xx_reset,
  69. bios_param:     scsicam_bios_param,
  70. can_queue:      SCSI_NCR_CAN_QUEUE,
  71. this_id:        7,
  72. sg_tablesize:   SCSI_NCR_SG_TABLESIZE,
  73. cmd_per_lun:    SCSI_NCR_CMD_PER_LUN,
  74. use_clustering: DISABLE_CLUSTERING} 
  75. #else
  76. #define NCR53C8XX { NULL, NULL, NULL, NULL,
  77. NULL, ncr53c8xx_detect,
  78. ncr53c8xx_release, ncr53c8xx_info, NULL,
  79. ncr53c8xx_queue_command,ncr53c8xx_abort,
  80. ncr53c8xx_reset, NULL, scsicam_bios_param,
  81. SCSI_NCR_CAN_QUEUE, 7,
  82. SCSI_NCR_SG_TABLESIZE, SCSI_NCR_CMD_PER_LUN,
  83. 0, 0, DISABLE_CLUSTERING} 
  84.  
  85. #endif /* LINUX_VERSION_CODE */
  86. #endif /* defined(HOSTS_C) || defined(MODULE) */ 
  87. #endif /* NCR53C8XX_H */