Home
last modified time | relevance | path

Searched refs:asd_ha (Results 1 – 16 of 16) sorted by relevance

/linux-5.19.10/drivers/scsi/aic94xx/
Daic94xx_seq.c46 static int asd_pause_cseq(struct asd_ha_struct *asd_ha) in asd_pause_cseq() argument
51 arp2ctl = asd_read_reg_dword(asd_ha, CARP2CTL); in asd_pause_cseq()
55 asd_write_reg_dword(asd_ha, CARP2CTL, arp2ctl | EPAUSE); in asd_pause_cseq()
57 arp2ctl = asd_read_reg_dword(asd_ha, CARP2CTL); in asd_pause_cseq()
73 static int asd_unpause_cseq(struct asd_ha_struct *asd_ha) in asd_unpause_cseq() argument
78 arp2ctl = asd_read_reg_dword(asd_ha, CARP2CTL); in asd_unpause_cseq()
82 asd_write_reg_dword(asd_ha, CARP2CTL, arp2ctl & ~EPAUSE); in asd_unpause_cseq()
84 arp2ctl = asd_read_reg_dword(asd_ha, CARP2CTL); in asd_unpause_cseq()
101 static int asd_seq_pause_lseq(struct asd_ha_struct *asd_ha, int lseq) in asd_seq_pause_lseq() argument
106 arp2ctl = asd_read_reg_dword(asd_ha, LmARP2CTL(lseq)); in asd_seq_pause_lseq()
[all …]
Daic94xx_dump.c265 static void asd_dump_cseq_state(struct asd_ha_struct *asd_ha) in asd_dump_cseq_state() argument
273 PRINT_CREG_32bit(asd_ha, ARP2CTL); in asd_dump_cseq_state()
274 PRINT_CREG_32bit(asd_ha, ARP2INT); in asd_dump_cseq_state()
275 PRINT_CREG_32bit(asd_ha, ARP2INTEN); in asd_dump_cseq_state()
276 PRINT_CREG_8bit(asd_ha, MODEPTR); in asd_dump_cseq_state()
277 PRINT_CREG_8bit(asd_ha, ALTMODE); in asd_dump_cseq_state()
278 PRINT_CREG_8bit(asd_ha, FLAG); in asd_dump_cseq_state()
279 PRINT_CREG_8bit(asd_ha, ARP2INTCTL); in asd_dump_cseq_state()
280 PRINT_CREG_16bit(asd_ha, STACK); in asd_dump_cseq_state()
281 PRINT_CREG_16bit(asd_ha, PRGMCNT); in asd_dump_cseq_state()
[all …]
Daic94xx_init.c65 static int asd_map_memio(struct asd_ha_struct *asd_ha) in asd_map_memio() argument
70 asd_ha->iospace = 0; in asd_map_memio()
72 io_handle = &asd_ha->io_handle[i==0?0:1]; in asd_map_memio()
73 io_handle->start = pci_resource_start(asd_ha->pcidev, i); in asd_map_memio()
74 io_handle->len = pci_resource_len(asd_ha->pcidev, i); in asd_map_memio()
75 io_handle->flags = pci_resource_flags(asd_ha->pcidev, i); in asd_map_memio()
79 i==0?0:1, pci_name(asd_ha->pcidev)); in asd_map_memio()
82 err = pci_request_region(asd_ha->pcidev, i, ASD_DRIVER_NAME); in asd_map_memio()
85 pci_name(asd_ha->pcidev)); in asd_map_memio()
91 pci_name(asd_ha->pcidev)); in asd_map_memio()
[all …]
Daic94xx_hwi.c25 static int asd_get_user_sas_addr(struct asd_ha_struct *asd_ha) in asd_get_user_sas_addr() argument
28 if (asd_ha->hw_prof.sas_addr[0]) in asd_get_user_sas_addr()
31 return sas_request_addr(asd_ha->sas_ha.core.shost, in asd_get_user_sas_addr()
32 asd_ha->hw_prof.sas_addr); in asd_get_user_sas_addr()
35 static void asd_propagate_sas_addr(struct asd_ha_struct *asd_ha) in asd_propagate_sas_addr() argument
40 if (asd_ha->hw_prof.phy_desc[i].sas_addr[0] == 0) in asd_propagate_sas_addr()
45 SAS_ADDR(asd_ha->hw_prof.sas_addr)); in asd_propagate_sas_addr()
46 memcpy(asd_ha->hw_prof.phy_desc[i].sas_addr, in asd_propagate_sas_addr()
47 asd_ha->hw_prof.sas_addr, SAS_ADDR_SIZE); in asd_propagate_sas_addr()
71 struct asd_ha_struct *asd_ha = phy->sas_phy.ha->lldd_ha; in asd_init_phy() local
[all …]
Daic94xx_reg.c17 static void asd_write_byte(struct asd_ha_struct *asd_ha, in asd_write_byte() argument
20 if (unlikely(asd_ha->iospace)) in asd_write_byte()
22 (unsigned long)asd_ha->io_handle[0].addr + (offs & 0xFF)); in asd_write_byte()
24 writeb(val, asd_ha->io_handle[0].addr + offs); in asd_write_byte()
28 static void asd_write_word(struct asd_ha_struct *asd_ha, in asd_write_word() argument
31 if (unlikely(asd_ha->iospace)) in asd_write_word()
33 (unsigned long)asd_ha->io_handle[0].addr + (offs & 0xFF)); in asd_write_word()
35 writew(val, asd_ha->io_handle[0].addr + offs); in asd_write_word()
39 static void asd_write_dword(struct asd_ha_struct *asd_ha, in asd_write_dword() argument
42 if (unlikely(asd_ha->iospace)) in asd_write_dword()
[all …]
Daic94xx_sds.c116 static int asd_read_ocm_seg(struct asd_ha_struct *asd_ha, void *buffer, in asd_read_ocm_seg() argument
120 if (unlikely(asd_ha->iospace)) in asd_read_ocm_seg()
121 asd_read_reg_string(asd_ha, buffer, offs+OCM_BASE_ADDR, size); in asd_read_ocm_seg()
124 *p = asd_read_ocm_byte(asd_ha, offs); in asd_read_ocm_seg()
129 static int asd_read_ocm_dir(struct asd_ha_struct *asd_ha, in asd_read_ocm_dir() argument
132 int err = asd_read_ocm_seg(asd_ha, dir, offs, sizeof(*dir)); in asd_read_ocm_dir()
161 static void asd_write_ocm_seg(struct asd_ha_struct *asd_ha, void *buffer, in asd_write_ocm_seg() argument
165 if (unlikely(asd_ha->iospace)) in asd_write_ocm_seg()
166 asd_write_reg_string(asd_ha, buffer, offs+OCM_BASE_ADDR, size); in asd_write_ocm_seg()
169 asd_write_ocm_byte(asd_ha, offs, *p); in asd_write_ocm_seg()
[all …]
Daic94xx_reg.h46 u8 asd_read_reg_byte(struct asd_ha_struct *asd_ha, u32 reg);
47 u16 asd_read_reg_word(struct asd_ha_struct *asd_ha, u32 reg);
48 u32 asd_read_reg_dword(struct asd_ha_struct *asd_ha, u32 reg);
50 void asd_write_reg_byte(struct asd_ha_struct *asd_ha, u32 reg, u8 val);
51 void asd_write_reg_word(struct asd_ha_struct *asd_ha, u32 reg, u16 val);
52 void asd_write_reg_dword(struct asd_ha_struct *asd_ha, u32 reg, u32 val);
54 void asd_read_reg_string(struct asd_ha_struct *asd_ha, void *dst,
56 void asd_write_reg_string(struct asd_ha_struct *asd_ha, void *src,
60 static inline type asd_read_ocm_##ord (struct asd_ha_struct *asd_ha, \
63 struct asd_ha_addrspace *io_handle = &asd_ha->io_handle[1]; \
[all …]
Daic94xx_dev.c21 static int asd_get_ddb(struct asd_ha_struct *asd_ha) in asd_get_ddb() argument
25 ddb = FIND_FREE_DDB(asd_ha); in asd_get_ddb()
26 if (ddb >= asd_ha->hw_prof.max_ddbs) { in asd_get_ddb()
30 SET_DDB(ddb, asd_ha); in asd_get_ddb()
33 asd_ddbsite_write_dword(asd_ha, ddb, i, 0); in asd_get_ddb()
57 static void asd_free_ddb(struct asd_ha_struct *asd_ha, int ddb) in asd_free_ddb() argument
61 asd_ddbsite_write_byte(asd_ha, ddb, DDB_TYPE, DDB_TYPE_UNUSED); in asd_free_ddb()
62 CLEAR_DDB(ddb, asd_ha); in asd_free_ddb()
67 struct asd_ha_struct *asd_ha = dev->port->ha->lldd_ha; in asd_set_ddb_type() local
71 asd_ddbsite_write_byte(asd_ha,ddb, DDB_TYPE, DDB_TYPE_PM_PORT); in asd_set_ddb_type()
[all …]
Daic94xx_scb.c70 struct asd_ha_struct *asd_ha = ascb->ha; in asd_phy_event_tasklet() local
72 struct asd_phy *phy = &asd_ha->phys[phy_id]; in asd_phy_event_tasklet()
81 asd_turn_led(asd_ha, phy_id, 0); in asd_phy_event_tasklet()
88 asd_turn_led(asd_ha, phy_id, 1); in asd_phy_event_tasklet()
96 asd_turn_led(asd_ha, phy_id, 1); in asd_phy_event_tasklet()
104 asd_turn_led(asd_ha, phy_id, 0); in asd_phy_event_tasklet()
112 static unsigned ord_phy(struct asd_ha_struct *asd_ha, struct asd_phy *phy) in ord_phy() argument
114 u8 enabled_mask = asd_ha->hw_prof.enabled_phys; in ord_phy()
118 if (&asd_ha->phys[i] == phy) in ord_phy()
141 struct asd_ha_struct *asd_ha = phy->sas_phy.ha->lldd_ha; in asd_get_attached_sas_addr() local
[all …]
Daic94xx_hwi.h242 asd_ha, size_t size, in asd_alloc_coherent()
248 token->vaddr = dma_alloc_coherent(&asd_ha->pcidev->dev, in asd_alloc_coherent()
260 static inline void asd_free_coherent(struct asd_ha_struct *asd_ha, in asd_free_coherent() argument
264 dma_free_coherent(&asd_ha->pcidev->dev, token->size, in asd_free_coherent()
270 static inline void asd_init_ascb(struct asd_ha_struct *asd_ha, in asd_init_ascb() argument
275 ascb->ha = asd_ha; in asd_init_ascb()
322 struct asd_ha_struct *asd_ha = ascb->ha; in asd_ascb_free() local
329 dma_pool_free(asd_ha->scb_pool, ascb->dma_scb.vaddr, in asd_ascb_free()
357 int asd_init_hw(struct asd_ha_struct *asd_ha);
362 *asd_ha, int *num,
[all …]
Daic94xx_task.c18 static void asd_can_dequeue(struct asd_ha_struct *asd_ha, int num) in asd_can_dequeue() argument
22 spin_lock_irqsave(&asd_ha->seq.pend_q_lock, flags); in asd_can_dequeue()
23 asd_ha->seq.can_queue += num; in asd_can_dequeue()
24 spin_unlock_irqrestore(&asd_ha->seq.pend_q_lock, flags); in asd_can_dequeue()
41 struct asd_ha_struct *asd_ha = ascb->ha; in asd_map_scatterlist() local
50 dma_addr_t dma = dma_map_single(&asd_ha->pcidev->dev, p, in asd_map_scatterlist()
64 num_sg = dma_map_sg(&asd_ha->pcidev->dev, task->scatter, in asd_map_scatterlist()
72 ascb->sg_arr = asd_alloc_coherent(asd_ha, in asd_map_scatterlist()
111 dma_unmap_sg(&asd_ha->pcidev->dev, task->scatter, in asd_map_scatterlist()
118 struct asd_ha_struct *asd_ha = ascb->ha; in asd_unmap_scatterlist() local
[all …]
Daic94xx_sds.h94 int asd_verify_flash_seg(struct asd_ha_struct *asd_ha,
96 int asd_write_flash_seg(struct asd_ha_struct *asd_ha,
98 int asd_chk_write_status(struct asd_ha_struct *asd_ha,
100 int asd_check_flash_type(struct asd_ha_struct *asd_ha);
101 int asd_erase_nv_sector(struct asd_ha_struct *asd_ha,
Daic94xx_tmf.c90 ascb = asd_ascb_alloc_list(asd_ha, &res, GFP_KERNEL); \
117 struct asd_ha_struct *asd_ha = sas_ha->lldd_ha; in asd_clear_nexus_ha() local
126 struct asd_ha_struct *asd_ha = port->ha->lldd_ha; in asd_clear_nexus_port() local
143 struct asd_ha_struct *asd_ha = dev->port->ha->lldd_ha; in asd_clear_nexus_I_T() local
203 struct asd_ha_struct *asd_ha = dev->port->ha->lldd_ha; in asd_clear_nexus_I_T_L() local
216 struct asd_ha_struct *asd_ha = task->dev->port->ha->lldd_ha; in asd_clear_nexus_tag() local
231 struct asd_ha_struct *asd_ha = task->dev->port->ha->lldd_ha; in asd_clear_nexus_index() local
258 struct asd_ha_struct *asd_ha = ascb->ha; in asd_get_tmf_resp_tasklet() local
275 spin_lock_irqsave(&asd_ha->seq.tc_index_lock, flags); in asd_get_tmf_resp_tasklet()
276 escb = asd_tc_index_find(&asd_ha->seq, in asd_get_tmf_resp_tasklet()
[all …]
Daic94xx_seq.h43 int asd_init_seqs(struct asd_ha_struct *asd_ha);
44 int asd_start_seqs(struct asd_ha_struct *asd_ha);
47 void asd_update_port_links(struct asd_ha_struct *asd_ha, struct asd_phy *phy);
Daic94xx_dump.h14 void asd_dump_seq_state(struct asd_ha_struct *asd_ha, u8 lseq_mask);
19 static inline void asd_dump_seq_state(struct asd_ha_struct *asd_ha, in asd_dump_seq_state() argument
Daic94xx.h48 int asd_read_ocm(struct asd_ha_struct *asd_ha);
49 int asd_read_flash(struct asd_ha_struct *asd_ha);