ソースを参照

[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年前
コミット
b6cad3c0eb
1個のファイルの変更2行の追加3行の削除
  1. 2
    3
      src/drivers/net/forcedeth.c

+ 2
- 3
src/drivers/net/forcedeth.c ファイルの表示

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

読み込み中…
キャンセル
保存