defxx: Disable DEFEA's ESIC I/O decoding on shutdown
authorMaciej W. Rozycki <macro@linux-mips.org>
Fri, 21 Nov 2014 14:10:02 +0000 (14:10 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Nov 2014 21:37:13 +0000 (16:37 -0500)
Make sure the option card does not respond after shutdown by disabling
it via ESIC's Expansion Board Control register.  Also disable memory and
port I/O decoders, the latter in particular to disable slot-specific I/O
decoding that otherwise remains active even in the board is disabled.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/fddi/defxx.c

index 75d54ea72c56a3db297f90adbe96b22809603414..d057d9c2cf5e420e2f8fcfd2df24b88896620c2a 100644 (file)
@@ -856,6 +856,12 @@ static void dfx_bus_uninit(struct net_device *dev)
                val = inb(base_addr + PI_ESIC_K_IO_CONFIG_STAT_0);
                val &= ~PI_CONFIG_STAT_0_M_INT_ENB;
                outb(val, base_addr + PI_ESIC_K_IO_CONFIG_STAT_0);
+
+               /* Disable the board.  */
+               outb(0, base_addr + PI_ESIC_K_SLOT_CNTRL);
+
+               /* Disable memory and port decoders.  */
+               outb(0, base_addr + PI_ESIC_K_FUNCTION_CNTRL);
        }
        if (dfx_bus_pci) {
                /* Disable interrupts at PCI bus interface chip (PFI) */