#include <linux/gfp.h>
#include <scsi/scsi_host.h>
#include "aic94xx.h"
#include "aic94xx_reg.h"
#include "aic94xx_hwi.h"
#include "aic94xx_seq.h"
#include "aic94xx_dump.h"
#define DL_PHY_MASK …
#define BYTES_DMAED …
#define PRIMITIVE_RECVD …
#define PHY_EVENT …
#define LINK_RESET_ERROR …
#define TIMER_EVENT …
#define REQ_TASK_ABORT …
#define REQ_DEVICE_RESET …
#define SIGNAL_NCQ_ERROR …
#define CLEAR_NCQ_ERROR …
#define PHY_EVENTS_STATUS …
static void get_lrate_mode(struct asd_phy *phy, u8 oob_mode)
{ … }
static void asd_phy_event_tasklet(struct asd_ascb *ascb,
struct done_list_struct *dl)
{ … }
static unsigned ord_phy(struct asd_ha_struct *asd_ha, struct asd_phy *phy)
{ … }
static void asd_get_attached_sas_addr(struct asd_phy *phy, u8 *sas_addr)
{ … }
static void asd_form_port(struct asd_ha_struct *asd_ha, struct asd_phy *phy)
{ … }
static void asd_deform_port(struct asd_ha_struct *asd_ha, struct asd_phy *phy)
{ … }
static void asd_bytes_dmaed_tasklet(struct asd_ascb *ascb,
struct done_list_struct *dl,
int edb_id, int phy_id)
{ … }
static void asd_link_reset_err_tasklet(struct asd_ascb *ascb,
struct done_list_struct *dl,
int phy_id)
{ … }
static void asd_primitive_rcvd_tasklet(struct asd_ascb *ascb,
struct done_list_struct *dl,
int phy_id)
{ … }
void asd_invalidate_edb(struct asd_ascb *ascb, int edb_id)
{ … }
static void escb_tasklet_complete(struct asd_ascb *ascb,
struct done_list_struct *dl)
{ … }
int asd_init_post_escbs(struct asd_ha_struct *asd_ha)
{ … }
#define CONTROL_PHY_STATUS …
static void control_phy_tasklet_complete(struct asd_ascb *ascb,
struct done_list_struct *dl)
{ … }
static void set_speed_mask(u8 *speed_mask, struct asd_phy_desc *pd)
{ … }
void asd_build_control_phy(struct asd_ascb *ascb, int phy_id, u8 subfunc)
{ … }
#if 0
static void link_adm_tasklet_complete(struct asd_ascb *ascb,
struct done_list_struct *dl)
{
u8 opcode = dl->opcode;
struct initiate_link_adm *link_adm = &ascb->scb->link_adm;
u8 phy_id = link_adm->phy_id;
if (opcode != TC_NO_ERROR) {
asd_printk("phy%d: link adm task 0x%x completed with error "
"0x%x\n", phy_id, link_adm->sub_func, opcode);
}
ASD_DPRINTK("phy%d: link adm task 0x%x: 0x%x\n",
phy_id, link_adm->sub_func, opcode);
asd_ascb_free(ascb);
}
void asd_build_initiate_link_adm_task(struct asd_ascb *ascb, int phy_id,
u8 subfunc)
{
struct scb *scb = ascb->scb;
struct initiate_link_adm *link_adm = &scb->link_adm;
scb->header.opcode = INITIATE_LINK_ADM_TASK;
link_adm->phy_id = phy_id;
link_adm->sub_func = subfunc;
link_adm->conn_handle = cpu_to_le16(0xFFFF);
ascb->tasklet_complete = link_adm_tasklet_complete;
}
#endif
void asd_ascb_timedout(struct timer_list *t)
{ … }
static const int phy_func_table[] = …;
int asd_control_phy(struct asd_sas_phy *phy, enum phy_func func, void *arg)
{ … }