summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/forcedeth.c
diff options
context:
space:
mode:
authorMichael Brown2011-05-04 20:20:19 +0200
committerMichael Brown2011-05-04 20:22:52 +0200
commitb6cad3c0eb72e99d8ae5e6944ec8e9b7c5acecfa (patch)
tree1d1cf0dd4e4171bed6fe40f69e6db58298f5a47b /src/drivers/net/forcedeth.c
parent[hermon] Remove temporary workaround for missing BOFM mport support (diff)
downloadipxe-b6cad3c0eb72e99d8ae5e6944ec8e9b7c5acecfa.tar.gz
ipxe-b6cad3c0eb72e99d8ae5e6944ec8e9b7c5acecfa.tar.xz
ipxe-b6cad3c0eb72e99d8ae5e6944ec8e9b7c5acecfa.zip
[forcedeth] Ensure that IRQ line is deasserted when disabling interrupts
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/net/forcedeth.c')
-rw-r--r--src/drivers/net/forcedeth.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/drivers/net/forcedeth.c b/src/drivers/net/forcedeth.c
index c34a4296..5d0137e1 100644
--- a/src/drivers/net/forcedeth.c
+++ b/src/drivers/net/forcedeth.c
@@ -61,6 +61,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
static inline void pci_push ( void *ioaddr )
{
/* force out pending posted writes */
+ wmb();
readl ( ioaddr );
}
@@ -334,6 +335,7 @@ nv_disable_hw_interrupts ( struct forcedeth_private *priv )
void *ioaddr = priv->mmio_addr;
writel ( 0, ioaddr + NvRegIrqMask );
+ pci_push ( ioaddr );
}
static void
@@ -764,7 +766,6 @@ forcedeth_open ( struct net_device *netdev )
ioaddr + NvRegPowerState );
nv_disable_hw_interrupts ( priv );
- pci_push ( ioaddr );
writel ( NVREG_MIISTAT_MASK_ALL, ioaddr + NvRegMIIStatus );
writel ( NVREG_IRQSTAT_MASK, ioaddr + NvRegIrqStatus );
pci_push ( ioaddr );
@@ -1018,7 +1019,6 @@ static void
forcedeth_close ( struct net_device *netdev )
{
struct forcedeth_private *priv = netdev_priv ( netdev );
- void *ioaddr = priv->mmio_addr;
DBGP ( "forcedeth_close\n" );
@@ -1028,7 +1028,6 @@ forcedeth_close ( struct net_device *netdev )
/* Disable interrupts on the nic or we will lock up */
nv_disable_hw_interrupts ( priv );
- pci_push ( ioaddr );
nv_free_rxtx_resources ( priv );