#include <linux/kernel.h>
#include <linux/bsg-lib.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_transport_sas.h>
#include <linux/unaligned.h>
#include "smartpqi.h"
static struct pqi_sas_phy *pqi_alloc_sas_phy(struct pqi_sas_port *pqi_sas_port)
{ … }
static void pqi_free_sas_phy(struct pqi_sas_phy *pqi_sas_phy)
{ … }
static int pqi_sas_port_add_phy(struct pqi_sas_phy *pqi_sas_phy)
{ … }
static int pqi_sas_port_add_rphy(struct pqi_sas_port *pqi_sas_port,
struct sas_rphy *rphy)
{ … }
static struct sas_rphy *pqi_sas_rphy_alloc(struct pqi_sas_port *pqi_sas_port)
{ … }
static struct pqi_sas_port *pqi_alloc_sas_port(
struct pqi_sas_node *pqi_sas_node, u64 sas_address,
struct pqi_scsi_dev *device)
{ … }
static void pqi_free_sas_port(struct pqi_sas_port *pqi_sas_port)
{ … }
static struct pqi_sas_node *pqi_alloc_sas_node(struct device *parent_dev)
{ … }
static void pqi_free_sas_node(struct pqi_sas_node *pqi_sas_node)
{ … }
struct pqi_scsi_dev *pqi_find_device_by_sas_rphy(
struct pqi_ctrl_info *ctrl_info, struct sas_rphy *rphy)
{ … }
int pqi_add_sas_host(struct Scsi_Host *shost, struct pqi_ctrl_info *ctrl_info)
{ … }
void pqi_delete_sas_host(struct pqi_ctrl_info *ctrl_info)
{ … }
int pqi_add_sas_device(struct pqi_sas_node *pqi_sas_node,
struct pqi_scsi_dev *device)
{ … }
void pqi_remove_sas_device(struct pqi_scsi_dev *device)
{ … }
static int pqi_sas_get_linkerrors(struct sas_phy *phy)
{ … }
static int pqi_sas_get_enclosure_identifier(struct sas_rphy *rphy,
u64 *identifier)
{ … }
static int pqi_sas_get_bay_identifier(struct sas_rphy *rphy)
{ … }
static int pqi_sas_phy_reset(struct sas_phy *phy, int hard_reset)
{ … }
static int pqi_sas_phy_enable(struct sas_phy *phy, int enable)
{ … }
static int pqi_sas_phy_setup(struct sas_phy *phy)
{ … }
static void pqi_sas_phy_release(struct sas_phy *phy)
{ … }
static int pqi_sas_phy_speed(struct sas_phy *phy,
struct sas_phy_linkrates *rates)
{ … }
#define CSMI_IOCTL_TIMEOUT …
#define SMP_CRC_FIELD_LENGTH …
static struct bmic_csmi_smp_passthru_buffer *
pqi_build_csmi_smp_passthru_buffer(struct sas_rphy *rphy,
struct bsg_job *job)
{ … }
static unsigned int pqi_build_sas_smp_handler_reply(
struct bmic_csmi_smp_passthru_buffer *smp_buf, struct bsg_job *job,
struct pqi_raid_error_info *error_info)
{ … }
void pqi_sas_smp_handler(struct bsg_job *job, struct Scsi_Host *shost,
struct sas_rphy *rphy)
{ … }
struct sas_function_template pqi_sas_transport_functions = …;