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