ultrastor.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. * ultrastor.c (C) 1991 David B. Gentzel
  3. * Low-level scsi driver for UltraStor 14F
  4. * by David B. Gentzel, Whitfield Software Services, Carnegie, PA
  5. * (gentzel@nova.enet.dec.com)
  6. * scatter/gather added by Scott Taylor (n217cg@tamuts.tamu.edu)
  7. * 24F support by John F. Carr (jfc@athena.mit.edu)
  8. * John's work modified by Caleb Epstein (cae@jpmorgan.com) and
  9. * Eric Youngdale (eric@tantalus.nrl.navy.mil).
  10. * Thanks to UltraStor for providing the necessary documentation
  11. */
  12. #ifndef _ULTRASTOR_H
  13. #define _ULTRASTOR_H
  14. static int ultrastor_detect(struct scsi_host_template *);
  15. static const char *ultrastor_info(struct Scsi_Host *shpnt);
  16. static int ultrastor_queuecommand(struct Scsi_Host *, struct scsi_cmnd *);
  17. static int ultrastor_abort(struct scsi_cmnd *);
  18. static int ultrastor_host_reset(struct scsi_cmnd *);
  19. static int ultrastor_biosparam(struct scsi_device *, struct block_device *,
  20. sector_t, int *);
  21. #define ULTRASTOR_14F_MAX_SG 16
  22. #define ULTRASTOR_24F_MAX_SG 33
  23. #define ULTRASTOR_MAX_CMDS_PER_LUN 5
  24. #define ULTRASTOR_MAX_CMDS 16
  25. #define ULTRASTOR_24F_PORT 0xC80
  26. #ifdef ULTRASTOR_PRIVATE
  27. #define UD_ABORT 0x0001
  28. #define UD_COMMAND 0x0002
  29. #define UD_DETECT 0x0004
  30. #define UD_INTERRUPT 0x0008
  31. #define UD_RESET 0x0010
  32. #define UD_MULTI_CMD 0x0020
  33. #define UD_CSIR 0x0040
  34. #define UD_ERROR 0x0080
  35. /* #define PORT_OVERRIDE 0x330 */
  36. /* Values for the PRODUCT_ID ports for the 14F */
  37. #define US14F_PRODUCT_ID_0 0x56
  38. #define US14F_PRODUCT_ID_1 0x40 /* NOTE: Only upper nibble is used */
  39. #define US24F_PRODUCT_ID_0 0x56
  40. #define US24F_PRODUCT_ID_1 0x63
  41. #define US24F_PRODUCT_ID_2 0x02
  42. /* Subversion values */
  43. #define U14F 0
  44. #define U34F 1
  45. /* MSCP field values */
  46. /* Opcode */
  47. #define OP_HOST_ADAPTER 0x1
  48. #define OP_SCSI 0x2
  49. #define OP_RESET 0x4
  50. /* Date Transfer Direction */
  51. #define DTD_SCSI 0x0
  52. #define DTD_IN 0x1
  53. #define DTD_OUT 0x2
  54. #define DTD_NONE 0x3
  55. /* Host Adapter command subcodes */
  56. #define HA_CMD_INQUIRY 0x1
  57. #define HA_CMD_SELF_DIAG 0x2
  58. #define HA_CMD_READ_BUFF 0x3
  59. #define HA_CMD_WRITE_BUFF 0x4
  60. #endif
  61. #endif