Commit | Line | Data |
---|---|---|
65c85c83 | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
2908d778 JB |
2 | /* |
3 | * Aic94xx SAS/SATA driver header file. | |
4 | * | |
5 | * Copyright (C) 2005 Adaptec, Inc. All rights reserved. | |
6 | * Copyright (C) 2005 Luben Tuikov <luben_tuikov@adaptec.com> | |
7 | * | |
2908d778 JB |
8 | * $Id: //depot/aic94xx/aic94xx.h#31 $ |
9 | */ | |
10 | ||
11 | #ifndef _AIC94XX_H_ | |
12 | #define _AIC94XX_H_ | |
13 | ||
14 | #include <linux/slab.h> | |
15 | #include <linux/ctype.h> | |
16 | #include <scsi/libsas.h> | |
17 | ||
18 | #define ASD_DRIVER_NAME "aic94xx" | |
19 | #define ASD_DRIVER_DESCRIPTION "Adaptec aic94xx SAS/SATA driver" | |
20 | ||
21 | #define asd_printk(fmt, ...) printk(KERN_NOTICE ASD_DRIVER_NAME ": " fmt, ## __VA_ARGS__) | |
22 | ||
23 | #ifdef ASD_ENTER_EXIT | |
24 | #define ENTER printk(KERN_NOTICE "%s: ENTER %s\n", ASD_DRIVER_NAME, \ | |
cadbd4a5 | 25 | __func__) |
2908d778 | 26 | #define EXIT printk(KERN_NOTICE "%s: --EXIT %s\n", ASD_DRIVER_NAME, \ |
cadbd4a5 | 27 | __func__) |
2908d778 JB |
28 | #else |
29 | #define ENTER | |
30 | #define EXIT | |
31 | #endif | |
32 | ||
33 | #ifdef ASD_DEBUG | |
34 | #define ASD_DPRINTK asd_printk | |
35 | #else | |
6c26379d | 36 | #define ASD_DPRINTK(fmt, ...) no_printk(fmt, ##__VA_ARGS__) |
2908d778 JB |
37 | #endif |
38 | ||
39 | /* 2*ITNL timeout + 1 second */ | |
40 | #define AIC94XX_SCB_TIMEOUT (5*HZ) | |
41 | ||
e18b890b CL |
42 | extern struct kmem_cache *asd_dma_token_cache; |
43 | extern struct kmem_cache *asd_ascb_cache; | |
2908d778 | 44 | |
2908d778 JB |
45 | struct asd_ha_struct; |
46 | struct asd_ascb; | |
47 | ||
48 | int asd_read_ocm(struct asd_ha_struct *asd_ha); | |
49 | int asd_read_flash(struct asd_ha_struct *asd_ha); | |
50 | ||
51 | int asd_dev_found(struct domain_device *dev); | |
52 | void asd_dev_gone(struct domain_device *dev); | |
53 | ||
54 | void asd_invalidate_edb(struct asd_ascb *ascb, int edb_id); | |
55 | ||
79855d17 | 56 | int asd_execute_task(struct sas_task *task, gfp_t gfp_flags); |
2908d778 | 57 | |
b91bb296 DW |
58 | void asd_set_dmamode(struct domain_device *dev); |
59 | ||
2908d778 JB |
60 | /* ---------- TMFs ---------- */ |
61 | int asd_abort_task(struct sas_task *); | |
62 | int asd_abort_task_set(struct domain_device *, u8 *lun); | |
63 | int asd_clear_aca(struct domain_device *, u8 *lun); | |
64 | int asd_clear_task_set(struct domain_device *, u8 *lun); | |
65 | int asd_lu_reset(struct domain_device *, u8 *lun); | |
63edf49e | 66 | int asd_I_T_nexus_reset(struct domain_device *dev); |
2908d778 JB |
67 | int asd_query_task(struct sas_task *); |
68 | ||
69 | /* ---------- Adapter and Port management ---------- */ | |
70 | int asd_clear_nexus_port(struct asd_sas_port *port); | |
71 | int asd_clear_nexus_ha(struct sas_ha_struct *sas_ha); | |
72 | ||
73 | /* ---------- Phy Management ---------- */ | |
a01e70e5 | 74 | int asd_control_phy(struct asd_sas_phy *phy, enum phy_func func, void *arg); |
2908d778 JB |
75 | |
76 | #endif |