struct mantis_ca *ca = container_of(work, struct mantis_ca, hif_evm_work);
struct mantis_pci *mantis = ca->ca_priv;
- u32 gpif_stat, gpif_mask, rst_mask, rst_stat;
-
- rst_mask = MANTIS_GPIF_WRACK |
- MANTIS_GPIF_OTHERR |
- MANTIS_SBUF_WSTO |
- MANTIS_GPIF_EXTIRQ;
+ u32 gpif_stat, gpif_mask;
gpif_stat = mmread(MANTIS_GPIF_STATUS);
gpif_mask = mmread(MANTIS_GPIF_IRQCFG);
- rst_stat = gpif_stat & rst_mask;
- mmwrite(rst_stat, MANTIS_GPIF_STATUS);
-
if (gpif_stat & MANTIS_GPIF_DETSTAT) {
if (gpif_stat & MANTIS_CARD_PLUGIN) {
dprintk(verbose, MANTIS_DEBUG, 1, "Event Mgr: Adapter(%d) Slot(0): CAM Plugin", mantis->num);
}
}
- if (gpif_stat & MANTIS_GPIF_EXTIRQ)
+ if (mantis->gpif_status & MANTIS_GPIF_EXTIRQ)
dprintk(verbose, MANTIS_DEBUG, 1, "Event Mgr: Adapter(%d) Slot(0): Ext IRQ", mantis->num);
- if (gpif_stat & MANTIS_SBUF_WSTO)
+ if (mantis->gpif_status & MANTIS_SBUF_WSTO)
dprintk(verbose, MANTIS_DEBUG, 1, "Event Mgr: Adapter(%d) Slot(0): Smart Buffer Timeout", mantis->num);
- if (gpif_stat & MANTIS_GPIF_OTHERR)
+ if (mantis->gpif_status & MANTIS_GPIF_OTHERR)
dprintk(verbose, MANTIS_DEBUG, 1, "Event Mgr: Adapter(%d) Slot(0): Alignment Error", mantis->num);
if (gpif_stat & MANTIS_SBUF_OVFLW)
if (gpif_stat & MANTIS_GPIF_BRRDY)
dprintk(verbose, MANTIS_DEBUG, 1, "Event Mgr: Adapter(%d) Slot(0): Smart Buffer Read Ready", mantis->num);
- if (gpif_stat & MANTIS_GPIF_WRACK)
+ if (mantis->gpif_status & MANTIS_GPIF_WRACK)
dprintk(verbose, MANTIS_DEBUG, 1, "Event Mgr: Adapter(%d) Slot(0): Slave Write ACK", mantis->num);
if (gpif_stat & MANTIS_GPIF_INTSTAT)
static irqreturn_t mantis_pci_irq(int irq, void *dev_id)
{
u32 stat = 0, mask = 0, lstat = 0, mstat = 0;
+ u32 rst_stat = 0, rst_mask = 0;
+
struct mantis_pci *mantis;
struct mantis_ca *ca;
if (!(stat & mask))
return IRQ_NONE;
+ rst_mask = MANTIS_GPIF_WRACK |
+ MANTIS_GPIF_OTHERR |
+ MANTIS_SBUF_WSTO |
+ MANTIS_GPIF_EXTIRQ;
+
+ rst_stat = mmread(MANTIS_GPIF_STATUS);
+ rst_stat &= rst_mask;
+ mmwrite(rst_stat, MANTIS_GPIF_STATUS);
+
mantis->mantis_int_stat = stat;
mantis->mantis_int_mask = mask;
dprintk(verbose, MANTIS_DEBUG, 0, "=== Interrupts[%04x/%04x]= [", stat, mask);
}
if (stat & MANTIS_INT_IRQ0) {
dprintk(verbose, MANTIS_DEBUG, 0, "* INT IRQ-0 *");
+ mantis->gpif_status = rst_stat;
schedule_work(&ca->hif_evm_work);
}
if (stat & MANTIS_INT_IRQ1) {