Browse Source

[forcedeth] Ensure that IRQ line is deasserted when disabling interrupts

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 13 years ago
parent
commit
b6cad3c0eb
1 changed files with 2 additions and 3 deletions
  1. 2
    3
      src/drivers/net/forcedeth.c

+ 2
- 3
src/drivers/net/forcedeth.c View File

61
 static inline void pci_push ( void *ioaddr )
61
 static inline void pci_push ( void *ioaddr )
62
 {
62
 {
63
 	/* force out pending posted writes */
63
 	/* force out pending posted writes */
64
+	wmb();
64
 	readl ( ioaddr );
65
 	readl ( ioaddr );
65
 }
66
 }
66
 
67
 
334
 	void *ioaddr = priv->mmio_addr;
335
 	void *ioaddr = priv->mmio_addr;
335
 
336
 
336
 	writel ( 0, ioaddr + NvRegIrqMask );
337
 	writel ( 0, ioaddr + NvRegIrqMask );
338
+	pci_push ( ioaddr );
337
 }
339
 }
338
 
340
 
339
 static void
341
 static void
764
 		 ioaddr + NvRegPowerState );
766
 		 ioaddr + NvRegPowerState );
765
 
767
 
766
 	nv_disable_hw_interrupts ( priv );
768
 	nv_disable_hw_interrupts ( priv );
767
-	pci_push ( ioaddr );
768
 	writel ( NVREG_MIISTAT_MASK_ALL, ioaddr + NvRegMIIStatus );
769
 	writel ( NVREG_MIISTAT_MASK_ALL, ioaddr + NvRegMIIStatus );
769
 	writel ( NVREG_IRQSTAT_MASK, ioaddr + NvRegIrqStatus );
770
 	writel ( NVREG_IRQSTAT_MASK, ioaddr + NvRegIrqStatus );
770
 	pci_push ( ioaddr );
771
 	pci_push ( ioaddr );
1018
 forcedeth_close ( struct net_device *netdev )
1019
 forcedeth_close ( struct net_device *netdev )
1019
 {
1020
 {
1020
 	struct forcedeth_private *priv = netdev_priv ( netdev );
1021
 	struct forcedeth_private *priv = netdev_priv ( netdev );
1021
-	void *ioaddr = priv->mmio_addr;
1022
 
1022
 
1023
 	DBGP ( "forcedeth_close\n" );
1023
 	DBGP ( "forcedeth_close\n" );
1024
 
1024
 
1028
 
1028
 
1029
 	/* Disable interrupts on the nic or we will lock up */
1029
 	/* Disable interrupts on the nic or we will lock up */
1030
 	nv_disable_hw_interrupts ( priv );
1030
 	nv_disable_hw_interrupts ( priv );
1031
-	pci_push ( ioaddr );
1032
 
1031
 
1033
 	nv_free_rxtx_resources ( priv );
1032
 	nv_free_rxtx_resources ( priv );
1034
 
1033
 

Loading…
Cancel
Save