atp870u.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 long irq;
  23. unsigned char last_cmd[2];
  24. unsigned char in_snd[2];
  25. unsigned char in_int[2];
  26. unsigned char quhd[2];
  27. unsigned char quend[2];
  28. unsigned char global_map[2];
  29. unsigned char chip_ver;
  30. unsigned char scam_on;
  31. unsigned char host_id[2];
  32. unsigned int working[2];
  33. unsigned short wide_id[2];
  34. unsigned short active_id[2];
  35. unsigned short ultra_map[2];
  36. unsigned short async[2];
  37. unsigned short dev_id;
  38. unsigned char sp[2][16];
  39. unsigned char r1f[2][16];
  40. struct scsi_cmnd *quereq[2][qcnt];
  41. struct atp_id
  42. {
  43. unsigned char dirct;
  44. unsigned char devsp;
  45. unsigned char devtype;
  46. unsigned long tran_len;
  47. unsigned long last_len;
  48. unsigned char *prd_pos;
  49. unsigned char *prd_table; /* Kernel address of PRD table */
  50. dma_addr_t prd_bus; /* Bus address of PRD */
  51. dma_addr_t prdaddr; /* Dynamically updated in driver */
  52. struct scsi_cmnd *curr_req;
  53. } id[2][16];
  54. struct Scsi_Host *host;
  55. struct pci_dev *pdev;
  56. unsigned int unit;
  57. };
  58. #endif