Lines Matching full:mvi
12 static int mvs_find_tag(struct mvs_info *mvi, struct sas_task *task, u32 *tag) in mvs_find_tag() argument
23 static void mvs_tag_clear(struct mvs_info *mvi, u32 tag) in mvs_tag_clear() argument
25 void *bitmap = mvi->rsvd_tags; in mvs_tag_clear()
29 static void mvs_tag_free(struct mvs_info *mvi, u32 tag) in mvs_tag_free() argument
34 mvs_tag_clear(mvi, tag); in mvs_tag_free()
37 static void mvs_tag_set(struct mvs_info *mvi, unsigned int tag) in mvs_tag_set() argument
39 void *bitmap = mvi->rsvd_tags; in mvs_tag_set()
43 static int mvs_tag_alloc(struct mvs_info *mvi, u32 *tag_out) in mvs_tag_alloc() argument
46 void *bitmap = mvi->rsvd_tags; in mvs_tag_alloc()
52 mvs_tag_set(mvi, tag); in mvs_tag_alloc()
61 struct mvs_info *mvi = NULL; in mvs_find_dev_mvi() local
81 mvi = ((struct mvs_prv_info *)sha->lldd_ha)->mvi[hi]; in mvs_find_dev_mvi()
83 return mvi; in mvs_find_dev_mvi()
91 struct mvs_info *mvi = mvi_dev->mvi_info; in mvs_find_dev_phyno() local
107 phyno[n] = (j >= mvi->chip->n_phy) ? in mvs_find_dev_phyno()
108 (j - mvi->chip->n_phy) : j; in mvs_find_dev_phyno()
120 struct mvs_device *mvs_find_dev_by_reg_set(struct mvs_info *mvi, in mvs_find_dev_by_reg_set() argument
125 if (mvi->devices[dev_no].taskfileset == MVS_ID_NOT_MAPPED) in mvs_find_dev_by_reg_set()
128 if (mvi->devices[dev_no].taskfileset == reg_set) in mvs_find_dev_by_reg_set()
129 return &mvi->devices[dev_no]; in mvs_find_dev_by_reg_set()
134 static inline void mvs_free_reg_set(struct mvs_info *mvi, in mvs_free_reg_set() argument
143 MVS_CHIP_DISP->free_reg_set(mvi, &dev->taskfileset); in mvs_free_reg_set()
146 static inline u8 mvs_assign_reg_set(struct mvs_info *mvi, in mvs_assign_reg_set() argument
151 return MVS_CHIP_DISP->assign_reg_set(mvi, &dev->taskfileset); in mvs_assign_reg_set()
154 void mvs_phys_reset(struct mvs_info *mvi, u32 phy_mask, int hard) in mvs_phys_reset() argument
160 MVS_CHIP_DISP->phy_reset(mvi, no, hard); in mvs_phys_reset()
170 struct mvs_info *mvi = NULL; in mvs_phy_control() local
178 mvi = ((struct mvs_prv_info *)sha->lldd_ha)->mvi[hi]; in mvs_phy_control()
182 MVS_CHIP_DISP->phy_set_link_rate(mvi, phy_id, funcdata); in mvs_phy_control()
186 tmp = MVS_CHIP_DISP->read_phy_ctl(mvi, phy_id); in mvs_phy_control()
189 MVS_CHIP_DISP->phy_reset(mvi, phy_id, MVS_HARD_RESET); in mvs_phy_control()
193 MVS_CHIP_DISP->phy_enable(mvi, phy_id); in mvs_phy_control()
194 MVS_CHIP_DISP->phy_reset(mvi, phy_id, MVS_SOFT_RESET); in mvs_phy_control()
198 MVS_CHIP_DISP->phy_disable(mvi, phy_id); in mvs_phy_control()
208 void mvs_set_sas_addr(struct mvs_info *mvi, int port_id, u32 off_lo, in mvs_set_sas_addr() argument
214 MVS_CHIP_DISP->write_port_cfg_addr(mvi, port_id, off_lo); in mvs_set_sas_addr()
215 MVS_CHIP_DISP->write_port_cfg_data(mvi, port_id, lo); in mvs_set_sas_addr()
216 MVS_CHIP_DISP->write_port_cfg_addr(mvi, port_id, off_hi); in mvs_set_sas_addr()
217 MVS_CHIP_DISP->write_port_cfg_data(mvi, port_id, hi); in mvs_set_sas_addr()
220 static void mvs_bytes_dmaed(struct mvs_info *mvi, int i, gfp_t gfp_flags) in mvs_bytes_dmaed() argument
222 struct mvs_phy *phy = &mvi->phy[i]; in mvs_bytes_dmaed()
255 MVS_CHIP_DISP->write_port_cfg_addr(mvi, i, PHYR_PHY_STAT); in mvs_bytes_dmaed()
256 MVS_CHIP_DISP->write_port_cfg_data(mvi, i, 0x00); in mvs_bytes_dmaed()
261 mv_dprintk("phy %d byte dmaded.\n", i + mvi->id * mvi->chip->n_phy); in mvs_bytes_dmaed()
272 struct mvs_info *mvi; in mvs_scan_start() local
279 mvi = ((struct mvs_prv_info *)sha->lldd_ha)->mvi[j]; in mvs_scan_start()
280 for (i = 0; i < mvi->chip->n_phy; ++i) in mvs_scan_start()
281 mvs_bytes_dmaed(mvi, i, GFP_KERNEL); in mvs_scan_start()
298 static int mvs_task_prep_smp(struct mvs_info *mvi, in mvs_task_prep_smp() argument
302 struct sas_ha_struct *sha = mvi->sas; in mvs_task_prep_smp()
315 struct mvs_slot_info *slot = &mvi->slot_info[tag]; in mvs_task_prep_smp()
322 elem = dma_map_sg(mvi->dev, sg_req, 1, DMA_TO_DEVICE); in mvs_task_prep_smp()
328 elem = dma_map_sg(mvi->dev, sg_resp, 1, DMA_FROM_DEVICE); in mvs_task_prep_smp()
372 if (mvi->flags & MVF_FLAG_SOC) in mvs_task_prep_smp()
378 slot->tx = mvi->tx_prod; in mvs_task_prep_smp()
379 mvi->tx[mvi->tx_prod] = cpu_to_le32((TXQ_CMD_SMP << TXQ_CMD_SHIFT) | in mvs_task_prep_smp()
401 dma_unmap_sg(mvi->dev, &tei->task->smp_task.smp_resp, 1, in mvs_task_prep_smp()
404 dma_unmap_sg(mvi->dev, &tei->task->smp_task.smp_req, 1, in mvs_task_prep_smp()
427 static int mvs_task_prep_ata(struct mvs_info *mvi, in mvs_task_prep_ata() argument
445 if (mvs_assign_reg_set(mvi, mvi_dev) == MVS_ID_NOT_MAPPED) { in mvs_task_prep_ata()
450 slot = &mvi->slot_info[tag]; in mvs_task_prep_ata()
451 slot->tx = mvi->tx_prod; in mvs_task_prep_ata()
456 mvi->tx[mvi->tx_prod] = cpu_to_le32(del_q); in mvs_task_prep_ata()
517 if (mvi->flags & MVF_FLAG_SOC) in mvs_task_prep_ata()
547 MVS_CHIP_DISP->dma_fix(mvi, sas_port->phy_mask, in mvs_task_prep_ata()
553 static int mvs_task_prep_ssp(struct mvs_info *mvi, in mvs_task_prep_ssp() argument
574 slot = &mvi->slot_info[tag]; in mvs_task_prep_ssp()
579 slot->tx = mvi->tx_prod; in mvs_task_prep_ssp()
580 mvi->tx[mvi->tx_prod] = cpu_to_le32(TXQ_MODE_I | tag | in mvs_task_prep_ssp()
628 if (mvi->flags & MVF_FLAG_SOC) in mvs_task_prep_ssp()
689 static int mvs_task_prep(struct sas_task *task, struct mvs_info *mvi, int is_tmf, in mvs_task_prep() argument
749 n_elem = dma_map_sg(mvi->dev, in mvs_task_prep()
766 rc = mvs_tag_alloc(mvi, &tag); in mvs_task_prep()
771 slot = &mvi->slot_info[tag]; in mvs_task_prep()
777 slot->buf = dma_pool_zalloc(mvi->dma_pool, GFP_ATOMIC, &slot->buf_dma); in mvs_task_prep()
784 tei.hdr = &mvi->slot[tag]; in mvs_task_prep()
789 rc = mvs_task_prep_smp(mvi, &tei); in mvs_task_prep()
792 rc = mvs_task_prep_ssp(mvi, &tei, is_tmf, tmf); in mvs_task_prep()
797 rc = mvs_task_prep_ata(mvi, &tei); in mvs_task_prep()
800 dev_printk(KERN_ERR, mvi->dev, in mvs_task_prep()
818 mvi->tx_prod = (mvi->tx_prod + 1) & (MVS_CHIP_SLOT_SZ - 1); in mvs_task_prep()
823 dma_pool_free(mvi->dma_pool, slot->buf, slot->buf_dma); in mvs_task_prep()
825 mvs_tag_free(mvi, tag); in mvs_task_prep()
828 dev_printk(KERN_ERR, mvi->dev, "mvsas prep failed[%d]!\n", rc); in mvs_task_prep()
831 dma_unmap_sg(mvi->dev, task->scatter, n_elem, in mvs_task_prep()
839 struct mvs_info *mvi = NULL; in mvs_queue_command() local
846 mvi = ((struct mvs_device *)task->dev->lldd_dev)->mvi_info; in mvs_queue_command()
848 spin_lock_irqsave(&mvi->lock, flags); in mvs_queue_command()
849 rc = mvs_task_prep(task, mvi, is_tmf, tmf, &pass); in mvs_queue_command()
851 dev_printk(KERN_ERR, mvi->dev, "mvsas exec failed[%d]!\n", rc); in mvs_queue_command()
854 MVS_CHIP_DISP->start_delivery(mvi, (mvi->tx_prod - 1) & in mvs_queue_command()
856 spin_unlock_irqrestore(&mvi->lock, flags); in mvs_queue_command()
861 static void mvs_slot_free(struct mvs_info *mvi, u32 rx_desc) in mvs_slot_free() argument
864 mvs_tag_free(mvi, slot_idx); in mvs_slot_free()
867 static void mvs_slot_task_free(struct mvs_info *mvi, struct sas_task *task, in mvs_slot_task_free() argument
876 dma_unmap_sg(mvi->dev, task->scatter, in mvs_slot_task_free()
881 dma_unmap_sg(mvi->dev, &task->smp_task.smp_resp, 1, in mvs_slot_task_free()
883 dma_unmap_sg(mvi->dev, &task->smp_task.smp_req, 1, in mvs_slot_task_free()
896 dma_pool_free(mvi->dma_pool, slot->buf, slot->buf_dma); in mvs_slot_task_free()
904 mvs_slot_free(mvi, slot_idx); in mvs_slot_task_free()
907 static void mvs_update_wideport(struct mvs_info *mvi, int phy_no) in mvs_update_wideport() argument
909 struct mvs_phy *phy = &mvi->phy[phy_no]; in mvs_update_wideport()
915 MVS_CHIP_DISP->write_port_cfg_addr(mvi, no, in mvs_update_wideport()
917 MVS_CHIP_DISP->write_port_cfg_data(mvi, no, in mvs_update_wideport()
920 MVS_CHIP_DISP->write_port_cfg_addr(mvi, no, in mvs_update_wideport()
922 MVS_CHIP_DISP->write_port_cfg_data(mvi, no, in mvs_update_wideport()
928 static u32 mvs_is_phy_ready(struct mvs_info *mvi, int i) in mvs_is_phy_ready() argument
931 struct mvs_phy *phy = &mvi->phy[i]; in mvs_is_phy_ready()
934 tmp = MVS_CHIP_DISP->read_phy_ctl(mvi, i); in mvs_is_phy_ready()
946 mvs_update_wideport(mvi, i); in mvs_is_phy_ready()
956 static void *mvs_get_d2h_reg(struct mvs_info *mvi, int i, void *buf) in mvs_get_d2h_reg() argument
963 MVS_CHIP_DISP->write_port_cfg_addr(mvi, i, PHYR_SATA_SIG3); in mvs_get_d2h_reg()
964 s[3] = cpu_to_le32(MVS_CHIP_DISP->read_port_cfg_data(mvi, i)); in mvs_get_d2h_reg()
966 MVS_CHIP_DISP->write_port_cfg_addr(mvi, i, PHYR_SATA_SIG2); in mvs_get_d2h_reg()
967 s[2] = cpu_to_le32(MVS_CHIP_DISP->read_port_cfg_data(mvi, i)); in mvs_get_d2h_reg()
969 MVS_CHIP_DISP->write_port_cfg_addr(mvi, i, PHYR_SATA_SIG1); in mvs_get_d2h_reg()
970 s[1] = cpu_to_le32(MVS_CHIP_DISP->read_port_cfg_data(mvi, i)); in mvs_get_d2h_reg()
972 MVS_CHIP_DISP->write_port_cfg_addr(mvi, i, PHYR_SATA_SIG0); in mvs_get_d2h_reg()
973 s[0] = cpu_to_le32(MVS_CHIP_DISP->read_port_cfg_data(mvi, i)); in mvs_get_d2h_reg()
993 void mvs_update_phyinfo(struct mvs_info *mvi, int i, int get_st) in mvs_update_phyinfo() argument
995 struct mvs_phy *phy = &mvi->phy[i]; in mvs_update_phyinfo()
1001 phy->irq_status = MVS_CHIP_DISP->read_port_irq_stat(mvi, i); in mvs_update_phyinfo()
1002 phy->phy_status = mvs_is_phy_ready(mvi, i); in mvs_update_phyinfo()
1007 struct asd_sas_phy *sas_phy = &mvi->phy[i].sas_phy; in mvs_update_phyinfo()
1009 oob_done = MVS_CHIP_DISP->oob_done(mvi, i); in mvs_update_phyinfo()
1011 MVS_CHIP_DISP->fix_phy_info(mvi, i, id); in mvs_update_phyinfo()
1018 i + mvi->id * mvi->chip->n_phy; in mvs_update_phyinfo()
1023 mvs_get_d2h_reg(mvi, i, id); in mvs_update_phyinfo()
1026 dev_printk(KERN_DEBUG, mvi->dev, in mvs_update_phyinfo()
1028 tmp = MVS_CHIP_DISP->read_port_irq_mask(mvi, i); in mvs_update_phyinfo()
1029 MVS_CHIP_DISP->write_port_irq_mask(mvi, i, in mvs_update_phyinfo()
1056 MVS_CHIP_DISP->phy_work_around(mvi, i); in mvs_update_phyinfo()
1059 i + mvi->id * mvi->chip->n_phy, phy->att_dev_info); in mvs_update_phyinfo()
1061 i + mvi->id * mvi->chip->n_phy, phy->att_dev_sas_addr); in mvs_update_phyinfo()
1064 MVS_CHIP_DISP->write_port_irq_stat(mvi, i, phy->irq_status); in mvs_update_phyinfo()
1070 struct mvs_info *mvi = NULL; int i = 0, hi; in mvs_port_notify_formed() local
1084 mvi = ((struct mvs_prv_info *)sas_ha->lldd_ha)->mvi[hi]; in mvs_port_notify_formed()
1085 if (i >= mvi->chip->n_phy) in mvs_port_notify_formed()
1086 port = &mvi->port[i - mvi->chip->n_phy]; in mvs_port_notify_formed()
1088 port = &mvi->port[i]; in mvs_port_notify_formed()
1090 spin_lock_irqsave(&mvi->lock, flags); in mvs_port_notify_formed()
1097 mvs_update_wideport(mvi, sas_phy->id); in mvs_port_notify_formed()
1101 MVS_CHIP_DISP->write_port_cfg_addr(mvi, i, PHYR_PHY_STAT); in mvs_port_notify_formed()
1102 MVS_CHIP_DISP->write_port_cfg_data(mvi, i, 0x04); in mvs_port_notify_formed()
1106 spin_unlock_irqrestore(&mvi->lock, flags); in mvs_port_notify_formed()
1113 struct mvs_info *mvi = phy->mvi; in mvs_port_notify_deformed() local
1117 while (phy != &mvi->phy[phy_no]) { in mvs_port_notify_deformed()
1123 mvs_do_release_task(phy->mvi, phy_no, dev); in mvs_port_notify_deformed()
1138 static struct mvs_device *mvs_alloc_dev(struct mvs_info *mvi) in mvs_alloc_dev() argument
1142 if (mvi->devices[dev].dev_type == SAS_PHY_UNUSED) { in mvs_alloc_dev()
1143 mvi->devices[dev].device_id = dev; in mvs_alloc_dev()
1144 return &mvi->devices[dev]; in mvs_alloc_dev()
1169 struct mvs_info *mvi = NULL; in mvs_dev_found_notify() local
1173 mvi = mvs_find_dev_mvi(dev); in mvs_dev_found_notify()
1176 spin_lock_irqsave(&mvi->lock, flags); in mvs_dev_found_notify()
1178 mvi_device = mvs_alloc_dev(mvi); in mvs_dev_found_notify()
1186 mvi_device->mvi_info = mvi; in mvs_dev_found_notify()
1205 spin_unlock_irqrestore(&mvi->lock, flags); in mvs_dev_found_notify()
1218 struct mvs_info *mvi; in mvs_dev_gone_notify() local
1225 mvi = mvi_dev->mvi_info; in mvs_dev_gone_notify()
1227 spin_lock_irqsave(&mvi->lock, flags); in mvs_dev_gone_notify()
1231 mvs_release_task(mvi, dev); in mvs_dev_gone_notify()
1232 mvs_free_reg_set(mvi, mvi_dev); in mvs_dev_gone_notify()
1238 spin_unlock_irqrestore(&mvi->lock, flags); in mvs_dev_gone_notify()
1267 struct mvs_info *mvi = mvi_dev->mvi_info; in mvs_lu_reset() local
1272 spin_lock_irqsave(&mvi->lock, flags); in mvs_lu_reset()
1273 mvs_release_task(mvi, dev); in mvs_lu_reset()
1274 spin_unlock_irqrestore(&mvi->lock, flags); in mvs_lu_reset()
1287 struct mvs_info *mvi = mvi_dev->mvi_info; in mvs_I_T_nexus_reset() local
1297 spin_lock_irqsave(&mvi->lock, flags); in mvs_I_T_nexus_reset()
1298 mvs_release_task(mvi, dev); in mvs_I_T_nexus_reset()
1299 spin_unlock_irqrestore(&mvi->lock, flags); in mvs_I_T_nexus_reset()
1312 struct mvs_info *mvi = mvi_dev->mvi_info; in mvs_query_task() local
1314 rc = mvs_find_tag(mvi, task, &tag); in mvs_query_task()
1339 struct mvs_info *mvi; in mvs_abort_task() local
1349 mvi = mvi_dev->mvi_info; in mvs_abort_task()
1360 rc = mvs_find_tag(mvi, task, &tag); in mvs_abort_task()
1376 slot_no = (u32) (slot - mvi->slot_info); in mvs_abort_task()
1377 spin_lock_irqsave(&mvi->lock, flags); in mvs_abort_task()
1378 mvs_slot_complete(mvi, slot_no, 1); in mvs_abort_task()
1379 spin_unlock_irqrestore(&mvi->lock, flags); in mvs_abort_task()
1387 u32 slot_idx = (u32)(slot - mvi->slot_info); in mvs_abort_task()
1388 mv_dprintk("mvs_abort_task() mvi=%p task=%p " in mvs_abort_task()
1390 mvi, task, slot, slot_idx); in mvs_abort_task()
1392 mvs_slot_task_free(mvi, task, slot, slot_idx); in mvs_abort_task()
1404 static int mvs_sata_done(struct mvs_info *mvi, struct sas_task *task, in mvs_sata_done() argument
1478 static int mvs_slot_err(struct mvs_info *mvi, struct sas_task *task, in mvs_slot_err() argument
1481 struct mvs_slot_info *slot = &mvi->slot_info[slot_idx]; in mvs_slot_err()
1489 MVS_CHIP_DISP->issue_stop(mvi, type, tfs); in mvs_slot_err()
1491 MVS_CHIP_DISP->command_active(mvi, slot_idx); in mvs_slot_err()
1502 sas_ssp_task_response(mvi->dev, task, iu); in mvs_slot_err()
1519 mvs_sata_done(mvi, task, slot_idx, err_dw0); in mvs_slot_err()
1529 int mvs_slot_complete(struct mvs_info *mvi, u32 rx_desc, u32 flags) in mvs_slot_complete() argument
1532 struct mvs_slot_info *slot = &mvi->slot_info[slot_idx]; in mvs_slot_complete()
1564 mvs_free_reg_set(mvi, mvi_dev); in mvs_slot_complete()
1566 mvs_slot_task_free(mvi, task, slot, slot_idx); in mvs_slot_complete()
1588 tstat->stat = mvs_slot_err(mvi, task, slot_idx); in mvs_slot_complete()
1604 sas_ssp_task_response(mvi->dev, task, iu); in mvs_slot_complete()
1623 tstat->stat = mvs_sata_done(mvi, task, slot_idx, 0); in mvs_slot_complete()
1641 mvs_free_reg_set(mvi, mvi_dev); in mvs_slot_complete()
1643 mvs_slot_task_free(mvi, task, slot, slot_idx); in mvs_slot_complete()
1646 spin_unlock(&mvi->lock); in mvs_slot_complete()
1650 spin_lock(&mvi->lock); in mvs_slot_complete()
1655 void mvs_do_release_task(struct mvs_info *mvi, in mvs_do_release_task() argument
1663 phy = &mvi->phy[phy_no]; in mvs_do_release_task()
1668 mvs_int_rx(mvi, false); in mvs_do_release_task()
1674 slot_idx = (u32) (slot - mvi->slot_info); in mvs_do_release_task()
1682 MVS_CHIP_DISP->command_active(mvi, slot_idx); in mvs_do_release_task()
1684 mvs_slot_complete(mvi, slot_idx, 1); in mvs_do_release_task()
1688 void mvs_release_task(struct mvs_info *mvi, in mvs_release_task() argument
1694 mvs_do_release_task(mvi, phyno[i], dev); in mvs_release_task()
1708 struct mvs_info *mvi = mwq->mvi; in mvs_work_queue() local
1711 struct mvs_phy *phy = &mvi->phy[phy_no]; in mvs_work_queue()
1714 spin_lock_irqsave(&mvi->lock, flags); in mvs_work_queue()
1720 tmp = MVS_CHIP_DISP->read_phy_ctl(mvi, phy_no); in mvs_work_queue()
1729 MVS_CHIP_DISP->detect_porttype(mvi, phy_no); in mvs_work_queue()
1730 mvs_update_phyinfo(mvi, phy_no, 1); in mvs_work_queue()
1731 mvs_bytes_dmaed(mvi, phy_no, GFP_ATOMIC); in mvs_work_queue()
1743 spin_unlock_irqrestore(&mvi->lock, flags); in mvs_work_queue()
1747 static int mvs_handle_event(struct mvs_info *mvi, void *data, int handler) in mvs_handle_event() argument
1754 mwq->mvi = mvi; in mvs_handle_event()
1758 list_add_tail(&mwq->entry, &mvi->wq_list); in mvs_handle_event()
1769 struct mvs_info *mvi = phy->mvi; in mvs_sig_time_out() local
1772 for (phy_no = 0; phy_no < mvi->chip->n_phy; phy_no++) { in mvs_sig_time_out()
1773 if (&mvi->phy[phy_no] == phy) { in mvs_sig_time_out()
1775 phy_no+mvi->id*mvi->chip->n_phy); in mvs_sig_time_out()
1776 MVS_CHIP_DISP->phy_reset(mvi, phy_no, MVS_HARD_RESET); in mvs_sig_time_out()
1781 void mvs_int_port(struct mvs_info *mvi, int phy_no, u32 events) in mvs_int_port() argument
1784 struct mvs_phy *phy = &mvi->phy[phy_no]; in mvs_int_port()
1786 phy->irq_status = MVS_CHIP_DISP->read_port_irq_stat(mvi, phy_no); in mvs_int_port()
1787 MVS_CHIP_DISP->write_port_irq_stat(mvi, phy_no, phy->irq_status); in mvs_int_port()
1788 mv_dprintk("phy %d ctrl sts=0x%08X.\n", phy_no+mvi->id*mvi->chip->n_phy, in mvs_int_port()
1789 MVS_CHIP_DISP->read_phy_ctl(mvi, phy_no)); in mvs_int_port()
1790 mv_dprintk("phy %d irq sts = 0x%08X\n", phy_no+mvi->id*mvi->chip->n_phy, in mvs_int_port()
1800 phy_no + mvi->id*mvi->chip->n_phy); in mvs_int_port()
1808 mvs_do_release_task(mvi, phy_no, NULL); in mvs_int_port()
1810 MVS_CHIP_DISP->clear_srs_irq(mvi, 0, 1); in mvs_int_port()
1811 mvs_handle_event(mvi, in mvs_int_port()
1814 ready = mvs_is_phy_ready(mvi, phy_no); in mvs_int_port()
1817 MVS_CHIP_DISP->stp_reset(mvi, in mvs_int_port()
1820 MVS_CHIP_DISP->phy_reset(mvi, in mvs_int_port()
1828 tmp = MVS_CHIP_DISP->read_port_irq_mask(mvi, phy_no); in mvs_int_port()
1829 MVS_CHIP_DISP->write_port_irq_mask(mvi, phy_no, in mvs_int_port()
1838 phy->phy_status = mvs_is_phy_ready(mvi, phy_no); in mvs_int_port()
1842 MVS_CHIP_DISP->detect_porttype(mvi, phy_no); in mvs_int_port()
1845 mvi, phy_no); in mvs_int_port()
1847 MVS_CHIP_DISP->write_port_irq_mask(mvi, in mvs_int_port()
1850 mvs_update_phyinfo(mvi, phy_no, 0); in mvs_int_port()
1852 MVS_CHIP_DISP->phy_reset(mvi, phy_no, MVS_PHY_TUNE); in mvs_int_port()
1856 mvs_bytes_dmaed(mvi, phy_no, GFP_ATOMIC); in mvs_int_port()
1864 phy_no + mvi->id*mvi->chip->n_phy); in mvs_int_port()
1868 phy_no + mvi->id*mvi->chip->n_phy); in mvs_int_port()
1869 mvs_handle_event(mvi, (void *)(unsigned long)phy_no, in mvs_int_port()
1874 int mvs_int_rx(struct mvs_info *mvi, bool self_clear) in mvs_int_rx() argument
1884 rx_prod_idx = mvi->rx_cons; in mvs_int_rx()
1885 mvi->rx_cons = le32_to_cpu(mvi->rx[0]); in mvs_int_rx()
1886 if (mvi->rx_cons == 0xfff) /* h/w hasn't touched RX ring yet */ in mvs_int_rx()
1893 if (unlikely(mvi->rx_cons == rx_prod_idx)) in mvs_int_rx()
1894 mvi->rx_cons = MVS_CHIP_DISP->rx_update(mvi) & RX_RING_SZ_MASK; in mvs_int_rx()
1896 if (mvi->rx_cons == rx_prod_idx) in mvs_int_rx()
1899 while (mvi->rx_cons != rx_prod_idx) { in mvs_int_rx()
1902 rx_desc = le32_to_cpu(mvi->rx[rx_prod_idx + 1]); in mvs_int_rx()
1905 mvs_slot_complete(mvi, rx_desc, 0); in mvs_int_rx()
1910 mvs_slot_complete(mvi, rx_desc, 0); in mvs_int_rx()
1912 mvs_slot_free(mvi, rx_desc); in mvs_int_rx()
1917 MVS_CHIP_DISP->int_full(mvi); in mvs_int_rx()
1925 struct mvs_info *mvi = mvs_prv->mvi[0]; in mvs_gpio_write() local