[patch 4/5] Staging: vme: add Tundra TSI148 VME-PCI Bridge driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/03/2009 11:01 PM, Greg K-H wrote:
> +void tsi148_free_irq(int level, int statid)
> +{
> +	u32 tmp;
> +
> +	/* Get semaphore */

Hmm, useful comment. Anyway I think you plan to get rid of all those
while being in staging ;)?

> +	down(&(vme_irq));
> +
> +	tsi148_bridge->irq[level - 1].callback[statid].func = NULL;

What if the interrupt comes now? I think you want to switch this block
with "Disable IRQ level" one. And take care of PCI posting (if it is not
enough that INTEO reaches the device by a consequent INTEN read).

> +	tsi148_bridge->irq[level - 1].callback[statid].priv_data = NULL;
> +	tsi148_bridge->irq[level - 1].count--;
> +
> +	/* Disable IRQ level */
> +	if (tsi148_bridge->irq[level - 1].count == 0) {
> +		tmp = ioread32be(tsi148_bridge->base + TSI148_LCSR_INTEO);
> +		tmp &= ~TSI148_LCSR_INTEO_IRQEO[level - 1];
> +		iowrite32be(tmp, tsi148_bridge->base + TSI148_LCSR_INTEO);
> +
> +		tmp = ioread32be(tsi148_bridge->base + TSI148_LCSR_INTEN);
> +		tmp &= ~TSI148_LCSR_INTEN_IRQEN[level - 1];
> +		iowrite32be(tmp, tsi148_bridge->base + TSI148_LCSR_INTEN);
> +	}
> +
> +	/* Release semaphore */
> +	up(&(vme_irq));
> +}



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux