mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-03 00:54:09 +08:00
65c85c8378
Based on 1 normalized pattern(s): this file is licensed under gplv2 this file is part of the [aic94xx] driver the [aic94xx] driver is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation version 2 of the license the [aic94xx] driver is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with the [aic94xx] driver if not write to the free software foundation inc 51 franklin st fifth floor boston ma 02110 1301 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 19 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190531190112.766909183@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
85 lines
2.3 KiB
C
85 lines
2.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Aic94xx SAS/SATA driver header file.
|
|
*
|
|
* Copyright (C) 2005 Adaptec, Inc. All rights reserved.
|
|
* Copyright (C) 2005 Luben Tuikov <luben_tuikov@adaptec.com>
|
|
*
|
|
* $Id: //depot/aic94xx/aic94xx.h#31 $
|
|
*/
|
|
|
|
#ifndef _AIC94XX_H_
|
|
#define _AIC94XX_H_
|
|
|
|
#include <linux/slab.h>
|
|
#include <linux/ctype.h>
|
|
#include <scsi/libsas.h>
|
|
|
|
#define ASD_DRIVER_NAME "aic94xx"
|
|
#define ASD_DRIVER_DESCRIPTION "Adaptec aic94xx SAS/SATA driver"
|
|
|
|
#define asd_printk(fmt, ...) printk(KERN_NOTICE ASD_DRIVER_NAME ": " fmt, ## __VA_ARGS__)
|
|
|
|
#ifdef ASD_ENTER_EXIT
|
|
#define ENTER printk(KERN_NOTICE "%s: ENTER %s\n", ASD_DRIVER_NAME, \
|
|
__func__)
|
|
#define EXIT printk(KERN_NOTICE "%s: --EXIT %s\n", ASD_DRIVER_NAME, \
|
|
__func__)
|
|
#else
|
|
#define ENTER
|
|
#define EXIT
|
|
#endif
|
|
|
|
#ifdef ASD_DEBUG
|
|
#define ASD_DPRINTK asd_printk
|
|
#else
|
|
#define ASD_DPRINTK(fmt, ...)
|
|
#endif
|
|
|
|
/* 2*ITNL timeout + 1 second */
|
|
#define AIC94XX_SCB_TIMEOUT (5*HZ)
|
|
|
|
extern struct kmem_cache *asd_dma_token_cache;
|
|
extern struct kmem_cache *asd_ascb_cache;
|
|
|
|
static inline void asd_stringify_sas_addr(char *p, const u8 *sas_addr)
|
|
{
|
|
int i;
|
|
for (i = 0; i < SAS_ADDR_SIZE; i++, p += 2)
|
|
snprintf(p, 3, "%02X", sas_addr[i]);
|
|
*p = '\0';
|
|
}
|
|
|
|
struct asd_ha_struct;
|
|
struct asd_ascb;
|
|
|
|
int asd_read_ocm(struct asd_ha_struct *asd_ha);
|
|
int asd_read_flash(struct asd_ha_struct *asd_ha);
|
|
|
|
int asd_dev_found(struct domain_device *dev);
|
|
void asd_dev_gone(struct domain_device *dev);
|
|
|
|
void asd_invalidate_edb(struct asd_ascb *ascb, int edb_id);
|
|
|
|
int asd_execute_task(struct sas_task *task, gfp_t gfp_flags);
|
|
|
|
void asd_set_dmamode(struct domain_device *dev);
|
|
|
|
/* ---------- TMFs ---------- */
|
|
int asd_abort_task(struct sas_task *);
|
|
int asd_abort_task_set(struct domain_device *, u8 *lun);
|
|
int asd_clear_aca(struct domain_device *, u8 *lun);
|
|
int asd_clear_task_set(struct domain_device *, u8 *lun);
|
|
int asd_lu_reset(struct domain_device *, u8 *lun);
|
|
int asd_I_T_nexus_reset(struct domain_device *dev);
|
|
int asd_query_task(struct sas_task *);
|
|
|
|
/* ---------- Adapter and Port management ---------- */
|
|
int asd_clear_nexus_port(struct asd_sas_port *port);
|
|
int asd_clear_nexus_ha(struct sas_ha_struct *sas_ha);
|
|
|
|
/* ---------- Phy Management ---------- */
|
|
int asd_control_phy(struct asd_sas_phy *phy, enum phy_func func, void *arg);
|
|
|
|
#endif
|