tifm: clear interrupt mask bits before setting them on adapter init
authorAlex Dubov <oakad@yahoo.com>
Mon, 10 Mar 2008 18:43:41 +0000 (11:43 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 11 Mar 2008 01:01:18 +0000 (18:01 -0700)
This should improve reliability of detection of cards already in socket on
driver load.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/misc/tifm_7xx1.c

index 63a089b29545a3bd34eb1e64327c6b693ce04e85..67503ea71d218bc4c5ff67cdbd8afbb6e2c94a7d 100644 (file)
@@ -367,6 +367,8 @@ static int tifm_7xx1_probe(struct pci_dev *dev,
        if (rc)
                goto err_out_irq;
 
+       writel(TIFM_IRQ_ENABLE | TIFM_IRQ_SOCKMASK((1 << fm->num_sockets) - 1),
+              fm->addr + FM_CLEAR_INTERRUPT_ENABLE);
        writel(TIFM_IRQ_ENABLE | TIFM_IRQ_SOCKMASK((1 << fm->num_sockets) - 1),
               fm->addr + FM_SET_INTERRUPT_ENABLE);
        return 0;