Lines Matching refs:ap
310 static void nv_nf2_freeze(struct ata_port *ap);
311 static void nv_nf2_thaw(struct ata_port *ap);
312 static void nv_ck804_freeze(struct ata_port *ap);
313 static void nv_ck804_thaw(struct ata_port *ap);
319 static void nv_adma_irq_clear(struct ata_port *ap);
320 static int nv_adma_port_start(struct ata_port *ap);
321 static void nv_adma_port_stop(struct ata_port *ap);
323 static int nv_adma_port_suspend(struct ata_port *ap, pm_message_t mesg);
324 static int nv_adma_port_resume(struct ata_port *ap);
326 static void nv_adma_freeze(struct ata_port *ap);
327 static void nv_adma_thaw(struct ata_port *ap);
328 static void nv_adma_error_handler(struct ata_port *ap);
331 static void nv_adma_tf_read(struct ata_port *ap, struct ata_taskfile *tf);
333 static void nv_mcp55_thaw(struct ata_port *ap);
334 static void nv_mcp55_freeze(struct ata_port *ap);
335 static void nv_swncq_error_handler(struct ata_port *ap);
337 static int nv_swncq_port_start(struct ata_port *ap);
341 static void nv_swncq_irq_clear(struct ata_port *ap, u16 fis);
344 static int nv_swncq_port_suspend(struct ata_port *ap, pm_message_t mesg);
345 static int nv_swncq_port_resume(struct ata_port *ap);
605 static void nv_adma_register_mode(struct ata_port *ap) in nv_adma_register_mode() argument
607 struct nv_adma_port_priv *pp = ap->private_data; in nv_adma_register_mode()
622 ata_port_warn(ap, "timeout waiting for ADMA IDLE, stat=0x%hx\n", in nv_adma_register_mode()
636 ata_port_warn(ap, in nv_adma_register_mode()
643 static void nv_adma_mode(struct ata_port *ap) in nv_adma_mode() argument
645 struct nv_adma_port_priv *pp = ap->private_data; in nv_adma_mode()
666 ata_port_warn(ap, in nv_adma_mode()
675 struct ata_port *ap = ata_shost_to_port(sdev->host); in nv_adma_slave_config() local
676 struct nv_adma_port_priv *pp = ap->private_data; in nv_adma_slave_config()
679 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in nv_adma_slave_config()
692 spin_lock_irqsave(ap->lock, flags); in nv_adma_slave_config()
694 if (ap->link.device[sdev->id].class == ATA_DEV_ATAPI) { in nv_adma_slave_config()
710 nv_adma_register_mode(ap); in nv_adma_slave_config()
719 if (ap->port_no == 1) in nv_adma_slave_config()
737 port0 = ap->host->ports[0]->private_data; in nv_adma_slave_config()
738 port1 = ap->host->ports[1]->private_data; in nv_adma_slave_config()
739 sdev0 = ap->host->ports[0]->link.device[0].sdev; in nv_adma_slave_config()
740 sdev1 = ap->host->ports[1]->link.device[0].sdev; in nv_adma_slave_config()
773 ata_port_info(ap, in nv_adma_slave_config()
775 (unsigned long long)*ap->host->dev->dma_mask, in nv_adma_slave_config()
778 spin_unlock_irqrestore(ap->lock, flags); in nv_adma_slave_config()
785 struct nv_adma_port_priv *pp = qc->ap->private_data; in nv_adma_check_atapi_dma()
789 static void nv_adma_tf_read(struct ata_port *ap, struct ata_taskfile *tf) in nv_adma_tf_read() argument
798 nv_adma_register_mode(ap); in nv_adma_tf_read()
800 ata_sff_tf_read(ap, tf); in nv_adma_tf_read()
835 static int nv_adma_check_cpb(struct ata_port *ap, int cpb_num, int force_err) in nv_adma_check_cpb() argument
837 struct nv_adma_port_priv *pp = ap->private_data; in nv_adma_check_cpb()
846 struct ata_eh_info *ehi = &ap->link.eh_info; in nv_adma_check_cpb()
869 ata_port_freeze(ap); in nv_adma_check_cpb()
871 ata_port_abort(ap); in nv_adma_check_cpb()
880 static int nv_host_intr(struct ata_port *ap, u8 irq_stat) in nv_host_intr() argument
882 struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->link.active_tag); in nv_host_intr()
886 ata_port_freeze(ap); in nv_host_intr()
896 ata_sff_check_status(ap); in nv_host_intr()
901 return ata_bmdma_port_intr(ap, qc); in nv_host_intr()
913 struct ata_port *ap = host->ports[i]; in nv_adma_interrupt() local
914 struct nv_adma_port_priv *pp = ap->private_data; in nv_adma_interrupt()
926 handled += nv_host_intr(ap, irq_stat); in nv_adma_interrupt()
934 if (ata_tag_valid(ap->link.active_tag)) in nv_adma_interrupt()
940 handled += nv_host_intr(ap, irq_stat); in nv_adma_interrupt()
949 if (!NV_ADMA_CHECK_INTR(gen_ctl, ap->port_no) && !notifier && in nv_adma_interrupt()
973 struct ata_eh_info *ehi = &ap->link.eh_info; in nv_adma_interrupt()
991 ata_port_freeze(ap); in nv_adma_interrupt()
1004 if (ata_tag_valid(ap->link.active_tag)) in nv_adma_interrupt()
1006 ap->link.active_tag; in nv_adma_interrupt()
1008 check_commands = ap->link.sactive; in nv_adma_interrupt()
1014 rc = nv_adma_check_cpb(ap, pos, in nv_adma_interrupt()
1022 ata_qc_complete_multiple(ap, ap->qc_active ^ done_mask); in nv_adma_interrupt()
1040 static void nv_adma_freeze(struct ata_port *ap) in nv_adma_freeze() argument
1042 struct nv_adma_port_priv *pp = ap->private_data; in nv_adma_freeze()
1046 nv_ck804_freeze(ap); in nv_adma_freeze()
1052 writeb(NV_INT_ALL << (ap->port_no * NV_INT_PORT_SHIFT), in nv_adma_freeze()
1053 ap->host->iomap[NV_MMIO_BAR] + NV_INT_STATUS_CK804); in nv_adma_freeze()
1062 static void nv_adma_thaw(struct ata_port *ap) in nv_adma_thaw() argument
1064 struct nv_adma_port_priv *pp = ap->private_data; in nv_adma_thaw()
1068 nv_ck804_thaw(ap); in nv_adma_thaw()
1080 static void nv_adma_irq_clear(struct ata_port *ap) in nv_adma_irq_clear() argument
1082 struct nv_adma_port_priv *pp = ap->private_data; in nv_adma_irq_clear()
1087 ata_bmdma_irq_clear(ap); in nv_adma_irq_clear()
1092 writeb(NV_INT_ALL << (ap->port_no * NV_INT_PORT_SHIFT), in nv_adma_irq_clear()
1093 ap->host->iomap[NV_MMIO_BAR] + NV_INT_STATUS_CK804); in nv_adma_irq_clear()
1100 if (ap->port_no == 0) { in nv_adma_irq_clear()
1107 pp = ap->host->ports[0]->private_data; in nv_adma_irq_clear()
1109 pp = ap->host->ports[1]->private_data; in nv_adma_irq_clear()
1115 struct nv_adma_port_priv *pp = qc->ap->private_data; in nv_adma_post_internal_cmd()
1121 static int nv_adma_port_start(struct ata_port *ap) in nv_adma_port_start() argument
1123 struct device *dev = ap->host->dev; in nv_adma_port_start()
1144 rc = ata_bmdma_port_start(ap); in nv_adma_port_start()
1152 mmio = ap->host->iomap[NV_MMIO_BAR] + NV_ADMA_PORT + in nv_adma_port_start()
1153 ap->port_no * NV_ADMA_PORT_SIZE; in nv_adma_port_start()
1155 pp->gen_block = ap->host->iomap[NV_MMIO_BAR] + NV_ADMA_GEN; in nv_adma_port_start()
1157 NV_ADMA_NOTIFIER_CLEAR + (4 * ap->port_no); in nv_adma_port_start()
1194 ap->private_data = pp; in nv_adma_port_start()
1220 static void nv_adma_port_stop(struct ata_port *ap) in nv_adma_port_stop() argument
1222 struct nv_adma_port_priv *pp = ap->private_data; in nv_adma_port_stop()
1230 static int nv_adma_port_suspend(struct ata_port *ap, pm_message_t mesg) in nv_adma_port_suspend() argument
1232 struct nv_adma_port_priv *pp = ap->private_data; in nv_adma_port_suspend()
1236 nv_adma_register_mode(ap); in nv_adma_port_suspend()
1247 static int nv_adma_port_resume(struct ata_port *ap) in nv_adma_port_resume() argument
1249 struct nv_adma_port_priv *pp = ap->private_data; in nv_adma_port_resume()
1282 static void nv_adma_setup_port(struct ata_port *ap) in nv_adma_setup_port() argument
1284 void __iomem *mmio = ap->host->iomap[NV_MMIO_BAR]; in nv_adma_setup_port()
1285 struct ata_ioports *ioport = &ap->ioaddr; in nv_adma_setup_port()
1289 mmio += NV_ADMA_PORT + ap->port_no * NV_ADMA_PORT_SIZE; in nv_adma_setup_port()
1350 struct nv_adma_port_priv *pp = qc->ap->private_data; in nv_adma_fill_sg()
1370 struct nv_adma_port_priv *pp = qc->ap->private_data; in nv_adma_use_reg_mode()
1387 struct nv_adma_port_priv *pp = qc->ap->private_data; in nv_adma_qc_prep()
1395 nv_adma_register_mode(qc->ap); in nv_adma_qc_prep()
1433 struct nv_adma_port_priv *pp = qc->ap->private_data; in nv_adma_qc_issue()
1453 nv_adma_register_mode(qc->ap); in nv_adma_qc_issue()
1456 nv_adma_mode(qc->ap); in nv_adma_qc_issue()
1486 struct ata_port *ap = host->ports[i]; in nv_generic_interrupt() local
1489 qc = ata_qc_from_tag(ap, ap->link.active_tag); in nv_generic_interrupt()
1491 handled += ata_bmdma_port_intr(ap, qc); in nv_generic_interrupt()
1497 ap->ops->sff_check_status(ap); in nv_generic_interrupt()
1551 *val = ioread32(link->ap->ioaddr.scr_addr + (sc_reg * 4)); in nv_scr_read()
1560 iowrite32(val, link->ap->ioaddr.scr_addr + (sc_reg * 4)); in nv_scr_write()
1572 if (!(link->ap->pflags & ATA_PFLAG_LOADING) && in nv_hardreset()
1596 static void nv_nf2_freeze(struct ata_port *ap) in nv_nf2_freeze() argument
1598 void __iomem *scr_addr = ap->host->ports[0]->ioaddr.scr_addr; in nv_nf2_freeze()
1599 int shift = ap->port_no * NV_INT_PORT_SHIFT; in nv_nf2_freeze()
1607 static void nv_nf2_thaw(struct ata_port *ap) in nv_nf2_thaw() argument
1609 void __iomem *scr_addr = ap->host->ports[0]->ioaddr.scr_addr; in nv_nf2_thaw()
1610 int shift = ap->port_no * NV_INT_PORT_SHIFT; in nv_nf2_thaw()
1620 static void nv_ck804_freeze(struct ata_port *ap) in nv_ck804_freeze() argument
1622 void __iomem *mmio_base = ap->host->iomap[NV_MMIO_BAR]; in nv_ck804_freeze()
1623 int shift = ap->port_no * NV_INT_PORT_SHIFT; in nv_ck804_freeze()
1631 static void nv_ck804_thaw(struct ata_port *ap) in nv_ck804_thaw() argument
1633 void __iomem *mmio_base = ap->host->iomap[NV_MMIO_BAR]; in nv_ck804_thaw()
1634 int shift = ap->port_no * NV_INT_PORT_SHIFT; in nv_ck804_thaw()
1644 static void nv_mcp55_freeze(struct ata_port *ap) in nv_mcp55_freeze() argument
1646 void __iomem *mmio_base = ap->host->iomap[NV_MMIO_BAR]; in nv_mcp55_freeze()
1647 int shift = ap->port_no * NV_INT_PORT_SHIFT_MCP55; in nv_mcp55_freeze()
1657 static void nv_mcp55_thaw(struct ata_port *ap) in nv_mcp55_thaw() argument
1659 void __iomem *mmio_base = ap->host->iomap[NV_MMIO_BAR]; in nv_mcp55_thaw()
1660 int shift = ap->port_no * NV_INT_PORT_SHIFT_MCP55; in nv_mcp55_thaw()
1670 static void nv_adma_error_handler(struct ata_port *ap) in nv_adma_error_handler() argument
1672 struct nv_adma_port_priv *pp = ap->private_data; in nv_adma_error_handler()
1678 if (ata_tag_valid(ap->link.active_tag) || ap->link.sactive) { in nv_adma_error_handler()
1686 ata_port_err(ap, in nv_adma_error_handler()
1695 if ((ata_tag_valid(ap->link.active_tag) && i == ap->link.active_tag) || in nv_adma_error_handler()
1696 ap->link.sactive & (1 << i)) in nv_adma_error_handler()
1697 ata_port_err(ap, in nv_adma_error_handler()
1704 nv_adma_register_mode(ap); in nv_adma_error_handler()
1723 ata_bmdma_error_handler(ap); in nv_adma_error_handler()
1726 static void nv_swncq_qc_to_dq(struct ata_port *ap, struct ata_queued_cmd *qc) in nv_swncq_qc_to_dq() argument
1728 struct nv_swncq_port_priv *pp = ap->private_data; in nv_swncq_qc_to_dq()
1737 static struct ata_queued_cmd *nv_swncq_qc_from_dq(struct ata_port *ap) in nv_swncq_qc_from_dq() argument
1739 struct nv_swncq_port_priv *pp = ap->private_data; in nv_swncq_qc_from_dq()
1751 return ata_qc_from_tag(ap, tag); in nv_swncq_qc_from_dq()
1754 static void nv_swncq_fis_reinit(struct ata_port *ap) in nv_swncq_fis_reinit() argument
1756 struct nv_swncq_port_priv *pp = ap->private_data; in nv_swncq_fis_reinit()
1764 static void nv_swncq_pp_reinit(struct ata_port *ap) in nv_swncq_pp_reinit() argument
1766 struct nv_swncq_port_priv *pp = ap->private_data; in nv_swncq_pp_reinit()
1774 nv_swncq_fis_reinit(ap); in nv_swncq_pp_reinit()
1777 static void nv_swncq_irq_clear(struct ata_port *ap, u16 fis) in nv_swncq_irq_clear() argument
1779 struct nv_swncq_port_priv *pp = ap->private_data; in nv_swncq_irq_clear()
1784 static void __ata_bmdma_stop(struct ata_port *ap) in __ata_bmdma_stop() argument
1788 qc.ap = ap; in __ata_bmdma_stop()
1792 static void nv_swncq_ncq_stop(struct ata_port *ap) in nv_swncq_ncq_stop() argument
1794 struct nv_swncq_port_priv *pp = ap->private_data; in nv_swncq_ncq_stop()
1799 ata_port_err(ap, "EH in SWNCQ mode,QC:qc_active 0x%X sactive 0x%X\n", in nv_swncq_ncq_stop()
1800 ap->qc_active, ap->link.sactive); in nv_swncq_ncq_stop()
1801 ata_port_err(ap, in nv_swncq_ncq_stop()
1807 ata_port_err(ap, "ATA_REG 0x%X ERR_REG 0x%X\n", in nv_swncq_ncq_stop()
1808 ap->ops->sff_check_status(ap), in nv_swncq_ncq_stop()
1809 ioread8(ap->ioaddr.error_addr)); in nv_swncq_ncq_stop()
1814 ata_port_err(ap, "tag : dhfis dmafis sdbfis sactive\n"); in nv_swncq_ncq_stop()
1824 ata_port_err(ap, in nv_swncq_ncq_stop()
1833 nv_swncq_pp_reinit(ap); in nv_swncq_ncq_stop()
1834 ap->ops->sff_irq_clear(ap); in nv_swncq_ncq_stop()
1835 __ata_bmdma_stop(ap); in nv_swncq_ncq_stop()
1836 nv_swncq_irq_clear(ap, 0xffff); in nv_swncq_ncq_stop()
1839 static void nv_swncq_error_handler(struct ata_port *ap) in nv_swncq_error_handler() argument
1841 struct ata_eh_context *ehc = &ap->link.eh_context; in nv_swncq_error_handler()
1843 if (ap->link.sactive) { in nv_swncq_error_handler()
1844 nv_swncq_ncq_stop(ap); in nv_swncq_error_handler()
1848 ata_bmdma_error_handler(ap); in nv_swncq_error_handler()
1852 static int nv_swncq_port_suspend(struct ata_port *ap, pm_message_t mesg) in nv_swncq_port_suspend() argument
1854 void __iomem *mmio = ap->host->iomap[NV_MMIO_BAR]; in nv_swncq_port_suspend()
1871 static int nv_swncq_port_resume(struct ata_port *ap) in nv_swncq_port_resume() argument
1873 void __iomem *mmio = ap->host->iomap[NV_MMIO_BAR]; in nv_swncq_port_resume()
1918 struct ata_port *ap = ata_shost_to_port(sdev->host); in nv_swncq_slave_config() local
1919 struct pci_dev *pdev = to_pci_dev(ap->host->dev); in nv_swncq_slave_config()
1931 dev = &ap->link.device[sdev->id]; in nv_swncq_slave_config()
1932 if (!(ap->flags & ATA_FLAG_NCQ) || dev->class == ATA_DEV_ATAPI) in nv_swncq_slave_config()
1962 static int nv_swncq_port_start(struct ata_port *ap) in nv_swncq_port_start() argument
1964 struct device *dev = ap->host->dev; in nv_swncq_port_start()
1965 void __iomem *mmio = ap->host->iomap[NV_MMIO_BAR]; in nv_swncq_port_start()
1970 rc = ata_bmdma_port_start(ap); in nv_swncq_port_start()
1984 ap->private_data = pp; in nv_swncq_port_start()
1985 pp->sactive_block = ap->ioaddr.scr_addr + 4 * SCR_ACTIVE; in nv_swncq_port_start()
1986 pp->irq_block = mmio + NV_INT_STATUS_MCP55 + ap->port_no * 2; in nv_swncq_port_start()
1987 pp->tag_block = mmio + NV_NCQ_REG_MCP55 + ap->port_no * 2; in nv_swncq_port_start()
2007 struct ata_port *ap = qc->ap; in nv_swncq_fill_sg() local
2009 struct nv_swncq_port_priv *pp = ap->private_data; in nv_swncq_fill_sg()
2041 static unsigned int nv_swncq_issue_atacmd(struct ata_port *ap, in nv_swncq_issue_atacmd() argument
2044 struct nv_swncq_port_priv *pp = ap->private_data; in nv_swncq_issue_atacmd()
2057 ap->ops->sff_tf_load(ap, &qc->tf); /* load tf registers */ in nv_swncq_issue_atacmd()
2058 ap->ops->sff_exec_command(ap, &qc->tf); in nv_swncq_issue_atacmd()
2067 struct ata_port *ap = qc->ap; in nv_swncq_qc_issue() local
2068 struct nv_swncq_port_priv *pp = ap->private_data; in nv_swncq_qc_issue()
2076 nv_swncq_issue_atacmd(ap, qc); in nv_swncq_qc_issue()
2078 nv_swncq_qc_to_dq(ap, qc); /* add qc to defer queue */ in nv_swncq_qc_issue()
2083 static void nv_swncq_hotplug(struct ata_port *ap, u32 fis) in nv_swncq_hotplug() argument
2086 struct ata_eh_info *ehi = &ap->link.eh_info; in nv_swncq_hotplug()
2091 sata_scr_read(&ap->link, SCR_ERROR, &serror); in nv_swncq_hotplug()
2092 sata_scr_write(&ap->link, SCR_ERROR, serror); in nv_swncq_hotplug()
2105 ata_port_freeze(ap); in nv_swncq_hotplug()
2108 static int nv_swncq_sdbfis(struct ata_port *ap) in nv_swncq_sdbfis() argument
2111 struct nv_swncq_port_priv *pp = ap->private_data; in nv_swncq_sdbfis()
2112 struct ata_eh_info *ehi = &ap->link.eh_info; in nv_swncq_sdbfis()
2118 host_stat = ap->ops->bmdma_status(ap); in nv_swncq_sdbfis()
2128 ap->ops->sff_irq_clear(ap); in nv_swncq_sdbfis()
2129 __ata_bmdma_stop(ap); in nv_swncq_sdbfis()
2138 ata_qc_complete_multiple(ap, ap->qc_active ^ done_mask); in nv_swncq_sdbfis()
2140 if (!ap->qc_active) { in nv_swncq_sdbfis()
2142 nv_swncq_pp_reinit(ap); in nv_swncq_sdbfis()
2159 ap->print_id, ap->qc_active, pp->qc_active, in nv_swncq_sdbfis()
2163 nv_swncq_fis_reinit(ap); in nv_swncq_sdbfis()
2166 qc = ata_qc_from_tag(ap, pp->last_issue_tag); in nv_swncq_sdbfis()
2167 nv_swncq_issue_atacmd(ap, qc); in nv_swncq_sdbfis()
2173 qc = nv_swncq_qc_from_dq(ap); in nv_swncq_sdbfis()
2175 nv_swncq_issue_atacmd(ap, qc); in nv_swncq_sdbfis()
2181 static inline u32 nv_swncq_tag(struct ata_port *ap) in nv_swncq_tag() argument
2183 struct nv_swncq_port_priv *pp = ap->private_data; in nv_swncq_tag()
2190 static void nv_swncq_dmafis(struct ata_port *ap) in nv_swncq_dmafis() argument
2196 struct nv_swncq_port_priv *pp = ap->private_data; in nv_swncq_dmafis()
2198 __ata_bmdma_stop(ap); in nv_swncq_dmafis()
2199 tag = nv_swncq_tag(ap); in nv_swncq_dmafis()
2202 qc = ata_qc_from_tag(ap, tag); in nv_swncq_dmafis()
2211 ap->ioaddr.bmdma_addr + ATA_DMA_TABLE_OFS); in nv_swncq_dmafis()
2214 dmactl = ioread8(ap->ioaddr.bmdma_addr + ATA_DMA_CMD); in nv_swncq_dmafis()
2219 iowrite8(dmactl | ATA_DMA_START, ap->ioaddr.bmdma_addr + ATA_DMA_CMD); in nv_swncq_dmafis()
2222 static void nv_swncq_host_interrupt(struct ata_port *ap, u16 fis) in nv_swncq_host_interrupt() argument
2224 struct nv_swncq_port_priv *pp = ap->private_data; in nv_swncq_host_interrupt()
2226 struct ata_eh_info *ehi = &ap->link.eh_info; in nv_swncq_host_interrupt()
2230 ata_stat = ap->ops->sff_check_status(ap); in nv_swncq_host_interrupt()
2231 nv_swncq_irq_clear(ap, fis); in nv_swncq_host_interrupt()
2235 if (ap->pflags & ATA_PFLAG_FROZEN) in nv_swncq_host_interrupt()
2239 nv_swncq_hotplug(ap, fis); in nv_swncq_host_interrupt()
2246 if (ap->ops->scr_read(&ap->link, SCR_ERROR, &serror)) in nv_swncq_host_interrupt()
2248 ap->ops->scr_write(&ap->link, SCR_ERROR, serror); in nv_swncq_host_interrupt()
2256 ata_port_freeze(ap); in nv_swncq_host_interrupt()
2271 ap->print_id, pp->qc_active, pp->dhfis_bits, in nv_swncq_host_interrupt()
2273 if (nv_swncq_sdbfis(ap) < 0) in nv_swncq_host_interrupt()
2292 ata_stat = ap->ops->sff_check_status(ap); in nv_swncq_host_interrupt()
2298 qc = nv_swncq_qc_from_dq(ap); in nv_swncq_host_interrupt()
2299 nv_swncq_issue_atacmd(ap, qc); in nv_swncq_host_interrupt()
2308 pp->dmafis_bits |= (0x1 << nv_swncq_tag(ap)); in nv_swncq_host_interrupt()
2310 nv_swncq_dmafis(ap); in nv_swncq_host_interrupt()
2317 ata_port_freeze(ap); in nv_swncq_host_interrupt()
2334 struct ata_port *ap = host->ports[i]; in nv_swncq_interrupt() local
2336 if (ap->link.sactive) { in nv_swncq_interrupt()
2337 nv_swncq_host_interrupt(ap, (u16)irq_stat); in nv_swncq_interrupt()
2341 nv_swncq_irq_clear(ap, 0xfff0); in nv_swncq_interrupt()
2343 handled += nv_host_intr(ap, (u8)irq_stat); in nv_swncq_interrupt()