struct asd_seq_data {
spinlock_t pend_q_lock;
u16 scbpro; int pending; struct list_head pend_q; int can_queue; /* per adapter */ struct asd_dma_tok next_scb; /* next scb to be delivered to CSEQ */
spinlock_t tc_index_lock; void **tc_index_array; void *tc_index_bitmap; int tc_index_bitmap_bits;
struct tasklet_struct dl_tasklet; struct done_list_struct *dl; /* array of done list entries, equals */ struct asd_dma_tok *actual_dl; /* actual_dl->vaddr */ int dl_toggle; int dl_next;
int num_edbs; struct asd_dma_tok **edb_arr; int num_escbs; struct asd_ascb **escb_arr; /* array of pointers to escbs */
};
/* This is an internal port structure. These are used to get accurate * phy_mask for updating DDB 0.
*/ struct asd_port {
u8 sas_addr[SAS_ADDR_SIZE];
u8 attached_sas_addr[SAS_ADDR_SIZE];
u32 phy_mask; int num_phys;
};
/* This is the Host Adapter structure. It describes the hardware * SAS adapter.
*/ struct asd_ha_struct { struct pci_dev *pcidev; constchar *name;
struct sas_ha_struct sas_ha;
u8 revision_id;
int iospace;
spinlock_t iolock; struct asd_ha_addrspace io_handle[2];
#define dev_to_asd_ha(__dev) pci_get_drvdata(to_pci_dev(__dev)) #define SCB_SITE_VALID(__site_no) (((__site_no) & 0xF0FF) != 0x00FF \
&& ((__site_no) & 0xF0FF) > 0x001F) /* For each bit set in __lseq_mask, set __lseq to equal the bit * position of the set bit and execute the statement following. * __mc is the temporary mask, used as a mask "counter".
*/ #define for_each_sequencer(__lseq_mask, __mc, __lseq) \ for ((__mc)=(__lseq_mask),(__lseq)=0;(__mc)!=0;(__lseq++),(__mc)>>=1)\ if (((__mc) & 1)) #define for_each_phy(__lseq_mask, __mc, __lseq) \ for ((__mc)=(__lseq_mask),(__lseq)=0;(__mc)!=0;(__lseq++),(__mc)>>=1)\ if (((__mc) & 1))
/* Must be called with the tc_index_lock held!
*/ staticinlinevoid asd_tc_index_release(struct asd_seq_data *seq, int index)
{
seq->tc_index_array[index] = NULL;
clear_bit(index, seq->tc_index_bitmap);
}
/* Must be called with the tc_index_lock held!
*/ staticinlineint asd_tc_index_get(struct asd_seq_data *seq, void *ptr)
{ int index;
index = find_first_zero_bit(seq->tc_index_bitmap,
seq->tc_index_bitmap_bits); if (index == seq->tc_index_bitmap_bits) return -1;
/* Must be called with the tc_index_lock held!
*/ staticinlinevoid *asd_tc_index_find(struct asd_seq_data *seq, int index)
{ return seq->tc_index_array[index];
}
/** * asd_ascb_free -- free a single aSCB after is has completed * @ascb: pointer to the aSCB of interest * * This frees an aSCB after it has been executed/completed by * the sequencer.
*/ staticinlinevoid asd_ascb_free(struct asd_ascb *ascb)
{ if (ascb) { struct asd_ha_struct *asd_ha = ascb->ha; unsignedlong flags;
/** * asd_ascb_list_free -- free a list of ascbs * @ascb_list: a list of ascbs * * This function will free a list of ascbs allocated by asd_ascb_alloc_list. * It is used when say the scb queueing function returned QUEUE_FULL, * and we do not need the ascbs any more.
*/ staticinlinevoid asd_ascb_free_list(struct asd_ascb *ascb_list)
{
LIST_HEAD(list); struct list_head *n, *pos;
int asd_init_hw(struct asd_ha_struct *asd_ha);
irqreturn_t asd_hw_isr(int irq, void *dev_id);
struct asd_ascb *asd_ascb_alloc_list(struct asd_ha_struct
*asd_ha, int *num,
gfp_t gfp_mask);
int asd_post_ascb_list(struct asd_ha_struct *asd_ha, struct asd_ascb *ascb, int num); int asd_post_escb_list(struct asd_ha_struct *asd_ha, struct asd_ascb *ascb, int num);
int asd_init_post_escbs(struct asd_ha_struct *asd_ha); void asd_build_control_phy(struct asd_ascb *ascb, int phy_id, u8 subfunc); void asd_control_led(struct asd_ha_struct *asd_ha, int phy_id, int op); void asd_turn_led(struct asd_ha_struct *asd_ha, int phy_id, int op); int asd_enable_phys(struct asd_ha_struct *asd_ha, const u8 phy_mask);
void asd_ascb_timedout(struct timer_list *t); int asd_chip_hardrst(struct asd_ha_struct *asd_ha);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.