linux/drivers/scsi/libsas/sas_scsi_host.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Serial Attached SCSI (SAS) class SCSI Host glue.
 *
 * Copyright (C) 2005 Adaptec, Inc.  All rights reserved.
 * Copyright (C) 2005 Luben Tuikov <[email protected]>
 */

#include <linux/kthread.h>
#include <linux/firmware.h>
#include <linux/export.h>
#include <linux/ctype.h>
#include <linux/kernel.h>

#include "sas_internal.h"

#include <scsi/scsi_host.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_tcq.h>
#include <scsi/scsi.h>
#include <scsi/scsi_eh.h>
#include <scsi/scsi_transport.h>
#include <scsi/scsi_transport_sas.h>
#include <scsi/sas_ata.h>
#include "scsi_sas_internal.h"
#include "scsi_transport_api.h"
#include "scsi_priv.h"

#include <linux/err.h>
#include <linux/blkdev.h>
#include <linux/freezer.h>
#include <linux/gfp.h>
#include <linux/scatterlist.h>
#include <linux/libata.h>

/* record final status and free the task */
static void sas_end_task(struct scsi_cmnd *sc, struct sas_task *task)
{}

static void sas_scsi_task_done(struct sas_task *task)
{}

static struct sas_task *sas_create_task(struct scsi_cmnd *cmd,
					       struct domain_device *dev,
					       gfp_t gfp_flags)
{}

int sas_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
{}
EXPORT_SYMBOL_GPL();

static void sas_eh_finish_cmd(struct scsi_cmnd *cmd)
{}

static void sas_scsi_clear_queue_lu(struct list_head *error_q, struct scsi_cmnd *my_cmd)
{}

static void sas_scsi_clear_queue_I_T(struct list_head *error_q,
				     struct domain_device *dev)
{}

static void sas_scsi_clear_queue_port(struct list_head *error_q,
				      struct asd_sas_port *port)
{}

enum task_disposition {};

static enum task_disposition sas_scsi_find_task(struct sas_task *task)
{}

static int sas_recover_lu(struct domain_device *dev, struct scsi_cmnd *cmd)
{}

static int sas_recover_I_T(struct domain_device *dev)
{}

/* take a reference on the last known good phy for this device */
struct sas_phy *sas_get_local_phy(struct domain_device *dev)
{}
EXPORT_SYMBOL_GPL();

static int sas_queue_reset(struct domain_device *dev, int reset_type, u64 lun)
{}

int sas_eh_abort_handler(struct scsi_cmnd *cmd)
{}
EXPORT_SYMBOL_GPL();

/* Attempt to send a LUN reset message to a device */
int sas_eh_device_reset_handler(struct scsi_cmnd *cmd)
{}
EXPORT_SYMBOL_GPL();

int sas_eh_target_reset_handler(struct scsi_cmnd *cmd)
{}
EXPORT_SYMBOL_GPL();

/* Try to reset a device */
static int try_to_reset_cmd_device(struct scsi_cmnd *cmd)
{}

static void sas_eh_handle_sas_errors(struct Scsi_Host *shost, struct list_head *work_q)
{}

static void sas_eh_handle_resets(struct Scsi_Host *shost)
{}


void sas_scsi_recover_host(struct Scsi_Host *shost)
{}

int sas_ioctl(struct scsi_device *sdev, unsigned int cmd, void __user *arg)
{}
EXPORT_SYMBOL_GPL();

struct domain_device *sas_find_dev_by_rphy(struct sas_rphy *rphy)
{}

int sas_target_alloc(struct scsi_target *starget)
{}
EXPORT_SYMBOL_GPL();

#define SAS_DEF_QD

int sas_device_configure(struct scsi_device *scsi_dev,
		struct queue_limits *lim)
{}
EXPORT_SYMBOL_GPL();

int sas_change_queue_depth(struct scsi_device *sdev, int depth)
{}
EXPORT_SYMBOL_GPL();

int sas_bios_param(struct scsi_device *scsi_dev,
			  struct block_device *bdev,
			  sector_t capacity, int *hsc)
{}
EXPORT_SYMBOL_GPL();

void sas_task_internal_done(struct sas_task *task)
{}

void sas_task_internal_timedout(struct timer_list *t)
{}

#define TASK_TIMEOUT
#define TASK_RETRY

static int sas_execute_internal_abort(struct domain_device *device,
				      enum sas_internal_abort type, u16 tag,
				      unsigned int qid, void *data)
{}

int sas_execute_internal_abort_single(struct domain_device *device, u16 tag,
				      unsigned int qid, void *data)
{}
EXPORT_SYMBOL_GPL();

int sas_execute_internal_abort_dev(struct domain_device *device,
				   unsigned int qid, void *data)
{}
EXPORT_SYMBOL_GPL();

int sas_execute_tmf(struct domain_device *device, void *parameter,
		    int para_len, int force_phy_id,
		    struct sas_tmf_task *tmf)
{}

static int sas_execute_ssp_tmf(struct domain_device *device, u8 *lun,
			       struct sas_tmf_task *tmf)
{}

int sas_abort_task_set(struct domain_device *dev, u8 *lun)
{}
EXPORT_SYMBOL_GPL();

int sas_clear_task_set(struct domain_device *dev, u8 *lun)
{}
EXPORT_SYMBOL_GPL();

int sas_lu_reset(struct domain_device *dev, u8 *lun)
{}
EXPORT_SYMBOL_GPL();

int sas_query_task(struct sas_task *task, u16 tag)
{}
EXPORT_SYMBOL_GPL();

int sas_abort_task(struct sas_task *task, u16 tag)
{}
EXPORT_SYMBOL_GPL();

/*
 * Tell an upper layer that it needs to initiate an abort for a given task.
 * This should only ever be called by an LLDD.
 */
void sas_task_abort(struct sas_task *task)
{}
EXPORT_SYMBOL_GPL();

int sas_slave_alloc(struct scsi_device *sdev)
{}
EXPORT_SYMBOL_GPL();

void sas_target_destroy(struct scsi_target *starget)
{}
EXPORT_SYMBOL_GPL();

#define SAS_STRING_ADDR_SIZE

int sas_request_addr(struct Scsi_Host *shost, u8 *addr)
{}
EXPORT_SYMBOL_GPL();