atp870u.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef _ATP870U_H
  2. #define _ATP870U_H
  3. #include <linux/types.h>
  4. #include <linux/kdev_t.h>
  5. /* I/O Port */
  6. #define MAX_CDB 12
  7. #define MAX_SENSE 14
  8. #define qcnt 32
  9. #define ATP870U_SCATTER 128
  10. #define MAX_ADAPTER 8
  11. #define MAX_SCSI_ID 16
  12. #define ATP870U_MAX_SECTORS 128
  13. #define ATP885_DEVID 0x808A
  14. #define ATP880_DEVID1 0x8080
  15. #define ATP880_DEVID2 0x8081
  16. //#define ED_DBGP
  17. struct atp_unit
  18. {
  19. unsigned long baseport;
  20. unsigned long ioport[2];
  21. unsigned long pciport[2];
  22. unsigned char last_cmd[2];
  23. unsigned char in_snd[2];
  24. unsigned char in_int[2];
  25. unsigned char quhd[2];
  26. unsigned char quend[2];
  27. unsigned char global_map[2];
  28. unsigned char host_id[2];
  29. unsigned int working[2];
  30. unsigned short wide_id[2];
  31. unsigned short active_id[2];
  32. unsigned short ultra_map[2];
  33. unsigned short async[2];
  34. unsigned char sp[2][16];
  35. unsigned char r1f[2][16];
  36. struct scsi_cmnd *quereq[2][qcnt];
  37. struct atp_id
  38. {
  39. unsigned char dirct;
  40. unsigned char devsp;
  41. unsigned char devtype;
  42. unsigned long tran_len;
  43. unsigned long last_len;
  44. unsigned char *prd_pos;
  45. unsigned char *prd_table; /* Kernel address of PRD table */
  46. dma_addr_t prd_bus; /* Bus address of PRD */
  47. dma_addr_t prdaddr; /* Dynamically updated in driver */
  48. struct scsi_cmnd *curr_req;
  49. } id[2][16];
  50. struct Scsi_Host *host;
  51. struct pci_dev *pdev;
  52. unsigned int unit;
  53. };
  54. #endif