Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _ATP870U_H
0003 #define _ATP870U_H
0004 
0005 #include <linux/types.h>
0006 #include <linux/kdev_t.h>
0007 
0008 /* I/O Port */
0009 
0010 #define MAX_CDB     12
0011 #define MAX_SENSE   14
0012 #define qcnt        32
0013 #define ATP870U_SCATTER 128
0014 
0015 #define MAX_ADAPTER 8
0016 #define MAX_SCSI_ID 16
0017 #define ATP870U_MAX_SECTORS 128
0018 
0019 #define ATP885_DEVID 0x808A
0020 #define ATP880_DEVID1 0x8080
0021 #define ATP880_DEVID2 0x8081
0022 
0023 //#define ED_DBGP
0024 
0025 struct atp_unit
0026 {
0027     unsigned long baseport;
0028     unsigned long ioport[2];
0029     unsigned long pciport[2];
0030     unsigned char last_cmd[2];
0031     unsigned char in_snd[2];
0032     unsigned char in_int[2];
0033     unsigned char quhd[2];
0034     unsigned char quend[2];
0035     unsigned char global_map[2];
0036     unsigned char host_id[2];
0037     unsigned int working[2];
0038     unsigned short wide_id[2];
0039     unsigned short active_id[2];
0040     unsigned short ultra_map[2];
0041     unsigned short async[2];
0042     unsigned char sp[2][16];
0043     unsigned char r1f[2][16];
0044     struct scsi_cmnd *quereq[2][qcnt];
0045     struct atp_id
0046     {
0047         unsigned char dirct;
0048         unsigned char devsp;
0049         unsigned char devtype;
0050         unsigned long tran_len;
0051         unsigned long last_len;
0052         unsigned char *prd_pos;
0053         unsigned char *prd_table;   /* Kernel address of PRD table */
0054         dma_addr_t prd_bus;     /* Bus address of PRD */
0055         dma_addr_t prdaddr;     /* Dynamically updated in driver */
0056         struct scsi_cmnd *curr_req;
0057     } id[2][16];
0058     struct Scsi_Host *host;
0059     struct pci_dev *pdev;
0060     unsigned int unit;
0061 };
0062 
0063 #endif