/Linux-v4.19/drivers/scsi/aic94xx/ |
D | aic94xx_seq.c | 64 static int asd_pause_cseq(struct asd_ha_struct *asd_ha) in asd_pause_cseq() argument 69 arp2ctl = asd_read_reg_dword(asd_ha, CARP2CTL); in asd_pause_cseq() 73 asd_write_reg_dword(asd_ha, CARP2CTL, arp2ctl | EPAUSE); in asd_pause_cseq() 75 arp2ctl = asd_read_reg_dword(asd_ha, CARP2CTL); in asd_pause_cseq() 91 static int asd_unpause_cseq(struct asd_ha_struct *asd_ha) in asd_unpause_cseq() argument 96 arp2ctl = asd_read_reg_dword(asd_ha, CARP2CTL); in asd_unpause_cseq() 100 asd_write_reg_dword(asd_ha, CARP2CTL, arp2ctl & ~EPAUSE); in asd_unpause_cseq() 102 arp2ctl = asd_read_reg_dword(asd_ha, CARP2CTL); in asd_unpause_cseq() 119 static int asd_seq_pause_lseq(struct asd_ha_struct *asd_ha, int lseq) in asd_seq_pause_lseq() argument 124 arp2ctl = asd_read_reg_dword(asd_ha, LmARP2CTL(lseq)); in asd_seq_pause_lseq() [all …]
|
D | aic94xx_dump.c | 283 static void asd_dump_cseq_state(struct asd_ha_struct *asd_ha) in asd_dump_cseq_state() argument 291 PRINT_CREG_32bit(asd_ha, ARP2CTL); in asd_dump_cseq_state() 292 PRINT_CREG_32bit(asd_ha, ARP2INT); in asd_dump_cseq_state() 293 PRINT_CREG_32bit(asd_ha, ARP2INTEN); in asd_dump_cseq_state() 294 PRINT_CREG_8bit(asd_ha, MODEPTR); in asd_dump_cseq_state() 295 PRINT_CREG_8bit(asd_ha, ALTMODE); in asd_dump_cseq_state() 296 PRINT_CREG_8bit(asd_ha, FLAG); in asd_dump_cseq_state() 297 PRINT_CREG_8bit(asd_ha, ARP2INTCTL); in asd_dump_cseq_state() 298 PRINT_CREG_16bit(asd_ha, STACK); in asd_dump_cseq_state() 299 PRINT_CREG_16bit(asd_ha, PRGMCNT); in asd_dump_cseq_state() [all …]
|
D | aic94xx_init.c | 79 static int asd_map_memio(struct asd_ha_struct *asd_ha) in asd_map_memio() argument 84 asd_ha->iospace = 0; in asd_map_memio() 86 io_handle = &asd_ha->io_handle[i==0?0:1]; in asd_map_memio() 87 io_handle->start = pci_resource_start(asd_ha->pcidev, i); in asd_map_memio() 88 io_handle->len = pci_resource_len(asd_ha->pcidev, i); in asd_map_memio() 89 io_handle->flags = pci_resource_flags(asd_ha->pcidev, i); in asd_map_memio() 93 i==0?0:1, pci_name(asd_ha->pcidev)); in asd_map_memio() 96 err = pci_request_region(asd_ha->pcidev, i, ASD_DRIVER_NAME); in asd_map_memio() 99 pci_name(asd_ha->pcidev)); in asd_map_memio() 105 pci_name(asd_ha->pcidev)); in asd_map_memio() [all …]
|
D | aic94xx_hwi.c | 43 static int asd_get_user_sas_addr(struct asd_ha_struct *asd_ha) in asd_get_user_sas_addr() argument 46 if (asd_ha->hw_prof.sas_addr[0]) in asd_get_user_sas_addr() 49 return sas_request_addr(asd_ha->sas_ha.core.shost, in asd_get_user_sas_addr() 50 asd_ha->hw_prof.sas_addr); in asd_get_user_sas_addr() 53 static void asd_propagate_sas_addr(struct asd_ha_struct *asd_ha) in asd_propagate_sas_addr() argument 58 if (asd_ha->hw_prof.phy_desc[i].sas_addr[0] == 0) in asd_propagate_sas_addr() 63 SAS_ADDR(asd_ha->hw_prof.sas_addr)); in asd_propagate_sas_addr() 64 memcpy(asd_ha->hw_prof.phy_desc[i].sas_addr, in asd_propagate_sas_addr() 65 asd_ha->hw_prof.sas_addr, SAS_ADDR_SIZE); in asd_propagate_sas_addr() 89 struct asd_ha_struct *asd_ha = phy->sas_phy.ha->lldd_ha; in asd_init_phy() local [all …]
|
D | aic94xx_reg.c | 35 static void asd_write_byte(struct asd_ha_struct *asd_ha, in asd_write_byte() argument 38 if (unlikely(asd_ha->iospace)) in asd_write_byte() 40 (unsigned long)asd_ha->io_handle[0].addr + (offs & 0xFF)); in asd_write_byte() 42 writeb(val, asd_ha->io_handle[0].addr + offs); in asd_write_byte() 46 static void asd_write_word(struct asd_ha_struct *asd_ha, in asd_write_word() argument 49 if (unlikely(asd_ha->iospace)) in asd_write_word() 51 (unsigned long)asd_ha->io_handle[0].addr + (offs & 0xFF)); in asd_write_word() 53 writew(val, asd_ha->io_handle[0].addr + offs); in asd_write_word() 57 static void asd_write_dword(struct asd_ha_struct *asd_ha, in asd_write_dword() argument 60 if (unlikely(asd_ha->iospace)) in asd_write_dword() [all …]
|
D | aic94xx_sds.c | 134 static int asd_read_ocm_seg(struct asd_ha_struct *asd_ha, void *buffer, in asd_read_ocm_seg() argument 138 if (unlikely(asd_ha->iospace)) in asd_read_ocm_seg() 139 asd_read_reg_string(asd_ha, buffer, offs+OCM_BASE_ADDR, size); in asd_read_ocm_seg() 142 *p = asd_read_ocm_byte(asd_ha, offs); in asd_read_ocm_seg() 147 static int asd_read_ocm_dir(struct asd_ha_struct *asd_ha, in asd_read_ocm_dir() argument 150 int err = asd_read_ocm_seg(asd_ha, dir, offs, sizeof(*dir)); in asd_read_ocm_dir() 179 static void asd_write_ocm_seg(struct asd_ha_struct *asd_ha, void *buffer, in asd_write_ocm_seg() argument 183 if (unlikely(asd_ha->iospace)) in asd_write_ocm_seg() 184 asd_write_reg_string(asd_ha, buffer, offs+OCM_BASE_ADDR, size); in asd_write_ocm_seg() 187 asd_write_ocm_byte(asd_ha, offs, *p); in asd_write_ocm_seg() [all …]
|
D | aic94xx_reg.h | 64 u8 asd_read_reg_byte(struct asd_ha_struct *asd_ha, u32 reg); 65 u16 asd_read_reg_word(struct asd_ha_struct *asd_ha, u32 reg); 66 u32 asd_read_reg_dword(struct asd_ha_struct *asd_ha, u32 reg); 68 void asd_write_reg_byte(struct asd_ha_struct *asd_ha, u32 reg, u8 val); 69 void asd_write_reg_word(struct asd_ha_struct *asd_ha, u32 reg, u16 val); 70 void asd_write_reg_dword(struct asd_ha_struct *asd_ha, u32 reg, u32 val); 72 void asd_read_reg_string(struct asd_ha_struct *asd_ha, void *dst, 74 void asd_write_reg_string(struct asd_ha_struct *asd_ha, void *src, 78 static inline type asd_read_ocm_##ord (struct asd_ha_struct *asd_ha, \ 81 struct asd_ha_addrspace *io_handle = &asd_ha->io_handle[1]; \ [all …]
|
D | aic94xx_dev.c | 38 static int asd_get_ddb(struct asd_ha_struct *asd_ha) in asd_get_ddb() argument 42 ddb = FIND_FREE_DDB(asd_ha); in asd_get_ddb() 43 if (ddb >= asd_ha->hw_prof.max_ddbs) { in asd_get_ddb() 47 SET_DDB(ddb, asd_ha); in asd_get_ddb() 50 asd_ddbsite_write_dword(asd_ha, ddb, i, 0); in asd_get_ddb() 74 static void asd_free_ddb(struct asd_ha_struct *asd_ha, int ddb) in asd_free_ddb() argument 78 asd_ddbsite_write_byte(asd_ha, ddb, DDB_TYPE, DDB_TYPE_UNUSED); in asd_free_ddb() 79 CLEAR_DDB(ddb, asd_ha); in asd_free_ddb() 84 struct asd_ha_struct *asd_ha = dev->port->ha->lldd_ha; in asd_set_ddb_type() local 88 asd_ddbsite_write_byte(asd_ha,ddb, DDB_TYPE, DDB_TYPE_PM_PORT); in asd_set_ddb_type() [all …]
|
D | aic94xx_scb.c | 88 struct asd_ha_struct *asd_ha = ascb->ha; in asd_phy_event_tasklet() local 89 struct sas_ha_struct *sas_ha = &asd_ha->sas_ha; in asd_phy_event_tasklet() 91 struct asd_phy *phy = &asd_ha->phys[phy_id]; in asd_phy_event_tasklet() 100 asd_turn_led(asd_ha, phy_id, 0); in asd_phy_event_tasklet() 106 asd_turn_led(asd_ha, phy_id, 1); in asd_phy_event_tasklet() 114 asd_turn_led(asd_ha, phy_id, 1); in asd_phy_event_tasklet() 121 asd_turn_led(asd_ha, phy_id, 0); in asd_phy_event_tasklet() 129 static unsigned ord_phy(struct asd_ha_struct *asd_ha, struct asd_phy *phy) in ord_phy() argument 131 u8 enabled_mask = asd_ha->hw_prof.enabled_phys; in ord_phy() 135 if (&asd_ha->phys[i] == phy) in ord_phy() [all …]
|
D | aic94xx_hwi.h | 260 asd_ha, size_t size, in asd_alloc_coherent() 266 token->vaddr = dma_alloc_coherent(&asd_ha->pcidev->dev, in asd_alloc_coherent() 278 static inline void asd_free_coherent(struct asd_ha_struct *asd_ha, in asd_free_coherent() argument 282 dma_free_coherent(&asd_ha->pcidev->dev, token->size, in asd_free_coherent() 288 static inline void asd_init_ascb(struct asd_ha_struct *asd_ha, in asd_init_ascb() argument 293 ascb->ha = asd_ha; in asd_init_ascb() 340 struct asd_ha_struct *asd_ha = ascb->ha; in asd_ascb_free() local 347 dma_pool_free(asd_ha->scb_pool, ascb->dma_scb.vaddr, in asd_ascb_free() 375 int asd_init_hw(struct asd_ha_struct *asd_ha); 380 *asd_ha, int *num, [all …]
|
D | aic94xx_task.c | 36 static void asd_can_dequeue(struct asd_ha_struct *asd_ha, int num) in asd_can_dequeue() argument 40 spin_lock_irqsave(&asd_ha->seq.pend_q_lock, flags); in asd_can_dequeue() 41 asd_ha->seq.can_queue += num; in asd_can_dequeue() 42 spin_unlock_irqrestore(&asd_ha->seq.pend_q_lock, flags); in asd_can_dequeue() 59 struct asd_ha_struct *asd_ha = ascb->ha; in asd_map_scatterlist() local 68 dma_addr_t dma = pci_map_single(asd_ha->pcidev, p, in asd_map_scatterlist() 82 num_sg = pci_map_sg(asd_ha->pcidev, task->scatter, in asd_map_scatterlist() 90 ascb->sg_arr = asd_alloc_coherent(asd_ha, in asd_map_scatterlist() 129 pci_unmap_sg(asd_ha->pcidev, task->scatter, task->num_scatter, in asd_map_scatterlist() 136 struct asd_ha_struct *asd_ha = ascb->ha; in asd_unmap_scatterlist() local [all …]
|
D | aic94xx_sds.h | 112 int asd_verify_flash_seg(struct asd_ha_struct *asd_ha, 114 int asd_write_flash_seg(struct asd_ha_struct *asd_ha, 116 int asd_chk_write_status(struct asd_ha_struct *asd_ha, 118 int asd_check_flash_type(struct asd_ha_struct *asd_ha); 119 int asd_erase_nv_sector(struct asd_ha_struct *asd_ha,
|
D | aic94xx_tmf.c | 108 ascb = asd_ascb_alloc_list(asd_ha, &res, GFP_KERNEL); \ 135 struct asd_ha_struct *asd_ha = sas_ha->lldd_ha; in asd_clear_nexus_ha() local 144 struct asd_ha_struct *asd_ha = port->ha->lldd_ha; in asd_clear_nexus_port() local 161 struct asd_ha_struct *asd_ha = dev->port->ha->lldd_ha; in asd_clear_nexus_I_T() local 221 struct asd_ha_struct *asd_ha = dev->port->ha->lldd_ha; in asd_clear_nexus_I_T_L() local 234 struct asd_ha_struct *asd_ha = task->dev->port->ha->lldd_ha; in asd_clear_nexus_tag() local 249 struct asd_ha_struct *asd_ha = task->dev->port->ha->lldd_ha; in asd_clear_nexus_index() local 276 struct asd_ha_struct *asd_ha = ascb->ha; in asd_get_tmf_resp_tasklet() local 293 spin_lock_irqsave(&asd_ha->seq.tc_index_lock, flags); in asd_get_tmf_resp_tasklet() 294 escb = asd_tc_index_find(&asd_ha->seq, in asd_get_tmf_resp_tasklet() [all …]
|
D | aic94xx_seq.h | 61 int asd_init_seqs(struct asd_ha_struct *asd_ha); 62 int asd_start_seqs(struct asd_ha_struct *asd_ha); 65 void asd_update_port_links(struct asd_ha_struct *asd_ha, struct asd_phy *phy);
|
D | aic94xx_dump.h | 32 void asd_dump_seq_state(struct asd_ha_struct *asd_ha, u8 lseq_mask); 37 static inline void asd_dump_seq_state(struct asd_ha_struct *asd_ha, in asd_dump_seq_state() argument
|
D | aic94xx.h | 73 int asd_read_ocm(struct asd_ha_struct *asd_ha); 74 int asd_read_flash(struct asd_ha_struct *asd_ha);
|