blob: 75c44399fc88ae8babda2980704163ae8a665f18 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002#ifndef _ATP870U_H
3#define _ATP870U_H
4
5#include <linux/types.h>
6#include <linux/kdev_t.h>
7
8/* I/O Port */
9
10#define MAX_CDB 12
11#define MAX_SENSE 14
12#define qcnt 32
13#define ATP870U_SCATTER 128
Linus Torvalds1da177e2005-04-16 15:20:36 -070014
15#define MAX_ADAPTER 8
16#define MAX_SCSI_ID 16
17#define ATP870U_MAX_SECTORS 128
18
19#define ATP885_DEVID 0x808A
20#define ATP880_DEVID1 0x8080
21#define ATP880_DEVID2 0x8081
22
23//#define ED_DBGP
24
25struct atp_unit
26{
27 unsigned long baseport;
28 unsigned long ioport[2];
29 unsigned long pciport[2];
Linus Torvalds1da177e2005-04-16 15:20:36 -070030 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];
Linus Torvalds1da177e2005-04-16 15:20:36 -070036 unsigned char host_id[2];
37 unsigned int working[2];
38 unsigned short wide_id[2];
39 unsigned short active_id[2];
40 unsigned short ultra_map[2];
41 unsigned short async[2];
Linus Torvalds1da177e2005-04-16 15:20:36 -070042 unsigned char sp[2][16];
43 unsigned char r1f[2][16];
44 struct scsi_cmnd *quereq[2][qcnt];
45 struct atp_id
46 {
47 unsigned char dirct;
48 unsigned char devsp;
49 unsigned char devtype;
50 unsigned long tran_len;
51 unsigned long last_len;
52 unsigned char *prd_pos;
James Bottomleyb5683552005-09-15 08:59:36 -050053 unsigned char *prd_table; /* Kernel address of PRD table */
54 dma_addr_t prd_bus; /* Bus address of PRD */
55 dma_addr_t prdaddr; /* Dynamically updated in driver */
Linus Torvalds1da177e2005-04-16 15:20:36 -070056 struct scsi_cmnd *curr_req;
57 } id[2][16];
58 struct Scsi_Host *host;
59 struct pci_dev *pdev;
60 unsigned int unit;
61};
62
63#endif